Create Availability

Add a new availability time slot

POST/calendar/availability
Requires Bearer authentication

Add a new availability time slot for a specific day of the week. You can optionally restrict the slot to a specific appointment type.

Request Body

day_of_weekintegerrequired

Day of week (0=Sunday, 1=Monday, ... 6=Saturday).

start_timestringrequired

Start time in HH:MM:SS format (e.g., '09:00:00').

end_timestringrequired

End time in HH:MM:SS format (e.g., '17:00:00').

appointment_type_idstring

Restrict this slot to a specific appointment type.

is_activeboolean

Whether this slot is active. Defaults to true.

POST/calendar/availability
curl -X POST "https://api.vastal.agency/v1/calendar/availability" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "day_of_week": 1,
  "start_time": "09:00:00",
  "end_time": "12:00:00"
}'
200Success
{
"schedule": {
  "id": "avail_new123",
  "org_id": "org_xyz789",
  "day_of_week": 1,
  "start_time": "09:00:00",
  "end_time": "12:00:00",
  "appointment_type_id": null,
  "is_active": true,
  "created_at": "2024-01-20T12:00:00Z"
}
}
400Bad Request
{
"error": "day_of_week, start_time, and end_time are required"
}