POST
/api/public/v1/appointment-availabilityCreate availability window
Add a weekly availability window for a location.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.
appointments:write
Request Body
| Property | Type | Description |
|---|---|---|
locationId | string | Owning location. |
dayOfWeek | number | 0=Sun, 1=Mon, ... 6=Sat. |
startTime | string | 24h "HH:MM". |
endTime | string | 24h "HH:MM". |
isActive | boolean | Whether enforced (default true). |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/appointment-availability" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"locationId": "loc_abc",
"dayOfWeek": 1,
"startTime": "09:00",
"endTime": "17:00"
}'200Example response
json
{
"message": "Availability window created successfully!",
"content": {
"availability": {
"id": "av_1"
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
Scheduling → Availability
/scheduling/availability- Add a weekly window the location accepts bookings in.