POST
/api/public/v1/appointment-availability

Create 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

PropertyTypeDescription
locationIdstringOwning location.
dayOfWeeknumber0=Sun, 1=Mon, ... 6=Sat.
startTimestring24h "HH:MM".
endTimestring24h "HH:MM".
isActivebooleanWhether 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
  1. Add a weekly window the location accepts bookings in.