{"openapi":"3.1.0","info":{"title":"Kintara API","version":"1.0.0","description":"REST API for Kintara, the AI voice receptionist and outbound calling platform: read calls, contacts, appointments and leads, create contacts and leads, and subscribe to events with signed webhooks. Agency keys act on any of their sub-accounts by naming it with the Kintara-Organization header or the organization_id query parameter.\n\nVersioning: the major version is in the URL path (/api/v1) and echoed in the Kintara-Api-Version response header. Additive changes (new fields, endpoints, optional parameters, webhook event types) ship in place; breaking changes only ship as a new major version. Deprecated versions send Deprecation, Sunset and Link headers and stay available for at least 180 days after deprecation. GET /api/versions lists the versions and their status.","x-api-version":"v1","contact":{"name":"Kintara","url":"https://kintara-j2gv.vercel.app/developers"}},"servers":[{"url":"https://kintara-j2gv.vercel.app/api/v1"}],"tags":[{"name":"Account","description":"The API key itself."},{"name":"Organizations","description":"Sub-accounts (an agency's clients)."},{"name":"Calls","description":"Inbound and outbound phone calls, with transcripts."},{"name":"Contacts","description":"People and businesses in the CRM."},{"name":"Appointments","description":"Booked appointments."},{"name":"Leads","description":"Leads and their pipeline status."},{"name":"Webhooks","description":"Signed event delivery, REST hooks for Zapier and Make."}],"paths":{"/me":{"get":{"operationId":"getMe","summary":"The API key: its owner, scopes and rate limit","tags":["Account"],"x-kintara-scope":null,"x-kintara-organization":"optional","responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}]}},"/organizations":{"get":{"operationId":"listOrganizations","summary":"List sub-accounts","description":"An agency key lists its sub-accounts; a sub-account key gets its own organization.","tags":["Organizations"],"x-kintara-scope":"organizations:read","x-kintara-organization":"none","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100 (default 25).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","description":"`next_cursor` from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["organizations:read"]}]}},"/organizations/{id}":{"get":{"operationId":"getOrganization","summary":"Get a sub-account","tags":["Organizations"],"x-kintara-scope":"organizations:read","x-kintara-organization":"none","parameters":[{"name":"id","in":"path","required":true,"description":"The organization id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["organizations:read"]}]}},"/calls":{"get":{"operationId":"listCalls","summary":"List calls","tags":["Calls"],"x-kintara-scope":"calls:read","x-kintara-organization":"required","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100 (default 25).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","description":"`next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"since","in":"query","description":"Only calls created at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","description":"Only calls created before this time (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","description":"Only calls with this status; comma-separate several.","schema":{"type":"string","examples":["queued,ringing"],"x-enum":["queued","ringing","in_progress","completed","busy","no_answer","failed","canceled","voicemail"]}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["calls:read"]}]}},"/calls/{id}":{"get":{"operationId":"getCall","summary":"Get a call with its transcript and extracted data","tags":["Calls"],"x-kintara-scope":"calls:read","x-kintara-organization":"required","parameters":[{"name":"id","in":"path","required":true,"description":"The call id.","schema":{"type":"string","format":"uuid"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["calls:read"]}]}},"/contacts":{"get":{"operationId":"listContacts","summary":"List contacts","tags":["Contacts"],"x-kintara-scope":"contacts:read","x-kintara-organization":"required","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100 (default 25).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","description":"`next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"q","in":"query","description":"Search name, phone, email or company.","schema":{"type":"string","maxLength":200}},{"name":"phone","in":"query","description":"Exact phone match (normalized to E.164).","schema":{"type":"string"}},{"name":"email","in":"query","description":"Exact email match.","schema":{"type":"string","format":"email"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["contacts:read"]}]},"post":{"operationId":"createContact","summary":"Create a contact (or match an existing one)","description":"Returns 201 with a new contact, or 200 with the existing contact that has the same phone or email.","tags":["Contacts"],"x-kintara-scope":"contacts:write","x-kintara-organization":"required","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}},"responses":{"200":{"description":"Matched an existing contact","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"201":{"description":"Created","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["contacts:write"]}],"parameters":[{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}]}},"/contacts/{id}":{"get":{"operationId":"getContact","summary":"Get a contact","tags":["Contacts"],"x-kintara-scope":"contacts:read","x-kintara-organization":"required","parameters":[{"name":"id","in":"path","required":true,"description":"The contact id.","schema":{"type":"string","format":"uuid"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["contacts:read"]}]},"patch":{"operationId":"updateContact","summary":"Update a contact","description":"Only the fields sent change; send null to clear a field.","tags":["Contacts"],"x-kintara-scope":"contacts:write","x-kintara-organization":"required","parameters":[{"name":"id","in":"path","required":true,"description":"The contact id.","schema":{"type":"string","format":"uuid"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}},"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["contacts:write"]}]}},"/appointments":{"get":{"operationId":"listAppointments","summary":"List appointments","tags":["Appointments"],"x-kintara-scope":"appointments:read","x-kintara-organization":"required","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100 (default 25).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","description":"`next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"since","in":"query","description":"Only appointments starting at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","description":"Only appointments starting before this time (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","description":"Only appointments with this status; comma-separate several.","schema":{"type":"string","examples":["scheduled,confirmed"],"x-enum":["scheduled","confirmed","completed","canceled","no_show","rescheduled"]}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Appointment"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["appointments:read"]}]}},"/leads":{"get":{"operationId":"listLeads","summary":"List leads","tags":["Leads"],"x-kintara-scope":"leads:read","x-kintara-organization":"required","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100 (default 25).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","description":"`next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only leads with this status; comma-separate several.","schema":{"type":"string","examples":["new,contacted"],"x-enum":["new","contacted","qualified","appointment_booked","won","lost","unresponsive"]}},{"name":"source","in":"query","description":"Only leads with this source; comma-separate several.","schema":{"type":"string","examples":["inbound_call,web_form"],"x-enum":["inbound_call","web_form","meta_lead_ad","sms","email","referral","import","campaign","manual","other"]}},{"name":"since","in":"query","description":"Only leads created at or after this time (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","description":"Only leads created before this time (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["leads:read"]}]},"post":{"operationId":"createLead","summary":"Create a lead","description":"Matches or creates the contact, then runs the same follow-ups as a lead made in the app: activity, lead.created event, nurture workflows and CRM sync.","tags":["Leads"],"x-kintara-scope":"leads:write","x-kintara-organization":"required","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadInput"}}}},"responses":{"201":{"description":"Created","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["leads:write"]}],"parameters":[{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}]}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"List webhook endpoints","description":"The organization's endpoints, or the agency's own when an agency key names no organization.","tags":["Webhooks"],"x-kintara-scope":"webhooks:manage","x-kintara-organization":"optional","responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["webhooks:manage"]}],"parameters":[{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}]},"post":{"operationId":"createWebhook","summary":"Subscribe a URL to events","description":"Also the Zapier / Make REST hook subscribe call. The response carries the signing secret, shown only once.","tags":["Webhooks"],"x-kintara-scope":"webhooks:manage","x-kintara-organization":"optional","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointInput"}}}},"responses":{"201":{"description":"Created","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["webhooks:manage"]}],"parameters":[{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}]}},"/webhooks/{id}":{"get":{"operationId":"getWebhook","summary":"Get a webhook endpoint","tags":["Webhooks"],"x-kintara-scope":"webhooks:manage","x-kintara-organization":"optional","parameters":[{"name":"id","in":"path","required":true,"description":"The webhook endpoint id.","schema":{"type":"string","format":"uuid"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["webhooks:manage"]}]},"delete":{"operationId":"deleteWebhook","summary":"Unsubscribe (delete a webhook endpoint)","description":"Also the Zapier / Make REST hook unsubscribe call.","tags":["Webhooks"],"x-kintara-scope":"webhooks:manage","x-kintara-organization":"optional","parameters":[{"name":"id","in":"path","required":true,"description":"The webhook endpoint id.","schema":{"type":"string","format":"uuid"}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"const":true}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["webhooks:manage"]}]}},"/events":{"get":{"operationId":"listEvents","summary":"Recent events in the webhook payload shape","description":"The polling and sample endpoint for Zapier / Make. With `sample=1` and no real events yet it returns realistic sample payloads.","tags":["Webhooks"],"x-kintara-scope":"webhooks:manage","x-kintara-organization":"required","parameters":[{"name":"limit","in":"query","description":"Page size, 1 to 100 (default 25).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","description":"`next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Only events with this type; comma-separate several.","schema":{"type":"string","examples":["call.completed,lead.created"],"x-enum":["call.completed","lead.created","appointment.booked","appointment.cancelled","message.received","integration.status_changed","integration.records.booking.confirmed","integration.records.booking.failed","integration.records.appointment.cancelled","integration.records.appointment.completed","integration.records.appointment.no_show","integration.records.patient.updated","intake.completed"]}},{"name":"sample","in":"query","description":"1 or true: return sample payloads when there are no real events yet.","schema":{"type":"string","enum":["1","true"]}},{"name":"Kintara-Organization","in":"header","description":"Sub-account id. Agency keys name the organization to act on (or use organization_id).","schema":{"type":"string","format":"uuid"}},{"name":"organization_id","in":"query","description":"Sub-account id, instead of the Kintara-Organization header.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookPayload"}},"has_more":{"type":"boolean","description":"True when another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":["webhooks:manage"]}]}},"/event-types":{"get":{"operationId":"listEventTypes","summary":"Event types a webhook can subscribe to","tags":["Webhooks"],"x-kintara-scope":null,"x-kintara-organization":"none","responses":{"200":{"description":"OK","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"parameters":[]}}},"webhooks":{"call.completed":{"post":{"operationId":"webhook_call_completed","summary":"call.completed","description":"A phone call (inbound or outbound) has ended.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"call.completed"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"lead.created":{"post":{"operationId":"webhook_lead_created","summary":"lead.created","description":"A new lead was captured.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"lead.created"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"appointment.booked":{"post":{"operationId":"webhook_appointment_booked","summary":"appointment.booked","description":"An appointment was booked.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"appointment.booked"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"appointment.cancelled":{"post":{"operationId":"webhook_appointment_cancelled","summary":"appointment.cancelled","description":"An appointment was cancelled.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"appointment.cancelled"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"message.received":{"post":{"operationId":"webhook_message_received","summary":"message.received","description":"A text or other message was received.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"message.received"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.status_changed":{"post":{"operationId":"webhook_integration_status_changed","summary":"integration.status_changed","description":"An integration connection changed status (for example needs reconnecting).","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.status_changed"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.records.booking.confirmed":{"post":{"operationId":"webhook_integration_records_booking_confirmed","summary":"integration.records.booking.confirmed","description":"A booking in the connected practice system was confirmed.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.records.booking.confirmed"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.records.booking.failed":{"post":{"operationId":"webhook_integration_records_booking_failed","summary":"integration.records.booking.failed","description":"A booking in the connected practice system failed.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.records.booking.failed"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.records.appointment.cancelled":{"post":{"operationId":"webhook_integration_records_appointment_cancelled","summary":"integration.records.appointment.cancelled","description":"An appointment was cancelled in the connected practice system.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.records.appointment.cancelled"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.records.appointment.completed":{"post":{"operationId":"webhook_integration_records_appointment_completed","summary":"integration.records.appointment.completed","description":"An appointment was completed in the connected practice system.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.records.appointment.completed"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.records.appointment.no_show":{"post":{"operationId":"webhook_integration_records_appointment_no_show","summary":"integration.records.appointment.no_show","description":"A patient did not show up, per the connected practice system.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.records.appointment.no_show"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"integration.records.patient.updated":{"post":{"operationId":"webhook_integration_records_patient_updated","summary":"integration.records.patient.updated","description":"A patient was updated in the connected practice system.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"integration.records.patient.updated"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}},"intake.completed":{"post":{"operationId":"webhook_intake_completed","summary":"intake.completed","description":"A patient completed an intake form.","parameters":[{"$ref":"#/components/parameters/X-Kintara-Signature"},{"$ref":"#/components/parameters/X-Kintara-Timestamp"},{"$ref":"#/components/parameters/X-Kintara-Event"},{"$ref":"#/components/parameters/X-Kintara-Delivery"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookPayload"},{"type":"object","properties":{"type":{"const":"intake.completed"}}}]}}}},"responses":{"410":{"description":"Gone: the endpoint is disabled (unsubscribed) and gets no more deliveries."},"2XX":{"description":"Delivered."},"default":{"description":"Any other answer or a timeout (10 s) is retried with backoff."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from Settings → Developers (or the agency's Developers page), sent as `Authorization: Bearer <key>`. Scopes: `organizations:read` (View sub-accounts), `calls:read` (Read calls, transcripts and summaries), `contacts:read` (Read contacts), `contacts:write` (Create and update contacts), `appointments:read` (Read appointments), `leads:read` (Read leads), `leads:write` (Create and update leads), `webhooks:manage` (Manage webhook endpoints).","x-scopes":{"organizations:read":"View sub-accounts","calls:read":"Read calls, transcripts and summaries","contacts:read":"Read contacts","contacts:write":"Create and update contacts","appointments:read":"Read appointments","leads:read":"Read leads","leads:write":"Create and update leads","webhooks:manage":"Manage webhook endpoints"}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable code, e.g. unauthorized, forbidden, insufficient_scope, organization_required, invalid_request, invalid_parameter, not_found, rate_limited, server_error."},"message":{"type":"string","description":"Human-readable explanation."},"details":{"description":"Extra context, e.g. `{ \"param\": \"limit\" }`."}}}}},"Me":{"type":"object","properties":{"key_id":{"type":"string","format":"uuid"},"owner_type":{"type":"string","enum":["agency","organization"]},"partner_id":{"type":["string","null"],"format":"uuid"},"organization_id":{"type":["string","null"],"format":"uuid"},"scopes":{"type":"array","items":{"type":"string","enum":["organizations:read","calls:read","contacts:read","contacts:write","appointments:read","leads:read","leads:write","webhooks:manage"]}},"rate_limit":{"type":"object","properties":{"limit":{"type":"integer"},"remaining":{"type":"integer"},"reset_at":{"type":"string","format":"date-time"}}}}},"Organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"industry":{"type":["string","null"]},"timezone":{"type":["string","null"]},"status":{"type":["string","null"]},"logo_url":{"type":["string","null"]},"agency_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"Call":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"direction":{"type":["string","null"],"enum":["inbound","outbound",null]},"status":{"type":["string","null"],"enum":["queued","ringing","in_progress","completed","busy","no_answer","failed","canceled","voicemail",null]},"from":{"type":["string","null"],"description":"Caller number, E.164."},"to":{"type":["string","null"],"description":"Called number, E.164."},"contact_id":{"type":["string","null"],"format":"uuid"},"lead_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"],"format":"uuid"},"campaign_id":{"type":["string","null"],"format":"uuid"},"handled_by":{"type":["string","null"]},"transferred_to":{"type":["string","null"]},"transfer_outcome":{"type":["string","null"]},"started_at":{"type":["string","null"],"format":"date-time"},"answered_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_seconds":{"type":["integer","null"]},"end_reason":{"type":["string","null"]},"outcome":{"type":["string","null"]},"outcome_notes":{"type":["string","null"]},"summary":{"type":["string","null"],"description":"AI summary of the call."},"sentiment":{"type":["string","null"]},"is_emergency":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"CallDetail":{"allOf":[{"$ref":"#/components/schemas/Call"},{"type":"object","properties":{"extracted_data":{"type":"object","description":"Structured data the AI captured on the call."},"success_evaluation":{"type":["object","null"]},"transcript":{"type":["object","null"],"properties":{"text":{"type":["string","null"]},"language":{"type":["string","null"]},"redacted":{"type":"boolean"},"segments":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string"},"text":{"type":"string"},"start_ms":{"type":"integer"},"end_ms":{"type":"integer"}}}}}}}}]},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"name":{"type":["string","null"],"description":"Display name."},"company_name":{"type":["string","null"]},"phone":{"type":["string","null"],"description":"E.164."},"secondary_phone":{"type":["string","null"]},"email":{"type":["string","null"]},"timezone":{"type":["string","null"]},"preferred_language":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":["string","null"]},"sms_opt_out":{"type":"boolean"},"email_opt_out":{"type":"boolean"},"call_opt_out":{"type":"boolean"},"last_contacted_at":{"type":["string","null"],"format":"date-time"},"notes":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ContactInput":{"type":"object","description":"A new contact needs at least a name, phone or email.","properties":{"first_name":{"type":["string","null"],"maxLength":100},"last_name":{"type":["string","null"],"maxLength":100},"company_name":{"type":["string","null"],"maxLength":200},"phone":{"type":["string","null"],"description":"Phone number, ideally E.164 (+15551234567)."},"email":{"type":["string","null"],"format":"email"},"tags":{"type":"array","items":{"type":"string"},"maxItems":50},"notes":{"type":["string","null"]},"sms_opt_out":{"type":"boolean"},"email_opt_out":{"type":"boolean"},"call_opt_out":{"type":"boolean"}}},"Appointment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"contact_id":{"type":["string","null"],"format":"uuid"},"lead_id":{"type":["string","null"],"format":"uuid"},"calendar_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"],"format":"uuid"},"call_id":{"type":["string","null"],"format":"uuid","description":"The call that booked it."},"title":{"type":["string","null"]},"service_type":{"type":["string","null"]},"description":{"type":["string","null"]},"location":{"type":["string","null"]},"room":{"type":["string","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"timezone":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["scheduled","confirmed","completed","canceled","no_show","rescheduled",null]},"booked_by":{"type":["string","null"]},"confirmed_at":{"type":["string","null"],"format":"date-time"},"canceled_at":{"type":["string","null"],"format":"date-time"},"cancel_reason":{"type":["string","null"]},"rescheduled_from_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"contact_id":{"type":["string","null"],"format":"uuid"},"contact":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}}},"status":{"type":["string","null"],"enum":["new","contacted","qualified","appointment_booked","won","lost","unresponsive",null]},"source":{"type":["string","null"],"enum":["inbound_call","web_form","meta_lead_ad","sms","email","referral","import","campaign","manual","other",null]},"source_detail":{"type":["string","null"]},"service_interest":{"type":["string","null"]},"estimated_value_cents":{"type":["integer","null"]},"currency":{"type":["string","null"]},"score":{"type":["number","null"]},"assigned_user_id":{"type":["string","null"],"format":"uuid"},"lost_reason":{"type":["string","null"]},"status_changed_at":{"type":["string","null"],"format":"date-time"},"converted_at":{"type":["string","null"],"format":"date-time"},"utm":{"type":"object","additionalProperties":{"type":"string"}},"notes":{"type":["string","null"]},"last_activity_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"LeadInput":{"type":"object","description":"The contact comes from `contact` or from the top-level first_name / last_name / company_name / phone / email; it is matched to an existing contact by phone or email. A lead needs a contact name, phone or email.","properties":{"source":{"type":"string","enum":["inbound_call","web_form","meta_lead_ad","sms","email","referral","import","campaign","manual","other"],"default":"manual"},"source_detail":{"type":["string","null"],"maxLength":200},"service_interest":{"type":["string","null"],"maxLength":200},"estimated_value_cents":{"type":["integer","null"],"minimum":0},"notes":{"type":["string","null"],"maxLength":10000},"utm":{"type":"object","additionalProperties":{"type":"string"},"maxProperties":20},"contact":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}}},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string","enum":["call.completed","lead.created","appointment.booked","appointment.cancelled","message.received","integration.status_changed","integration.records.booking.confirmed","integration.records.booking.failed","integration.records.appointment.cancelled","integration.records.appointment.completed","integration.records.appointment.no_show","integration.records.patient.updated","intake.completed"]},"description":"Empty means every event type."},"source":{"type":"string","enum":["app","api","zapier","make"]},"enabled":{"type":"boolean"},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"WebhookEndpointCreated":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string","description":"Signing secret for X-Kintara-Signature. Returned only once, on creation."}}}]},"WebhookEndpointInput":{"type":"object","description":"`url` or `target_url` is required (https). Zapier / Make send `target_url` + `event_type`.","properties":{"url":{"type":"string","format":"uri"},"target_url":{"type":"string","format":"uri","description":"Alias of url (REST hooks)."},"event_types":{"type":"array","items":{"type":"string","enum":["call.completed","lead.created","appointment.booked","appointment.cancelled","message.received","integration.status_changed","integration.records.booking.confirmed","integration.records.booking.failed","integration.records.appointment.cancelled","integration.records.appointment.completed","integration.records.appointment.no_show","integration.records.patient.updated","intake.completed"]}},"event_type":{"type":"string","enum":["call.completed","lead.created","appointment.booked","appointment.cancelled","message.received","integration.status_changed","integration.records.booking.confirmed","integration.records.booking.failed","integration.records.appointment.cancelled","integration.records.appointment.completed","integration.records.appointment.no_show","integration.records.patient.updated","intake.completed"],"description":"One event type (REST hooks)."},"description":{"type":["string","null"]},"source":{"type":"string","enum":["api","zapier","make"],"default":"api"}}},"WebhookPayload":{"type":"object","required":["id","type","created_at","organization_id","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Event id; the same across retries. De-duplicate on it."},"type":{"type":"string","enum":["call.completed","lead.created","appointment.booked","appointment.cancelled","message.received","integration.status_changed","integration.records.booking.confirmed","integration.records.booking.failed","integration.records.appointment.cancelled","integration.records.appointment.completed","integration.records.appointment.no_show","integration.records.patient.updated","intake.completed"]},"created_at":{"type":"string","format":"date-time"},"organization_id":{"type":["string","null"],"format":"uuid"},"data":{"type":"object","description":"The event's fields (snake_case)."}}},"EventType":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":["string","null"]}}}},"headers":{"Kintara-Api-Version":{"description":"Major API version that served the request (`v1`). Deprecated versions also send Deprecation, Sunset and Link headers.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per one-minute window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying (on 429).","schema":{"type":"integer"}}},"parameters":{"X-Kintara-Signature":{"name":"X-Kintara-Signature","in":"header","required":true,"description":"`v1=` + hex HMAC-SHA256 of `\"<X-Kintara-Timestamp>.<raw body>\"` keyed with the endpoint secret.","schema":{"type":"string","examples":["v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"]}},"X-Kintara-Timestamp":{"name":"X-Kintara-Timestamp","in":"header","required":true,"description":"Unix time (seconds) the delivery was signed. Reject old ones (e.g. older than 5 minutes).","schema":{"type":"string"}},"X-Kintara-Event":{"name":"X-Kintara-Event","in":"header","required":true,"description":"The event type.","schema":{"type":"string","enum":["call.completed","lead.created","appointment.booked","appointment.cancelled","message.received","integration.status_changed","integration.records.booking.confirmed","integration.records.booking.failed","integration.records.appointment.cancelled","integration.records.appointment.completed","integration.records.appointment.no_show","integration.records.patient.updated","intake.completed"]}},"X-Kintara-Delivery":{"name":"X-Kintara-Delivery","in":"header","required":true,"description":"Delivery id (one per endpoint and event).","schema":{"type":"string","format":"uuid"}}},"responses":{"BadRequest":{"description":"Invalid request or parameter (`invalid_request`, `invalid_parameter`, `organization_required`).","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid or revoked API key.","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key lacks the scope or has no access to the organization.","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such resource in this organization.","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded; retry after Retry-After seconds.","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Something went wrong on our side; retry later.","headers":{"Kintara-Api-Version":{"$ref":"#/components/headers/Kintara-Api-Version"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}