POST
/api/public/v1/appointment-servicesCreate appointment service
Create a new bookable service 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. |
name | string | Service name. |
description | string | Description. |
duration | number | Duration in minutes (15-480). |
price | number | Price in cents. |
isActive | boolean | Whether bookable (default true). |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/appointment-services" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"locationId": "loc_abc",
"name": "Consultation",
"duration": 30,
"price": 5000
}'200Example response
json
{
"message": "Appointment service created successfully!",
"content": {
"service": {
"id": "svc_1"
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.