Skip to main content

Appointment Slots

Manage calendar windows — the recurring availability rules that define when and how many appointments can be booked. Each window belongs to a branch and repeats weekly on a fixed day and session.

Use GET /v1/appointment-slots/availability and GET /v1/appointment-slots/schedule-tracking to query what is open and how full slots are on specific dates. See Availability & Schedule Tracking.


Before You Begin

Your API key requires the slots:write scope for create, update, and disable operations.


slot_id Format

The slot_id field takes different forms depending on which endpoint you are calling:

ContextFormatExample
Create / Update / DisablePlain calendar_id UUID"a1b2c3d4-..."
Availability responsecalendar_id||YYYY-MM-DD"a1b2c3d4-...||2026-06-15"
Schedule tracking responsecalendar_id||YYYY-MM-DD||appointment_type_id"a1b2c3d4-...||2026-06-15||f47ac10b-..."

When passing a slot_id to PATCH or disable endpoints, the server extracts the first segment — so you can safely pass either the plain UUID or a compound value from an availability response.


Create a Calendar Window

  • Endpoint: POST https://api.huskyvoice.ai/v1/appointment-slots
  • Required scope: slots:write
curl -s -X POST https://api.huskyvoice.ai/v1/appointment-slots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"branch_id": "branch_uuid_here",
"day": "monday",
"session": "Morning",
"start_time": "09:00",
"end_time": "11:00",
"max_slots": 20,
"ai_slots": 10,
"batch_name": "MA",
"appointment_type_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}'

Response — 201 Created

{
"success": true,
"data": {
"slot_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"calendar_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"branch_id": "branch_uuid_here",
"day": "monday",
"session": "Morning",
"batch": "MA",
"start_time": "09:00",
"end_time": "11:00",
"appointment_type": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"max_slots": 20,
"ai_slots": 10,
"filled_slots": null,
"available_slots": null,
"status": "OPEN",
"created_at": "2026-05-26T10:00:00.000Z",
"updated_at": "2026-05-26T10:00:00.000Z"
}
}

Request Fields

FieldRequiredDescription
branch_idYesBranch UUID this window belongs to
dayYesDay of the week, lowercase (e.g. "monday", "tuesday")
sessionYes"Morning", "Afternoon", or "Evening"
ai_slotsYesMaximum appointments the AI voice agent can book in this window
max_slotsNoTotal slot capacity for this window — defaults to ai_slots if omitted; must be ≥ ai_slots
start_timeNoWindow start time string (e.g. "09:00")
end_timeNoWindow end time string (e.g. "11:00")
batch_nameNoBatch label (e.g. "MA") — auto-populated on appointments created within this window
appointment_type_idNoRestrict this window to a specific service UUID
statusNoInitial status — "OPEN" (default) or "CLOSED"
ai_slots vs max_slots

ai_slots controls how many slots the AI voice agent can fill. max_slots is the total capacity for the window. If your staff can handle 20 appointments but you only want the AI to book 10, set max_slots: 20 and ai_slots: 10.


Update a Calendar Window

  • Endpoint: PATCH https://api.huskyvoice.ai/v1/appointment-slots/{slot_id}
  • Required scope: slots:write

Send only the fields you want to change. At least one field is required.

curl -s -X PATCH https://api.huskyvoice.ai/v1/appointment-slots/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"max_slots": 25, "ai_slots": 15}'

Response — 200 OK

{
"success": true,
"data": {
"slot_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"calendar_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"branch_id": "branch_uuid_here",
"day": "monday",
"session": "Morning",
"batch": "MA",
"start_time": "09:00",
"end_time": "11:00",
"appointment_type": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"max_slots": 25,
"ai_slots": 15,
"filled_slots": null,
"available_slots": null,
"status": "OPEN",
"created_at": "2026-05-26T10:00:00.000Z",
"updated_at": "2026-05-26T11:00:00.000Z"
}
}

Updatable Fields

FieldDescription
dayDay of the week, lowercase
session"Morning", "Afternoon", or "Evening"
start_timeWindow start time string
end_timeWindow end time string
max_slotsTotal slot capacity — must be ≥ ai_slots
ai_slotsAI agent slot limit — must be ≤ max_slots
batch_nameBatch label
status"OPEN" or "CLOSED"

Disable a Calendar Window

Sets a window's status to CLOSED, preventing new appointments from being booked into it. There is no delete operation — use disable to take a window offline.

  • Endpoint: POST https://api.huskyvoice.ai/v1/appointment-slots/{slot_id}/disable
  • Required scope: slots:write
curl -s -X POST https://api.huskyvoice.ai/v1/appointment-slots/a1b2c3d4-e5f6-7890-abcd-ef1234567890/disable \
-H "Authorization: Bearer YOUR_API_KEY"

Response — 200 OK

{
"success": true,
"data": {
"slot_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"calendar_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"branch_id": "branch_uuid_here",
"day": "monday",
"session": "Morning",
"batch": "MA",
"start_time": "09:00",
"end_time": "11:00",
"appointment_type": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"max_slots": 20,
"ai_slots": 10,
"filled_slots": null,
"available_slots": null,
"status": "CLOSED",
"created_at": "2026-05-26T10:00:00.000Z",
"updated_at": "2026-05-26T12:00:00.000Z"
}
}

To re-enable a disabled window, use PATCH /{slot_id} with { "status": "OPEN" }.


Error Codes

StatusCodeCause
400VALIDATION_ERRORMissing required field, or ai_slots exceeds max_slots
404NOT_FOUNDSlot not found
403INSUFFICIENT_SCOPEAPI key does not have the required scope