{"openapi":"3.1.0","info":{"title":"Ringhum API","version":"1.0.0","summary":"Manage AI phone assistants, numbers, calls and webhooks.","description":"REST API for Ringhum. Authenticate with a workspace API key sent as a Bearer token. All timestamps are ISO 8601 in UTC; phone numbers are E.164.","contact":{"email":"hello@ringhum.com"}},"servers":[{"url":"https:\/\/ringhum.com\/api\/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account","description":"Who you are, your workspace and usage."},{"name":"Assistants","description":"AI phone assistants: voice, behaviour, abilities."},{"name":"Phone numbers","description":"Numbers your assistants answer on."},{"name":"Calls","description":"Inbound and outbound calls, transcripts and recordings."},{"name":"Webhooks","description":"Signed HTTP callbacks for call events."},{"name":"Contacts","description":"Callers and customers, recognised on repeat calls."},{"name":"Appointments","description":"Availability and bookings made by assistants or you."},{"name":"Orders","description":"Orders taken by assistants, by hand or through the API. Prices always come from your catalogue."},{"name":"Products","description":"The menu or catalogue orders are priced from: items, categories, options and prices."},{"name":"Reservations","description":"Room reservations taken by assistants, by hand, through the API or imported from Booking.com, Airbnb and VRBO calendars."},{"name":"Rooms","description":"The room types reservations are booked from: capacity, units, nightly and seasonal prices, calendar sync."},{"name":"Inbox","description":"Messages, callbacks and leads that need a human."},{"name":"Messages","description":"Text and WhatsApp messages sent and received by the workspace, and sending your own."},{"name":"Campaigns","description":"Outbound calling campaigns."},{"name":"Company","description":"Business profile, services, FAQs, staff and the knowledge base."},{"name":"Catalog","description":"Voices, languages, models and event names."}],"paths":{"\/me":{"get":{"tags":["Account"],"summary":"Who am I","description":"Returns the API key, the user who created it and the workspace it belongs to.","operationId":"whoAmI","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ApiKeyIdentity"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/team":{"get":{"tags":["Account"],"summary":"Get workspace","description":"The workspace this key belongs to.","operationId":"getWorkspace","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Team"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/team\/members":{"get":{"tags":["Account"],"summary":"List members","description":"Members of the workspace with their role.","operationId":"listMembers","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Member"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/usage":{"get":{"tags":["Account"],"summary":"Get usage","description":"Minutes used in the current billing period, plan limits and counts.","operationId":"getUsage","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Usage"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/assistants":{"get":{"tags":["Assistants"],"summary":"List assistants","description":"Paginated. Archived assistants are excluded unless `status=archived`.","operationId":"listAssistants","x-scope":"read","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","active","paused","archived"]}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Assistant"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Assistants"],"summary":"Create assistant","description":"Creates an assistant. Only `name` is required; everything else falls back to the platform defaults (first voice, default abilities).","operationId":"createAssistant","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AssistantInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/AssistantFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/assistants\/{id}":{"get":{"tags":["Assistants"],"summary":"Get assistant","description":"Full configuration including instructions and knowledge base.","operationId":"getAssistant","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Assistant id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/AssistantFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Assistants"],"summary":"Update assistant","description":"Partial update; send only the fields you want to change.","operationId":"updateAssistant","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Assistant id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AssistantInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/AssistantFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Assistants"],"summary":"Delete assistant","description":"Archives and soft-deletes the assistant; its phone numbers are unassigned. Calls are kept.","operationId":"deleteAssistant","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Assistant id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/phone-numbers":{"get":{"tags":["Phone numbers"],"summary":"List phone numbers","description":"Active numbers in the workspace.","operationId":"listPhoneNumbers","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PhoneNumber"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/phone-numbers\/{id}\/whatsapp-profile":{"get":{"tags":["Phone numbers"],"summary":"Get WhatsApp profile","description":"What people see when they open the number in WhatsApp. `409` when WhatsApp is not active on the number.","operationId":"getWhatsAppProfile","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Phone number id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WhatsAppProfile"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"description":"WhatsApp not active","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"invalid_state","message":"WhatsApp is not active on this number."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Phone numbers"],"summary":"Update WhatsApp profile","description":"Change the display name (reviewed by Meta before it shows), about line, description, category, email, website, address, and the profile photo (`photo_url` or `photo_base64`, JPEG or PNG up to 5 MB). Only the fields sent are changed.","operationId":"updateWhatsAppProfile","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Phone number id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WhatsAppProfileInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WhatsAppProfile"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"description":"WhatsApp not active","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"invalid_state","message":"WhatsApp is not active on this number."}}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/phone-numbers\/{id}":{"get":{"tags":["Phone numbers"],"summary":"Get phone number","description":"","operationId":"getPhoneNumber","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Phone number id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/PhoneNumber"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Phone numbers"],"summary":"Update phone number","description":"Assign an assistant (`assistant_id`, or `null` to unassign) or rename it.","operationId":"updatePhoneNumber","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Phone number id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PhoneNumberInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/PhoneNumber"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/calls":{"get":{"tags":["Calls"],"summary":"List calls","description":"Newest first. Filter by assistant, status, direction, phone number and date range.","operationId":"listCalls","x-scope":"read","parameters":[{"name":"assistant_id","in":"query","schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string","enum":["queued","ringing","in_progress","completed","busy","failed","no_answer","canceled"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"phone","in":"query","schema":{"type":"string"},"description":"E.164 number that called or was called."},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"},"description":"Started at or after."},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"},"description":"Started at or before."},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Call"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Calls"],"summary":"Place outbound call","description":"The assistant calls the number and opens with its welcome message. Returns `201` with status `queued`; follow progress with `GET \/calls\/{id}` or the `call.ended` webhook. Returns `502` if the carrier rejected the call. Set `channel` to `whatsapp` to call the person on WhatsApp instead of the phone network: the workspace needs a number with WhatsApp calling switched on, the person must have allowed WhatsApp calls (a permission they grant in WhatsApp, kept on the contact as `whatsapp_call_permission`), and WhatsApp does not let businesses start calls to numbers in the US, Canada, Egypt, Vietnam or Nigeria. Whatever is missing comes back as `422 validation_error` with the reason under `errors.to`.","operationId":"placeOutboundCall","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OutboundCallInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Call"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"},"502":{"description":"Carrier error; `status` is `failed` and `error` explains why.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Call"}}}}}}}}},"\/calls\/{id}":{"get":{"tags":["Calls"],"summary":"Get call","description":"Includes transcript, conversation metrics and metadata.","operationId":"getCall","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Call id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/CallFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Calls"],"summary":"Delete call","description":"Deletes the call, its transcript and recording.","operationId":"deleteCall","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Call id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/calls\/{id}\/transcript":{"get":{"tags":["Calls"],"summary":"Get transcript","description":"Just the conversation turns, in order.","operationId":"getTranscript","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Call id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Message"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/calls\/{id}\/recording":{"get":{"tags":["Calls"],"summary":"Download recording","description":"Streams the call audio as `audio\/wav` (8 kHz mono). `404` if recording was disabled for the assistant.","operationId":"downloadRecording","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Call id"}],"responses":{"200":{"description":"WAV audio","content":{"audio\/wav":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"","operationId":"listWebhooks","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Webhook"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Webhooks"],"summary":"Create webhook","description":"The signing `secret` is returned **only in this response**. Store it to verify deliveries.","operationId":"createWebhook","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookWithSecret"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/webhooks\/{id}":{"patch":{"tags":["Webhooks"],"summary":"Update webhook","description":"Change the URL, the events or pause it with `active: false`.","operationId":"updateWebhook","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Webhook id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Webhook"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","description":"","operationId":"deleteWebhook","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Webhook id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/webhooks\/{id}\/test":{"post":{"tags":["Webhooks"],"summary":"Send test event","description":"Delivers a `test.ping` event synchronously and reports the HTTP status your endpoint returned.","operationId":"sendTestEvent","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Webhook id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookTestResult"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts","description":"Newest activity first. Filter with `q` (name, phone, email, company), `tag`, `phone`, `email` or `do_not_call`.","operationId":"listContacts","x-scope":"read","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"tag","in":"query","schema":{"type":"string"}},{"name":"phone","in":"query","schema":{"type":"string"}},{"name":"do_not_call","in":"query","schema":{"type":"boolean"}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Contacts"],"summary":"Create contact","description":"Creates a contact, or updates the existing one with the same phone number.","operationId":"createContact","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContactInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ContactFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/contacts\/import":{"post":{"tags":["Contacts"],"summary":"Import contacts","description":"Bulk upsert up to 5,000 rows. Recognised keys: name, phone, email, company, tags, notes; other keys become custom fields.","operationId":"importContacts","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContactImportInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ImportResult"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/contacts\/{id}":{"get":{"tags":["Contacts"],"summary":"Get contact","description":"Includes notes and custom fields collected during calls.","operationId":"getContact","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Contact id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ContactFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Contacts"],"summary":"Update contact","description":"","operationId":"updateContact","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Contact id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContactInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ContactFull"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Contacts"],"summary":"Delete contact","description":"Soft-deletes the contact; calls and appointments are kept.","operationId":"deleteContact","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Contact id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/appointments\/availability":{"get":{"tags":["Appointments"],"summary":"Get availability","description":"Open slots computed from opening hours, holidays, booking rules, staff working hours and existing bookings.","operationId":"getAvailability","x-scope":"read","parameters":[{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"First day to look at (workspace timezone). Defaults to today."},{"name":"days","in":"query","schema":{"type":"integer","default":7,"maximum":31}},{"name":"service_id","in":"query","schema":{"type":"integer"}},{"name":"staff_member_id","in":"query","schema":{"type":"integer"}},{"name":"duration_minutes","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Availability"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/appointments":{"get":{"tags":["Appointments"],"summary":"List appointments","description":"Ordered by start time. Filter with `status`, `from`, `to`, `contact_id` or `upcoming=true`.","operationId":"listAppointments","x-scope":"read","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["scheduled","confirmed","completed","cancelled","no_show"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"upcoming","in":"query","schema":{"type":"boolean"}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Appointment"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Appointments"],"summary":"Book appointment","description":"Books a slot, links or creates the contact and sends the confirmation email (unless `notify: false`). Returns `409` when the time is taken; pass `force: true` to book anyway.","operationId":"bookAppointment","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AppointmentInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Appointment"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"409":{"description":"Slot not available","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"validation_error","message":"That time is not available."}}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/appointments\/{id}":{"get":{"tags":["Appointments"],"summary":"Get appointment","description":"","operationId":"getAppointment","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Appointment id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Appointment"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Appointments"],"summary":"Update appointment","description":"Send `starts_at` to reschedule (customer is notified), or `status`, `notes`, `title`.","operationId":"updateAppointment","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Appointment id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AppointmentUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Appointment"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"description":"Slot not available","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"validation_error","message":"That time is not available."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Appointments"],"summary":"Cancel appointment","description":"Marks it cancelled and notifies the customer. Optional `reason` and `notify` query parameters.","operationId":"cancelAppointment","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Appointment id"},{"name":"reason","in":"query","schema":{"type":"string"}},{"name":"notify","in":"query","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Appointment"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/orders":{"get":{"tags":["Orders"],"summary":"List orders","description":"Newest first. Filter with `status` (comma-separated), `fulfillment`, `from`, `to` (created time), `contact_id`, `open=true` (not completed or cancelled) or `q` (order number, customer name or phone).","operationId":"listOrders","x-scope":"read","parameters":[{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of new, confirmed, preparing, ready, out_for_delivery, completed, cancelled, comma-separated."},{"name":"fulfillment","in":"query","schema":{"type":"string","enum":["pickup","delivery","dine_in"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"contact_id","in":"query","schema":{"type":"integer"}},{"name":"open","in":"query","schema":{"type":"boolean"}},{"name":"q","in":"query","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Order"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"description":"Orders are switched off for this workspace","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"feature_disabled","message":"Orders are not enabled for this workspace."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Orders"],"summary":"Create order","description":"Prices the items from your catalogue, applies the delivery fee, the minimum order for delivery and opening hours, links or creates the contact and notifies the customer and your team (unless `notify: false`). Send `skip_rules: true` to accept an order outside opening hours or below the minimum. Fires `order.created`.","operationId":"createOrder","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OrderInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Order"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"description":"Items or order rules did not check out","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"validation_error","message":"\"Hawaiian\" is not on the menu. Closest: Margherita, Diavola."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/orders\/quote":{"post":{"tags":["Orders"],"summary":"Quote order","description":"Prices a basket without placing it: lines, fee, total and any problems (unknown items, missing required options, minimum order, fulfillment not offered). Nothing is saved.","operationId":"quoteOrder","x-scope":"read","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OrderQuoteInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/OrderQuote"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/orders\/{id}":{"get":{"tags":["Orders"],"summary":"Get order","description":"","operationId":"getOrder","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Order id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Order"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Orders"],"summary":"Update order","description":"Move the order along (`status`), or change `notes` and `requested_for`. The customer hears about confirmed, ready and out-for-delivery (unless `notify: false`). Fires `order.updated`. Use DELETE to cancel.","operationId":"updateOrder","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Order id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/OrderUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Order"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"description":"The order is cancelled","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"invalid_state","message":"A cancelled order cannot change status."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Orders"],"summary":"Cancel order","description":"Marks it cancelled and notifies the customer and team. Optional `reason` and `notify` query parameters. Fires `order.cancelled`.","operationId":"cancelOrder","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Order id"},{"name":"reason","in":"query","schema":{"type":"string"}},{"name":"notify","in":"query","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Order"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/products":{"get":{"tags":["Products"],"summary":"List products","description":"Your menu or catalogue, ordered by category. Filter with `category`, `available` or `q`.","operationId":"listProducts","x-scope":"read","parameters":[{"name":"category","in":"query","schema":{"type":"string"}},{"name":"available","in":"query","schema":{"type":"boolean"}},{"name":"q","in":"query","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Product"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Products"],"summary":"Create product","description":"Send the price as `price` (decimal) or `price_cents`. Options are groups of choices, each with its own surcharge.","operationId":"createProduct","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProductInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/products\/{id}":{"get":{"tags":["Products"],"summary":"Get product","description":"","operationId":"getProduct","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Product id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Products"],"summary":"Update product","description":"Partial update. Set `available: false` to take an item off the menu for now; sending `options` replaces all option groups.","operationId":"updateProduct","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Product id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProductInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Products"],"summary":"Delete product","description":"Removes it from the catalogue. Orders already placed keep their copy of the item.","operationId":"deleteProduct","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Product id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/reservations\/availability":{"get":{"tags":["Reservations"],"summary":"Get availability","description":"Free units per room type for a stay, with the price for those nights (seasonal rates applied). Counts every active reservation, including blocks imported from booking channels.","operationId":"getAvailability","x-scope":"read","parameters":[{"name":"check_in","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"check_out","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"adults","in":"query","schema":{"type":"integer","default":1}},{"name":"children","in":"query","schema":{"type":"integer","default":0}},{"name":"room_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/RoomAvailability"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"description":"Hotels are switched off for this workspace","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"feature_disabled","message":"Hotels are not enabled for this workspace."}}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/reservations":{"get":{"tags":["Reservations"],"summary":"List reservations","description":"Latest check-in first. Filter with `status` (comma-separated), `room_id`, `source`, `from`, `to` (stays with a night in the window), `contact_id`, `upcoming=true`, `active=true` (holding a room) or `q` (reservation number, guest name, phone or email).","operationId":"listReservations","x-scope":"read","parameters":[{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of requested, confirmed, checked_in, checked_out, cancelled, no_show, comma-separated."},{"name":"room_id","in":"query","schema":{"type":"integer"}},{"name":"source","in":"query","schema":{"type":"string","enum":["ai","manual","api","ical"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"contact_id","in":"query","schema":{"type":"integer"}},{"name":"upcoming","in":"query","schema":{"type":"boolean"}},{"name":"active","in":"query","schema":{"type":"boolean"}},{"name":"q","in":"query","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Reservation"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"description":"Hotels are switched off for this workspace","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"feature_disabled","message":"Hotels are not enabled for this workspace."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Reservations"],"summary":"Create reservation","description":"Prices the stay from the room type and its seasonal rates, checks capacity and availability (including imported channel blocks), links or creates the contact and notifies the guest and your team (unless `notify: false`). Send `skip_rules: true` to accept a stay shorter or longer than the workspace allows or starting in the past. Fires `reservation.created`.","operationId":"createReservation","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ReservationInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Reservation"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"description":"Dates, capacity or availability did not check out","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"validation_error","message":"Sea-view double is fully booked for those dates; use check_rooms to offer other room types or dates."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/reservations\/{id}":{"get":{"tags":["Reservations"],"summary":"Get reservation","description":"","operationId":"getReservation","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Reservation id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Reservation"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Reservations"],"summary":"Update reservation","description":"Move the stay along (`status`: confirmed, checked_in, checked_out, no_show), or change guest details, `adults`, `children` and `notes`. The guest hears about confirmation (unless `notify: false`). Fires `reservation.updated`. Use DELETE to cancel.","operationId":"updateReservation","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Reservation id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ReservationUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Reservation"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"409":{"description":"The reservation is cancelled","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"invalid_state","message":"A cancelled reservation cannot change status."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Reservations"],"summary":"Cancel reservation","description":"Marks it cancelled and notifies the guest and team. Optional `reason` and `notify` query parameters. Fires `reservation.cancelled`.","operationId":"cancelReservation","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Reservation id"},{"name":"reason","in":"query","schema":{"type":"string"}},{"name":"notify","in":"query","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Reservation"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/rooms":{"get":{"tags":["Rooms"],"summary":"List rooms","description":"Your room types in display order. Filter with `category`, `available` or `q`.","operationId":"listRooms","x-scope":"read","parameters":[{"name":"category","in":"query","schema":{"type":"string"}},{"name":"available","in":"query","schema":{"type":"boolean"}},{"name":"q","in":"query","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Room"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Rooms"],"summary":"Create room","description":"Send the nightly price as `price` (decimal) or `price_cents`. `quantity` is how many identical units you have. Seasonal rates override the price for date ranges; `ical_import_urls` are calendars to import from booking channels.","operationId":"createRoom","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoomInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Room"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/rooms\/{id}":{"get":{"tags":["Rooms"],"summary":"Get room","description":"","operationId":"getRoom","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Room id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Room"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Rooms"],"summary":"Update room","description":"Partial update. Set `available: false` to stop offering the room type; sending `seasonal_rates`, `amenities` or `ical_import_urls` replaces the whole list.","operationId":"updateRoom","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Room id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoomInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Room"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"delete":{"tags":["Rooms"],"summary":"Delete room","description":"Removes the room type. Reservations already made keep their dates and lose the room.","operationId":"deleteRoom","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Room id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/inbox":{"get":{"tags":["Inbox"],"summary":"List inbox items","description":"Messages, callback requests, leads, voicemails and inbound texts. `status=open` returns everything not done.","operationId":"listInboxItems","x-scope":"read","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","in_progress","done"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["message","callback","lead","voicemail","sms"]}},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/InboxItem"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/inbox\/{id}":{"get":{"tags":["Inbox"],"summary":"Get inbox item","description":"","operationId":"getInboxItem","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Inbox item id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxItem"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Inbox"],"summary":"Update inbox item","description":"Change `status`, `priority` or `assigned_to` (a member id).","operationId":"updateInboxItem","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Inbox item id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InboxUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxItem"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/messages":{"get":{"tags":["Messages"],"summary":"List messages","description":"Texts and WhatsApp messages, newest first: the ones people sent to your numbers, the assistant's replies, confirmations and reminders, and messages sent by hand or through this API. Filter by `channel`, `direction`, `contact_id`, a date range on `created_at` and `q` (body or phone number).","operationId":"listMessages","x-scope":"read","parameters":[{"name":"channel","in":"query","schema":{"type":"string","enum":["sms","whatsapp"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"contact_id","in":"query","schema":{"type":"integer"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"},"description":"Created at or after."},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"},"description":"Created at or before."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Matches the body, or a phone number when it contains digits."},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TextMessage"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"description":"Texting is off and no number is connected to WhatsApp","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"feature_disabled","message":"Messaging is not enabled for this workspace: texting is off and no number is connected to WhatsApp."}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Messages"],"summary":"Send message","description":"Sends a message from the workspace. `channel` `auto` (the default) picks WhatsApp when the person wrote to your WhatsApp number in the last 24 hours (Meta's window for free-form replies) and SMS otherwise; `whatsapp` or `sms` forces one. Returns `201` with the message; when the carrier turns it down afterwards the message comes back with status `failed` and the reason in `error`. Anything refused before sending (no WhatsApp number, no credit, a text to another country, a WhatsApp message outside the 24-hour window) is a `422`. Texts go to numbers in the sending number's country only; WhatsApp messages go anywhere but only inside the 24-hour window, since template messages are not supported yet.","operationId":"sendMessage","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TextMessageInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/TextMessage"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"description":"Texting is off and no number is connected to WhatsApp","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"feature_disabled","message":"Messaging is not enabled for this workspace: texting is off and no number is connected to WhatsApp."}}}}},"422":{"description":"The body failed validation, or the message could not be sent","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"validation_error","message":"Not sent: this workspace has no WhatsApp number.","errors":{"to":["Not sent: this workspace has no WhatsApp number."]}}}}}},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/messages\/{id}":{"get":{"tags":["Messages"],"summary":"Get message","description":"","operationId":"getMessage","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Message id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/TextMessage"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/campaigns":{"get":{"tags":["Campaigns"],"summary":"List campaigns","description":"","operationId":"listCampaigns","x-scope":"read","parameters":[{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Campaign"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Campaigns"],"summary":"Create campaign","description":"Creates a draft. Add contacts with `contact_ids` and\/or `tag`, then start it with the transition endpoint.","operationId":"createCampaign","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Campaign"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/campaigns\/{id}":{"get":{"tags":["Campaigns"],"summary":"Get campaign","description":"Includes live progress counts.","operationId":"getCampaign","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Campaign id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Campaign"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/campaigns\/{id}\/results":{"get":{"tags":["Campaigns"],"summary":"List campaign results","description":"One row per contact with status, outcome, attempts and the last call id.","operationId":"listCampaignResults","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Campaign id"},{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/CampaignContact"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/campaigns\/{id}\/contacts":{"post":{"tags":["Campaigns"],"summary":"Add contacts to campaign","description":"Contacts already in the campaign are ignored.","operationId":"addContactsToCampaign","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Campaign id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignContactsInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/CampaignAddResult"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/campaigns\/{id}\/transition":{"post":{"tags":["Campaigns"],"summary":"Start, pause or cancel campaign","description":"Body: `{\"action\": \"start\" | \"pause\" | \"cancel\"}`. Calls are only placed inside the calling window.","operationId":"start,PauseOrCancelCampaign","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Campaign id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignTransition"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Campaign"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business":{"get":{"tags":["Company"],"summary":"Get company profile","description":"Everything assistants know about the business: details, hours, holidays, booking rules, policies, services, FAQs, staff and locations.","operationId":"getCompanyProfile","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Business"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"patch":{"tags":["Company"],"summary":"Update company profile","description":"Partial update. `opening_hours` is an object keyed mon..sun with arrays of `[\"HH:MM\",\"HH:MM\"]` ranges.","operationId":"updateCompanyProfile","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BusinessInput"}}}},"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Business"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business\/services":{"post":{"tags":["Company"],"summary":"Add service","description":"","operationId":"addService","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ServiceInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Service"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business\/services\/{id}":{"delete":{"tags":["Company"],"summary":"Delete service","description":"","operationId":"deleteService","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Service id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business\/faqs":{"post":{"tags":["Company"],"summary":"Add FAQ","description":"","operationId":"addFAQ","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/FaqInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Faq"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business\/faqs\/{id}":{"delete":{"tags":["Company"],"summary":"Delete FAQ","description":"","operationId":"deleteFAQ","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"FAQ id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business\/staff":{"post":{"tags":["Company"],"summary":"Add staff member","description":"Staff can be transfer targets and\/or bookable.","operationId":"addStaffMember","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/StaffInput"}}}},"responses":{"201":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/StaffMember"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/business\/staff\/{id}":{"delete":{"tags":["Company"],"summary":"Delete staff member","description":"","operationId":"deleteStaffMember","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Staff member id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/knowledge":{"get":{"tags":["Company"],"summary":"List knowledge documents","description":"","operationId":"listKnowledgeDocuments","x-scope":"read","parameters":[{"$ref":"#\/components\/parameters\/perPage"},{"$ref":"#\/components\/parameters\/page"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/KnowledgeDocument"}},"meta":{"$ref":"#\/components\/schemas\/Pagination"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}},"post":{"tags":["Company"],"summary":"Add knowledge document","description":"Send `title` + `content`, or a `url` to fetch. Indexing runs in the background; poll `status` until `ready`.","operationId":"addKnowledgeDocument","x-scope":"write","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/KnowledgeInput"}}}},"responses":{"202":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/KnowledgeDocument"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/knowledge\/search":{"get":{"tags":["Company"],"summary":"Search knowledge","description":"The same search the assistant runs during a call: matching FAQs plus the best document passages.","operationId":"searchKnowledge","x-scope":"read","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"assistant_id","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","default":5}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/KnowledgeSearch"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/knowledge\/{id}":{"delete":{"tags":["Company"],"summary":"Delete knowledge document","description":"","operationId":"deleteKnowledgeDocument","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Document id"}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/voices":{"get":{"tags":["Catalog"],"summary":"List voices","description":"Voices you can assign to an assistant (`voice_id`).","operationId":"listVoices","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Voice"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/languages":{"get":{"tags":["Catalog"],"summary":"List languages","description":"Language codes accepted by `language`.","operationId":"listLanguages","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Language"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}},"\/events":{"get":{"tags":["Catalog"],"summary":"List webhook events","description":"Event names you can subscribe to.","operationId":"listWebhookEvents","x-scope":"read","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Event"}}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"429":{"$ref":"#\/components\/responses\/RateLimited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Create keys under Developers \u2192 API keys. Keys have `read` and\/or `write` scopes."}},"schemas":{"Assistant":{"type":"object","properties":{"id":{"type":"integer","examples":[1]},"object":{"type":"string","const":"assistant"},"name":{"type":"string","examples":["Front desk"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"persona_name":{"type":"string","examples":["Marie"]},"company_name":{"type":["string","null"]},"language":{"type":"string","examples":["en-US"]},"voice":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"speed":{"type":"number"}}},"greeting":{"type":["string","null"]},"abilities":{"type":"object","additionalProperties":{"type":"boolean"},"examples":[{"answer_questions":true,"take_message":true,"book_appointments":false,"take_orders":false}]},"phone_numbers":{"type":"array","items":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]}},"record_calls":{"type":"boolean"},"calls_count":{"type":"integer"},"minutes_used":{"type":"integer"},"last_call_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"AssistantFull":{"type":"object","properties":{"id":{"type":"integer","examples":[1]},"object":{"type":"string","const":"assistant"},"name":{"type":"string","examples":["Front desk"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"persona_name":{"type":"string","examples":["Marie"]},"company_name":{"type":["string","null"]},"language":{"type":"string","examples":["en-US"]},"voice":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"speed":{"type":"number"}}},"greeting":{"type":["string","null"]},"abilities":{"type":"object","additionalProperties":{"type":"boolean"},"examples":[{"answer_questions":true,"take_message":true,"book_appointments":false,"take_orders":false}]},"phone_numbers":{"type":"array","items":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]}},"record_calls":{"type":"boolean"},"calls_count":{"type":"integer"},"minutes_used":{"type":"integer"},"last_call_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"company_description":{"type":["string","null"]},"instructions":{"type":["string","null"],"description":"Behaviour prompt. Keep it short: long prompts add latency to every turn."},"knowledge_text":{"type":["string","null"],"description":"Free-text knowledge base (max 60,000 characters; the first ~6,000 are sent per call)."},"knowledge_url":{"type":["string","null"]},"transfer_numbers":{"type":"array","items":{"$ref":"#\/components\/schemas\/TransferTarget"}},"extract_variables":{"type":"array","items":{"$ref":"#\/components\/schemas\/Variable"}},"business_hours":{"type":["object","null"]},"after_hours_message":{"type":["string","null"]},"temperature":{"type":"number","minimum":0,"maximum":1},"max_tokens":{"type":"integer"},"allow_interruptions":{"type":"boolean"},"interruption_sensitivity":{"type":"string","enum":["low","medium","high"]},"interrupt_greeting":{"type":"boolean"},"max_call_duration_seconds":{"type":"integer"},"silence_timeout_seconds":{"type":"integer"},"background_sound":{"type":"string"},"send_summary_email":{"type":"boolean"},"summary_email":{"type":["string","null"]}}},"AssistantInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":80},"status":{"type":"string","enum":["draft","active","paused"]},"persona_name":{"type":"string","maxLength":40},"company_name":{"type":"string"},"company_description":{"type":"string","maxLength":3000},"language":{"type":"string","description":"See GET \/languages"},"voice_id":{"type":"string","description":"See GET \/voices"},"speech_rate":{"type":"number","minimum":0.6,"maximum":1.5},"greeting":{"type":"string","maxLength":500},"instructions":{"type":"string","maxLength":12000},"knowledge_text":{"type":"string","maxLength":60000},"knowledge_url":{"type":"string","format":"uri"},"abilities":{"type":"object","additionalProperties":{"type":"boolean"}},"transfer_numbers":{"type":"array","items":{"$ref":"#\/components\/schemas\/TransferTarget"}},"extract_variables":{"type":"array","items":{"$ref":"#\/components\/schemas\/Variable"}},"temperature":{"type":"number","minimum":0,"maximum":1},"max_tokens":{"type":"integer","minimum":50,"maximum":1000},"allow_interruptions":{"type":"boolean"},"interruption_sensitivity":{"type":"string","enum":["low","medium","high"]},"max_call_duration_seconds":{"type":"integer","minimum":60,"maximum":3600},"record_calls":{"type":"boolean"},"send_summary_email":{"type":"boolean"},"summary_email":{"type":"string","format":"email"}},"examples":[{"name":"Front desk","persona_name":"Marie","company_name":"Northside Dental","greeting":"Hi, thanks for calling Northside Dental, this is Marie. How can I help?","abilities":{"answer_questions":true,"take_message":true,"take_orders":true},"transfer_numbers":[{"label":"Accounting","number":"+14155550178","when":"billing questions"}]}]},"TransferTarget":{"type":"object","required":["label","number"],"properties":{"label":{"type":"string"},"number":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"when":{"type":"string","description":"When to transfer, in plain language."}}},"Variable":{"type":"object","required":["name"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9_]+$"},"description":{"type":"string"}}},"PhoneNumber":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"phone_number"},"e164":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"formatted":{"type":"string"},"friendly_name":{"type":["string","null"]},"country":{"type":"string"},"type":{"type":"string","enum":["local","mobile","toll_free"]},"status":{"type":"string"},"assistant_id":{"type":["integer","null"]},"capabilities":{"type":"object"},"monthly_cost_cents":{"type":"integer"},"whatsapp":{"type":"object","description":"The number on WhatsApp Business. `status` is null until WhatsApp is requested for it.","properties":{"status":{"type":["string","null"],"enum":["requested","pending","active","failed",null]},"display_name":{"type":["string","null"],"description":"The business name shown in WhatsApp, approved by Meta."},"calling":{"type":"boolean","description":"The assistant answers WhatsApp calls and can call people on WhatsApp through this number."},"ai_replies":{"type":"boolean","description":"The assistant answers WhatsApp messages to this number."},"activated_at":{"type":["string","null"],"format":"date-time"}}},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"WhatsAppProfile":{"type":"object","properties":{"object":{"type":"string","const":"whatsapp_profile"},"phone_number_id":{"type":"integer"},"display_name":{"type":"string"},"about":{"type":"string","maxLength":139},"description":{"type":"string","maxLength":512},"category":{"type":"string","enum":["OTHER","AUTO","BEAUTY","APPAREL","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GROCERY","GOVT","HOTEL","HEALTH","NONPROFIT","PROF_SERVICES","RETAIL","TRAVEL","RESTAURANT"]},"email":{"type":"string"},"website":{"type":"string"},"address":{"type":"string"},"profile_photo_url":{"type":["string","null"]}}},"WhatsAppProfileInput":{"type":"object","properties":{"display_name":{"type":"string","maxLength":120},"about":{"type":"string","maxLength":139},"description":{"type":"string","maxLength":512},"category":{"type":"string","enum":["OTHER","AUTO","BEAUTY","APPAREL","EDU","ENTERTAIN","EVENT_PLAN","FINANCE","GROCERY","GOVT","HOTEL","HEALTH","NONPROFIT","PROF_SERVICES","RETAIL","TRAVEL","RESTAURANT"]},"email":{"type":"string"},"website":{"type":"string","format":"uri"},"address":{"type":"string"},"photo_url":{"type":"string","format":"uri","description":"Public URL of a JPEG or PNG."},"photo_base64":{"type":"string","description":"The image itself, base64 (a data: URL is accepted)."}},"examples":[{"about":"Wood-fired pizza, open till late","category":"RESTAURANT","website":"https:\/\/example.com"}]},"PhoneNumberInput":{"type":"object","properties":{"assistant_id":{"type":["integer","null"]},"friendly_name":{"type":"string"}},"examples":[{"assistant_id":1}]},"Call":{"type":"object","properties":{"id":{"type":"integer","examples":[1042]},"object":{"type":"string","const":"call"},"direction":{"type":"string","enum":["inbound","outbound"]},"channel":{"type":"string","enum":["phone","whatsapp"],"description":"Where the call ran: the phone network or WhatsApp."},"status":{"type":"string","enum":["queued","ringing","in_progress","completed","busy","failed","no_answer","canceled"]},"outcome":{"type":["string","null"],"enum":["resolved","message_taken","transferred","appointment_booked","order_placed","reservation_booked","callback_requested","hung_up","voicemail","unknown",null]},"sentiment":{"type":["string","null"],"enum":["positive","neutral","negative",null]},"from":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"to":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"caller_name":{"type":["string","null"]},"assistant_id":{"type":["integer","null"]},"phone_number_id":{"type":["integer","null"]},"started_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"answered_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_seconds":{"type":"integer"},"billable_minutes":{"type":"integer"},"summary":{"type":["string","null"],"examples":["Sarah called to book a cleaning; booked Thursday 2:30 PM."]},"extracted":{"type":"object","description":"Variables collected during the call.","additionalProperties":true},"has_recording":{"type":"boolean"},"is_test":{"type":"boolean"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"CallFull":{"type":"object","properties":{"id":{"type":"integer","examples":[1042]},"object":{"type":"string","const":"call"},"direction":{"type":"string","enum":["inbound","outbound"]},"channel":{"type":"string","enum":["phone","whatsapp"],"description":"Where the call ran: the phone network or WhatsApp."},"status":{"type":"string","enum":["queued","ringing","in_progress","completed","busy","failed","no_answer","canceled"]},"outcome":{"type":["string","null"],"enum":["resolved","message_taken","transferred","appointment_booked","order_placed","reservation_booked","callback_requested","hung_up","voicemail","unknown",null]},"sentiment":{"type":["string","null"],"enum":["positive","neutral","negative",null]},"from":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"to":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"caller_name":{"type":["string","null"]},"assistant_id":{"type":["integer","null"]},"phone_number_id":{"type":["integer","null"]},"started_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"answered_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_seconds":{"type":"integer"},"billable_minutes":{"type":"integer"},"summary":{"type":["string","null"],"examples":["Sarah called to book a cleaning; booked Thursday 2:30 PM."]},"extracted":{"type":"object","description":"Variables collected during the call.","additionalProperties":true},"has_recording":{"type":"boolean"},"is_test":{"type":"boolean"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"metrics":{"type":"object","description":"Conversation shape: turns, interruptions.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true},"transcript":{"type":"array","items":{"$ref":"#\/components\/schemas\/Message"}}}},"OutboundCallInput":{"type":"object","required":["assistant_id","to"],"properties":{"assistant_id":{"type":"integer"},"to":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"from_phone_number_id":{"type":"integer","description":"Optional; defaults to the assistant's number."},"channel":{"type":"string","enum":["phone","whatsapp"],"description":"Optional; `phone` by default. `whatsapp` calls the person on WhatsApp from a number with WhatsApp calling, and needs their permission first."}},"examples":[{"assistant_id":1,"to":"+15551234567"}]},"Message":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool"]},"content":{"type":"string"},"spoken_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"Webhook":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"webhook"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"last_status":{"type":["integer","null"]},"last_triggered_at":{"type":["string","null"],"format":"date-time"},"failure_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"WebhookWithSecret":{"allOf":[{"$ref":"#\/components\/schemas\/Webhook"},{"type":"object","properties":{"secret":{"type":"string","description":"Shown once.","examples":["whsec_\u2026"]}}}]},"WebhookInput":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","description":"Must be https."},"events":{"type":"array","items":{"type":"string","enum":["call.started","call.ended","call.transferred","message.taken","appointment.booked","appointment.rescheduled","appointment.cancelled","order.created","order.updated","order.cancelled","reservation.created","reservation.updated","reservation.cancelled","campaign.completed"]}},"active":{"type":"boolean"}},"examples":[{"url":"https:\/\/example.com\/hooks\/ringhum","events":["call.ended","appointment.booked"]}]},"WebhookTestResult":{"type":"object","properties":{"delivered":{"type":"boolean"},"status":{"type":["integer","null"]}}},"Team":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"team"},"name":{"type":"string"},"slug":{"type":"string"},"timezone":{"type":"string"},"plan":{"type":"string","enum":["trial","solo","team","scale"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"Member":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"member"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"joined_at":{"type":["string","null"],"format":"date-time"}}},"ApiKeyIdentity":{"type":"object","properties":{"object":{"type":"string","const":"api_key"},"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write"]}},"created_by":{"$ref":"#\/components\/schemas\/Member"},"team":{"$ref":"#\/components\/schemas\/Team"}}},"Usage":{"type":"object","properties":{"object":{"type":"string","const":"usage"},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"end":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"plan":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"included_minutes":{"type":"integer"},"overage_per_minute":{"type":["number","null"]}}},"minutes_used":{"type":"integer"},"minutes_remaining":{"type":"integer"},"calls":{"type":"integer"},"completed_calls":{"type":"integer"},"assistants":{"type":"integer"},"phone_numbers":{"type":"integer"}}},"Voice":{"type":"object","properties":{"object":{"type":"string","const":"voice"},"id":{"type":"string"},"name":{"type":"string"},"gender":{"type":"string"},"language":{"type":"string"},"style":{"type":"string"}}},"Language":{"type":"object","properties":{"object":{"type":"string","const":"language"},"code":{"type":"string"},"name":{"type":"string"}}},"Event":{"type":"object","properties":{"object":{"type":"string","const":"event"},"name":{"type":"string"},"description":{"type":"string"}}},"Contact":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"contact"},"name":{"type":["string","null"]},"phone":{"type":["string","null"],"examples":["+14155550100"]},"email":{"type":["string","null"]},"company":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"do_not_call":{"type":"boolean"},"source":{"type":"string","enum":["call","import","manual","api","campaign"]},"calls_count":{"type":"integer"},"last_call_at":{"type":["string","null"],"format":"date-time"},"last_appointment_at":{"type":["string","null"],"format":"date-time"},"external_ids":{"type":"object","additionalProperties":true},"whatsapp_call_permission":{"type":"object","description":"Whether this person has allowed the business to call them on WhatsApp: for good, or until a date.","properties":{"permanent":{"type":"boolean"},"until":{"type":["string","null"],"format":"date-time"}}},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"ContactFull":{"allOf":[{"$ref":"#\/components\/schemas\/Contact"},{"type":"object","properties":{"notes":{"type":["string","null"]},"custom":{"type":"object","additionalProperties":true,"description":"Fields the assistant collected (extract variables)."}}}]},"ContactInput":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"email":{"type":"string","format":"email"},"company":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"},"custom":{"type":"object","additionalProperties":true},"do_not_call":{"type":"boolean"}},"examples":[{"name":"Jane Doe","phone":"+14155550100","tags":["lead"]}]},"ContactImportInput":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"type":"object","additionalProperties":true}},"tags":{"type":"array","items":{"type":"string"},"description":"Added to every imported contact."}},"examples":[{"contacts":[{"name":"Ann Lee","phone":"415-555-0101","plan":"gold"}],"tags":["recall-2026"]}]},"ImportResult":{"type":"object","properties":{"object":{"type":"string","const":"import_result"},"created":{"type":"integer"},"updated":{"type":"integer"},"skipped":{"type":"integer"}}},"Availability":{"type":"object","properties":{"object":{"type":"string","const":"availability"},"timezone":{"type":"string"},"duration_minutes":{"type":"integer"},"days":{"type":"object","description":"Date (YYYY-MM-DD) \u2192 list of slots.","additionalProperties":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"end":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"label":{"type":"string","examples":["9:00 AM"]}}}}}}},"Appointment":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"appointment"},"title":{"type":"string"},"status":{"type":"string","enum":["scheduled","confirmed","completed","cancelled","no_show"]},"starts_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"ends_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"timezone":{"type":"string"},"customer":{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}}},"contact_id":{"type":["integer","null"]},"service":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"duration_minutes":{"type":"integer"}}},"staff_member":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"location":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"address":{"type":["string","null"]}}},"call_id":{"type":["integer","null"]},"notes":{"type":["string","null"]},"source":{"type":"string","enum":["ai","manual","api"]},"confirmation_sent_at":{"type":["string","null"],"format":"date-time"},"cancelled_at":{"type":["string","null"],"format":"date-time"},"cancel_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"AppointmentInput":{"type":"object","required":["starts_at","customer_name"],"properties":{"starts_at":{"type":"string","format":"date-time","description":"Workspace timezone unless an offset is given."},"service_id":{"type":"integer"},"staff_member_id":{"type":"integer"},"location_id":{"type":"integer"},"title":{"type":"string"},"customer_name":{"type":"string"},"customer_phone":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"customer_email":{"type":"string","format":"email"},"notes":{"type":"string"},"contact_id":{"type":"integer"},"duration_minutes":{"type":"integer"},"notify":{"type":"boolean","default":true},"force":{"type":"boolean","default":false,"description":"Skip the availability check."}},"examples":[{"starts_at":"2026-09-21T10:00:00","service_id":1,"customer_name":"Jane Doe","customer_phone":"+14155550100"}]},"AppointmentUpdate":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","confirmed","completed","no_show"]},"notes":{"type":"string"},"title":{"type":"string"},"notify":{"type":"boolean"}},"examples":[{"status":"confirmed"}]},"ProductOption":{"type":"object","required":["name","choices"],"properties":{"name":{"type":"string","examples":["Size"]},"required":{"type":"boolean","description":"The caller must pick one."},"multiple":{"type":"boolean","description":"Several choices may be picked (extras)."},"choices":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","examples":["Large"]},"price":{"type":"number","description":"Surcharge on top of the product price.","examples":[2.5]},"price_cents":{"type":"integer","examples":[250]}}}}}},"Product":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"product"},"name":{"type":"string","examples":["Margherita"]},"description":{"type":["string","null"]},"category":{"type":["string","null"],"examples":["Pizza"]},"price":{"type":"number","examples":[9.5]},"price_cents":{"type":"integer","examples":[950]},"currency":{"type":"string","examples":["EUR"]},"options":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProductOption"}},"available":{"type":"boolean"},"sort_order":{"type":"integer"},"sku":{"type":["string","null"]},"external_ids":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"ProductInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"price":{"type":"number","description":"Decimal price; or send price_cents."},"price_cents":{"type":"integer"},"options":{"type":"array","items":{"$ref":"#\/components\/schemas\/ProductOption"}},"available":{"type":"boolean"},"sort_order":{"type":"integer"},"sku":{"type":"string"},"external_ids":{"type":"object","additionalProperties":true}},"examples":[{"name":"Margherita","category":"Pizza","price":9.5,"options":[{"name":"Size","required":true,"choices":[{"name":"Medium","price":0},{"name":"Large","price":2.5}]},{"name":"Extras","multiple":true,"choices":[{"name":"Extra cheese","price":1.5}]}]}]},"OrderItemInput":{"type":"object","properties":{"product_id":{"type":"integer","description":"Catalogue id; or send `product` by name."},"product":{"type":"string","description":"Product name or SKU, matched against the catalogue.","examples":["Margherita"]},"quantity":{"type":"integer","minimum":1,"maximum":50,"default":1},"options":{"type":"array","items":{"type":"string"},"description":"Choice names, e.g. [\"Large\", \"Extra cheese\"]."},"notes":{"type":"string","maxLength":200}}},"OrderLine":{"type":"object","properties":{"product_id":{"type":["integer","null"]},"sku":{"type":["string","null"]},"name":{"type":"string"},"quantity":{"type":"integer"},"unit_price":{"type":"number"},"unit_price_cents":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"group":{"type":["string","null"]},"name":{"type":"string"},"price":{"type":"number"},"price_cents":{"type":"integer"}}}},"notes":{"type":["string","null"]},"total":{"type":"number"},"total_cents":{"type":"integer"}}},"OrderQuoteInput":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":40,"items":{"$ref":"#\/components\/schemas\/OrderItemInput"}},"fulfillment":{"type":"string","enum":["pickup","delivery","dine_in"]}},"examples":[{"items":[{"product":"Margherita","quantity":2,"options":["Large"]}],"fulfillment":"delivery"}]},"OrderQuote":{"type":"object","properties":{"object":{"type":"string","const":"order_quote"},"ok":{"type":"boolean","description":"False when `problems` is not empty."},"fulfillment":{"type":"string"},"currency":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrderLine"}},"subtotal":{"type":"number"},"subtotal_cents":{"type":"integer"},"fee":{"type":"number"},"fee_cents":{"type":"integer"},"total":{"type":"number"},"total_cents":{"type":"integer"},"problems":{"type":"array","items":{"type":"string"}}}},"OrderInput":{"type":"object","required":["items","customer_name"],"properties":{"items":{"type":"array","minItems":1,"maxItems":40,"items":{"$ref":"#\/components\/schemas\/OrderItemInput"}},"fulfillment":{"type":"string","enum":["pickup","delivery","dine_in"],"description":"Defaults to the first mode the workspace offers."},"customer_name":{"type":"string"},"customer_phone":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"customer_email":{"type":"string","format":"email"},"address":{"type":"string","description":"Required for delivery."},"requested_for":{"type":"string","format":"date-time","description":"Omit for as soon as possible. Workspace time zone when no offset is given."},"notes":{"type":"string"},"contact_id":{"type":"integer"},"notify":{"type":"boolean","default":true},"skip_rules":{"type":"boolean","default":false,"description":"Accept the order outside opening hours, below the minimum or for a fulfillment mode that is switched off."}},"examples":[{"items":[{"product":"Margherita","quantity":2,"options":["Large"]},{"product_id":12}],"fulfillment":"delivery","customer_name":"Jordan Blake","customer_phone":"+14155550142","address":"12 Harbour Street","notes":"Ring twice"}]},"OrderUpdate":{"type":"object","properties":{"status":{"type":"string","enum":["new","confirmed","preparing","ready","out_for_delivery","completed"]},"notes":{"type":["string","null"]},"requested_for":{"type":["string","null"],"format":"date-time"},"notify":{"type":"boolean","default":true}},"examples":[{"status":"ready"}]},"Order":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"order"},"number":{"type":"integer","examples":[1042]},"reference":{"type":"string","examples":["#1042"]},"status":{"type":"string","enum":["new","confirmed","preparing","ready","out_for_delivery","completed","cancelled"]},"fulfillment":{"type":"string","enum":["pickup","delivery","dine_in"]},"customer":{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}}},"address":{"type":["string","null"]},"requested_for":{"type":["string","null"],"format":"date-time"},"notes":{"type":["string","null"]},"items":{"type":"array","items":{"$ref":"#\/components\/schemas\/OrderLine"}},"currency":{"type":"string","examples":["EUR"]},"subtotal":{"type":"number"},"subtotal_cents":{"type":"integer"},"fee":{"type":"number"},"fee_cents":{"type":"integer"},"total":{"type":"number"},"total_cents":{"type":"integer"},"source":{"type":"string","enum":["ai","manual","api"]},"contact_id":{"type":["integer","null"]},"call_id":{"type":["integer","null"]},"assistant_id":{"type":["integer","null"]},"external_ids":{"type":"object","additionalProperties":true,"description":"Ids in connected shops and POS systems."},"confirmed_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"cancelled_at":{"type":["string","null"],"format":"date-time"},"cancel_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"Reservation":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"reservation"},"number":{"type":"integer","examples":[1017]},"reference":{"type":"string","examples":["#1017"]},"status":{"type":"string","enum":["requested","confirmed","checked_in","checked_out","cancelled","no_show"]},"room":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"category":{"type":["string","null"]}}},"room_id":{"type":["integer","null"]},"check_in":{"type":"string","format":"date","examples":["2026-10-03"]},"check_out":{"type":"string","format":"date","examples":["2026-10-06"]},"nights":{"type":"integer"},"adults":{"type":"integer"},"children":{"type":"integer"},"guest":{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}}},"notes":{"type":["string","null"]},"currency":{"type":"string","examples":["EUR"]},"nightly":{"type":"number"},"nightly_cents":{"type":"integer"},"total":{"type":"number"},"total_cents":{"type":"integer"},"source":{"type":"string","enum":["ai","manual","api","ical"]},"external_source":{"type":["string","null"],"enum":["booking.com","airbnb","vrbo","other",null],"description":"Which channel an imported block came from."},"external_uid":{"type":["string","null"]},"contact_id":{"type":["integer","null"]},"call_id":{"type":["integer","null"]},"assistant_id":{"type":["integer","null"]},"external_ids":{"type":"object","additionalProperties":true},"confirmed_at":{"type":["string","null"],"format":"date-time"},"cancelled_at":{"type":["string","null"],"format":"date-time"},"cancel_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"ReservationInput":{"type":"object","required":["check_in","check_out","guest_name"],"properties":{"room_id":{"type":"integer","description":"Room type id; or send `room` by name."},"room":{"type":"string","examples":["Sea-view double"]},"check_in":{"type":"string","format":"date"},"check_out":{"type":"string","format":"date"},"adults":{"type":"integer","default":1},"children":{"type":"integer","default":0},"guest_name":{"type":"string"},"guest_phone":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"guest_email":{"type":"string","format":"email"},"notes":{"type":"string"},"contact_id":{"type":"integer"},"notify":{"type":"boolean","default":true},"skip_rules":{"type":"boolean","default":false,"description":"Accept a stay outside the minimum \/ maximum nights or starting in the past."}},"examples":[{"room":"Sea-view double","check_in":"2026-10-03","check_out":"2026-10-06","adults":2,"children":1,"guest_name":"Jordan Blake","guest_phone":"+14155550142","guest_email":"jordan@example.com","notes":"Late arrival"}]},"ReservationUpdate":{"type":"object","properties":{"status":{"type":"string","enum":["requested","confirmed","checked_in","checked_out","no_show"]},"guest_name":{"type":"string"},"guest_phone":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"guest_email":{"type":["string","null"],"format":"email"},"adults":{"type":"integer"},"children":{"type":"integer"},"notes":{"type":["string","null"]},"notify":{"type":"boolean","default":true}},"examples":[{"status":"checked_in"}]},"RoomAvailability":{"type":"object","properties":{"object":{"type":"string","const":"availability"},"check_in":{"type":"string","format":"date"},"check_out":{"type":"string","format":"date"},"nights":{"type":"integer"},"currency":{"type":"string"},"rooms":{"type":"array","items":{"type":"object","properties":{"room_id":{"type":"integer"},"name":{"type":"string"},"category":{"type":["string","null"]},"quantity":{"type":"integer"},"free":{"type":"integer","description":"Units not taken on any of the nights."},"fits":{"type":"boolean","description":"Whether the party fits the room's capacity."},"capacity_adults":{"type":"integer"},"capacity_children":{"type":"integer"},"nightly":{"type":"number","description":"Average per night for the stay."},"nightly_cents":{"type":"integer"},"total":{"type":"number"},"total_cents":{"type":"integer"}}}}}},"SeasonalRate":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date","description":"Inclusive: the last night the rate applies to."},"price":{"type":"number","examples":[120]},"price_cents":{"type":"integer","examples":[12000]}}},"Room":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"room"},"name":{"type":"string","examples":["Sea-view double"]},"description":{"type":["string","null"]},"category":{"type":["string","null"],"examples":["Double room"]},"capacity_adults":{"type":"integer"},"capacity_children":{"type":"integer"},"quantity":{"type":"integer","description":"Identical units of this type."},"price":{"type":"number","examples":[95]},"price_cents":{"type":"integer","examples":[9500]},"currency":{"type":"string","examples":["EUR"]},"seasonal_rates":{"type":"array","items":{"$ref":"#\/components\/schemas\/SeasonalRate"}},"amenities":{"type":"array","items":{"type":"string"}},"ical_import_urls":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"ical_export_url":{"type":["string","null"],"format":"uri","description":"Feed to paste into Booking.com \/ Airbnb \/ VRBO \"import calendar\"."},"ical_synced_at":{"type":["string","null"],"format":"date-time"},"ical_error":{"type":["string","null"]},"available":{"type":"boolean"},"sort_order":{"type":"integer"},"external_ids":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"RoomInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"capacity_adults":{"type":"integer","default":2},"capacity_children":{"type":"integer","default":0},"quantity":{"type":"integer","default":1},"price":{"type":"number","description":"Decimal nightly price; or send price_cents."},"price_cents":{"type":"integer"},"seasonal_rates":{"type":"array","items":{"$ref":"#\/components\/schemas\/SeasonalRate"}},"amenities":{"type":"array","items":{"type":"string"}},"ical_import_urls":{"type":"array","items":{"type":"object","required":["url"],"properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"available":{"type":"boolean"},"sort_order":{"type":"integer"},"external_ids":{"type":"object","additionalProperties":true}},"examples":[{"name":"Sea-view double","category":"Double room","capacity_adults":2,"capacity_children":1,"quantity":4,"price":95,"seasonal_rates":[{"from":"2026-07-01","to":"2026-08-31","price":140}],"amenities":["Wi-Fi","Balcony","Sea view"]}]},"TextMessage":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"message"},"channel":{"type":"string","enum":["sms","whatsapp"]},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["queued","sent","delivered","failed","received"]},"from":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"to":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"body":{"type":"string"},"media":{"type":"array","description":"Attachments received on WhatsApp (images, documents, audio).","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"content_type":{"type":"string"}}}},"sender_name":{"type":["string","null"],"description":"The WhatsApp profile name of an inbound sender."},"contact_id":{"type":["integer","null"]},"call_id":{"type":["integer","null"]},"appointment_id":{"type":["integer","null"]},"purpose":{"type":["string","null"],"description":"Why it was sent: confirmation, reminder, ai_reply, missed_call, api\u2026"},"ai_generated":{"type":"boolean"},"error":{"type":["string","null"]},"cost_cents":{"type":"integer"},"sent_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"TextMessageInput":{"type":"object","required":["to","body"],"properties":{"to":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"body":{"type":"string","maxLength":1500},"channel":{"type":"string","enum":["auto","whatsapp","sms"],"description":"Optional; `auto` by default (WhatsApp inside the 24-hour window, otherwise SMS)."},"contact_id":{"type":"integer","description":"Optional; links the message to a contact."}},"examples":[{"to":"+15551234567","body":"Your appointment is confirmed for Tuesday at 10:00.","channel":"auto"}]},"InboxItem":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"inbox_item"},"type":{"type":"string","enum":["message","callback","lead","voicemail","sms"]},"title":{"type":"string"},"body":{"type":["string","null"]},"status":{"type":"string","enum":["open","in_progress","done"]},"priority":{"type":"string","enum":["normal","high"]},"contact_id":{"type":["integer","null"]},"call_id":{"type":["integer","null"]},"assigned_to":{"type":["integer","null"]},"due_at":{"type":["string","null"],"format":"date-time"},"done_at":{"type":["string","null"],"format":"date-time"},"meta":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"InboxUpdate":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","done"]},"priority":{"type":"string","enum":["normal","high"]},"assigned_to":{"type":["integer","null"]}},"examples":[{"status":"done"}]},"Campaign":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"campaign"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","cancelled"]},"assistant_id":{"type":"integer"},"phone_number_id":{"type":["integer","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"window":{"type":"object","properties":{"start":{"type":"string","examples":["09:00"]},"end":{"type":"string","examples":["18:00"]},"days":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"}}},"concurrency":{"type":"integer"},"max_attempts":{"type":"integer"},"retry_minutes":{"type":"integer"},"instructions":{"type":["string","null"]},"progress":{"type":"object","properties":{"total":{"type":"integer"},"pending":{"type":"integer"},"completed":{"type":"integer"},"no_answer":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"}}},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"CampaignInput":{"type":"object","required":["name","assistant_id"],"properties":{"name":{"type":"string"},"assistant_id":{"type":"integer"},"phone_number_id":{"type":"integer"},"description":{"type":"string"},"instructions":{"type":"string","description":"Extra prompt for these calls only."},"starts_at":{"type":"string","format":"date-time"},"window_start":{"type":"string","default":"09:00"},"window_end":{"type":"string","default":"18:00"},"days":{"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"timezone":{"type":"string"},"concurrency":{"type":"integer","default":2},"max_attempts":{"type":"integer","default":2},"retry_minutes":{"type":"integer","default":60},"contact_ids":{"type":"array","items":{"type":"integer"}},"tag":{"type":"string","description":"Add every contact with this tag."}},"examples":[{"name":"Recall reminders","assistant_id":1,"tag":"recall-2026","window_start":"10:00","window_end":"16:00"}]},"CampaignContactsInput":{"type":"object","required":["contact_ids"],"properties":{"contact_ids":{"type":"array","items":{"type":"integer"}}},"examples":[{"contact_ids":[12,14]}]},"CampaignAddResult":{"type":"object","properties":{"object":{"type":"string","const":"campaign_contacts"},"added":{"type":"integer"},"campaign":{"$ref":"#\/components\/schemas\/Campaign"}}},"CampaignTransition":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["start","pause","cancel"]}},"examples":[{"action":"start"}]},"CampaignContact":{"type":"object","properties":{"object":{"type":"string","const":"campaign_contact"},"contact":{"$ref":"#\/components\/schemas\/Contact"},"status":{"type":"string","enum":["pending","calling","completed","no_answer","failed","skipped","dnc"]},"outcome":{"type":["string","null"]},"attempts":{"type":"integer"},"last_call_id":{"type":["integer","null"]},"last_attempt_at":{"type":["string","null"],"format":"date-time"},"next_attempt_at":{"type":["string","null"],"format":"date-time"}}},"Service":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"service"},"name":{"type":"string"},"description":{"type":["string","null"]},"price_cents":{"type":["integer","null"]},"duration_minutes":{"type":"integer"},"bookable":{"type":"boolean"},"active":{"type":"boolean"}}},"ServiceInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"price_cents":{"type":"integer"},"duration_minutes":{"type":"integer","default":30},"bookable":{"type":"boolean"},"active":{"type":"boolean"}},"examples":[{"name":"Teeth cleaning","price_cents":9500,"duration_minutes":45}]},"Faq":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"faq"},"question":{"type":"string"},"answer":{"type":"string"},"active":{"type":"boolean"}}},"FaqInput":{"type":"object","required":["question","answer"],"properties":{"question":{"type":"string"},"answer":{"type":"string"},"active":{"type":"boolean"}},"examples":[{"question":"Do you accept insurance?","answer":"Yes, most PPO plans."}]},"StaffMember":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"staff_member"},"name":{"type":"string"},"role":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"transferable":{"type":"boolean"},"bookable":{"type":"boolean"},"active":{"type":"boolean"}}},"StaffInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string","description":"E.164 phone number","examples":["+14155550132"]},"email":{"type":"string","format":"email"},"transferable":{"type":"boolean"},"bookable":{"type":"boolean"},"working_hours":{"type":["object","null"],"additionalProperties":true}},"examples":[{"name":"Dr. Amanda Reyes","role":"Dentist","phone":"+17185550124","bookable":true}]},"Business":{"type":"object","properties":{"object":{"type":"string","const":"business"},"name":{"type":"string"},"industry":{"type":["string","null"]},"description":{"type":["string","null"]},"website":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"type":"object","properties":{"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}}},"timezone":{"type":"string"},"opening_hours":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"examples":[{"mon":[["09:00","17:00"]],"sat":[]}]},"holidays":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"name":{"type":"string"}}}},"booking_rules":{"type":"object","properties":{"slot_minutes":{"type":"integer"},"buffer_minutes":{"type":"integer"},"lead_time_hours":{"type":"integer"},"horizon_days":{"type":"integer"},"allow_same_day":{"type":"boolean"}}},"policies":{"type":["string","null"]},"ai_summary":{"type":["string","null"]},"services":{"type":"array","items":{"$ref":"#\/components\/schemas\/Service"}},"faqs":{"type":"array","items":{"$ref":"#\/components\/schemas\/Faq"}},"staff":{"type":"array","items":{"$ref":"#\/components\/schemas\/StaffMember"}},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"address":{"type":["string","null"]},"phone":{"type":["string","null"]},"is_primary":{"type":"boolean"}}}}}},"BusinessInput":{"type":"object","properties":{"name":{"type":"string"},"industry":{"type":"string","enum":["dental","medical","veterinary","legal","real_estate","home_services","automotive","beauty","fitness","hospitality","restaurant","retail","insurance","finance","education","agency","software","logistics","nonprofit","other"]},"description":{"type":"string"},"website":{"type":"string","format":"uri"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},"timezone":{"type":"string"},"opening_hours":{"type":"object","additionalProperties":true},"holidays":{"type":"array","items":{"type":"object"}},"booking_rules":{"type":"object","additionalProperties":true},"policies":{"type":"string"},"ai_summary":{"type":"string"}},"examples":[{"name":"Northside Dental Group","industry":"dental","opening_hours":{"mon":[["08:00","18:00"]]}}]},"KnowledgeDocument":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"knowledge_document"},"title":{"type":"string"},"source_type":{"type":"string","enum":["text","url","file"]},"source":{"type":["string","null"]},"assistant_id":{"type":["integer","null"]},"status":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":["string","null"]},"chunks_count":{"type":"integer"},"bytes":{"type":["integer","null"]},"embedded":{"type":"boolean"},"auto_sync":{"type":"boolean"},"last_synced_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]}}},"KnowledgeInput":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"url":{"type":"string","format":"uri"},"assistant_id":{"type":["integer","null"],"description":"Restrict to one assistant; omit for all."},"auto_sync":{"type":"boolean","description":"Re-fetch the URL weekly."}},"examples":[{"title":"Price list","content":"Teeth cleaning: $95\u2026"}]},"KnowledgeSearch":{"type":"object","properties":{"object":{"type":"string","const":"knowledge_search"},"query":{"type":"string"},"faqs":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"score":{"type":"number"}}}},"results":{"type":"array","items":{"type":"object","properties":{"document":{"type":"string"},"document_id":{"type":"integer"},"content":{"type":"string"},"score":{"type":"number"}}}}}},"Deleted":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string"},"deleted":{"type":"boolean","const":true}}},"Pagination":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"next_page_url":{"type":["string","null"]},"prev_page_url":{"type":["string","null"]}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","not_found","validation_error","plan_limit","rate_limit_error","feature_disabled","invalid_state"]},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"WebhookDelivery":{"type":"object","description":"Body of every webhook POST.","properties":{"id":{"type":"string","examples":["evt_8f2k\u2026"]},"type":{"type":"string","examples":["call.ended"]},"created_at":{"type":"string","format":"date-time","examples":["2026-09-13T14:02:11+00:00"]},"data":{"type":"object","additionalProperties":true}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"authentication_error","message":"Invalid or missing API key. Send it as: Authorization: Bearer <key>."}}}}},"Forbidden":{"description":"The key lacks the required scope.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"permission_error","message":"This API key does not have the 'write' scope."}}}}},"NotFound":{"description":"No such resource in this workspace.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"not_found","message":"No call with that id in this workspace."}}}}},"ValidationError":{"description":"The request body or query failed validation.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"validation_error","message":"The to field format is invalid.","errors":{"to":["Use E.164 format, e.g. +15551234567."]}}}}}},"RateLimited":{"description":"More than 120 requests in a minute.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":{"type":"rate_limit_error","message":"Too many requests. Retry after the number of seconds in the Retry-After header."}}}}}},"parameters":{"perPage":{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Items per page."},"page":{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number."}}}}