POST
/api/public/v1/appointment-availabilityCreate availability window
Add a weekly availability window for a business.
Request Body
| Property | Type | Description |
|---|---|---|
businessId | string | Owning business. |
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 "X-Organization-Id: your_org_id" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"businessId": "biz_abc",
"dayOfWeek": 1,
"startTime": "09:00",
"endTime": "17:00"
}'200Example response
json
{
"message": "Availability window created successfully!",
"content": {
"availability": {
"id": "av_1"
}
}
}