{"openapi":"3.1.0","info":{"title":"Origin Platform API","version":"2026-11-01","summary":"REST API for the eight Origin Platform AI products.","description":"Authenticate with an API key (`Authorization: Bearer opk_live_...`) or an OAuth 2.0 access token. All data is scoped to the business that owns the key. Errors are RFC 9457 problem details. Writes accept an `Idempotency-Key` header. Lists use cursor pagination.","contact":{"name":"Origin Pixel Solutions","url":"https://originpixel.in"}},"servers":[{"url":"https://app.originpixel.in"}],"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","tags":[{"name":"Authentication"},{"name":"Contacts","description":"People and businesses you talk to. Shared by every product."},{"name":"Leads","description":"Sales opportunities in the AI Revenue Engine pipeline. New leads are scored and routed automatically."},{"name":"Conversations","description":"Customer conversations on every channel (web chat, WhatsApp, email, voice)."},{"name":"Messages","description":"Messages inside conversations. Also available as /conversations/{id}/messages."},{"name":"Bookings","description":"Appointments and reservations. Overlapping bookings on the same calendar are refused (409)."},{"name":"Tickets","description":"Support tickets with SLA targets. Status changes stay in the app (agents and workflows)."},{"name":"Reviews","description":"Customer reviews from Google, Facebook, Justdial and others. Negative reviews open alerts."},{"name":"Calls","description":"Phone calls handled by the AI Voice Workforce, with summary, sentiment and outcome. Recordings are not exposed."},{"name":"Campaigns","description":"Old-lead and follow-up campaigns of the AI Revenue Engine."},{"name":"Call campaigns","description":"Outbound call campaigns (calling windows, attempts, consent)."},{"name":"Prospects","description":"B2B prospects of the AI Sales Workforce. A lawful basis is required; do-not-contact rules always apply."},{"name":"Documents","description":"Back-office document metadata (no file contents, no extracted values). Bank statements and KYC are never listed."},{"name":"Records","description":"Approved bills, invoices, expenses, purchase orders and quotations (sensitive records excluded)."},{"name":"Posts","description":"AI Content Studio posts. Posts created through the API are drafts; approval and publishing stay in the app."},{"name":"Knowledge articles","description":"Knowledge base used by the AI assistants and the public help centre. Articles are indexed for search when saved."},{"name":"Metrics"},{"name":"Webhooks"}],"paths":{"/api/v1/contacts":{"get":{"operationId":"listContacts","summary":"List contacts","description":"People and businesses you talk to. Shared by every product.\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Contacts"],"security":[{"bearerAuth":[]},{"oauth2":["contacts:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"email","in":"query","required":false,"description":"Only items whose email equals this value.","schema":{"type":"string"}},{"name":"email[in]","in":"query","required":false,"description":"Only items whose email is one of these (comma separated).","schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"description":"Only items whose phone equals this value.","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Only items whose source equals this value.","schema":{"type":"string"}},{"name":"source[in]","in":"query","required":false,"description":"Only items whose source is one of these (comma separated).","schema":{"type":"string"}},{"name":"tags[contains]","in":"query","required":false,"description":"Only items whose tags contain this value.","schema":{"type":"string"}},{"name":"name[search]","in":"query","required":false,"description":"Case-insensitive text search in name.","schema":{"type":"string"}},{"name":"consent_marketing","in":"query","required":false,"description":"Only items whose consent_marketing equals this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createContact","summary":"Create a contact","tags":["Contacts"],"security":[{"bearerAuth":[]},{"oauth2":["contacts:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"},"example":{"name":"Priya Raman","email":"priya@example.com","phone":"+919840012345","tags":["vip"]}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/contacts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getContact","summary":"Get a contact","tags":["Contacts"],"security":[{"bearerAuth":[]},{"oauth2":["contacts:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateContact","summary":"Update a contact","tags":["Contacts"],"security":[{"bearerAuth":[]},{"oauth2":["contacts:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"operationId":"deleteContact","summary":"Delete a contact","tags":["Contacts"],"security":[{"bearerAuth":[]},{"oauth2":["contacts:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/leads":{"get":{"operationId":"listLeads","summary":"List leads","description":"Sales opportunities in the AI Revenue Engine pipeline. New leads are scored and routed automatically.\n\nSorted by created_at, updated_at, last_activity_at (default -created_at). Cursor pagination.","tags":["Leads"],"security":[{"bearerAuth":[]},{"oauth2":["revenue_engine:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","last_activity_at","-last_activity_at"]}},{"name":"stage","in":"query","required":false,"description":"Only items whose stage equals this value.","schema":{"type":"string"}},{"name":"stage[neq]","in":"query","required":false,"description":"Only items whose stage is not this value.","schema":{"type":"string"}},{"name":"stage[in]","in":"query","required":false,"description":"Only items whose stage is one of these (comma separated).","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Only items whose source equals this value.","schema":{"type":"string"}},{"name":"source[in]","in":"query","required":false,"description":"Only items whose source is one of these (comma separated).","schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"description":"Only items whose contact_id equals this value.","schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"description":"Only items whose owner_id equals this value.","schema":{"type":"string"}},{"name":"score[gte]","in":"query","required":false,"description":"Only items with score >= this value.","schema":{"type":"string"}},{"name":"score[lte]","in":"query","required":false,"description":"Only items with score <= this value.","schema":{"type":"string"}},{"name":"score[gt]","in":"query","required":false,"description":"Only items with score > this value.","schema":{"type":"string"}},{"name":"score[lt]","in":"query","required":false,"description":"Only items with score < this value.","schema":{"type":"string"}},{"name":"tags[contains]","in":"query","required":false,"description":"Only items whose tags contain this value.","schema":{"type":"string"}},{"name":"name[search]","in":"query","required":false,"description":"Case-insensitive text search in name.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createLead","summary":"Create a lead","tags":["Leads"],"security":[{"bearerAuth":[]},{"oauth2":["revenue_engine:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"},"example":{"name":"Website enquiry - dental implant","source":"website","value_estimate":45000,"currency":"INR"}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/leads/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getLead","summary":"Get a lead","tags":["Leads"],"security":[{"bearerAuth":[]},{"oauth2":["revenue_engine:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateLead","summary":"Update a lead","tags":["Leads"],"security":[{"bearerAuth":[]},{"oauth2":["revenue_engine:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/conversations":{"get":{"operationId":"listConversations","summary":"List conversations","description":"Customer conversations on every channel (web chat, WhatsApp, email, voice).\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Conversations"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"description":"Only items whose contact_id equals this value.","schema":{"type":"string"}},{"name":"channel_id","in":"query","required":false,"description":"Only items whose channel_id equals this value.","schema":{"type":"string"}},{"name":"tags[contains]","in":"query","required":false,"description":"Only items whose tags contain this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/conversations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getConversation","summary":"Get a conversation","tags":["Conversations"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/messages":{"get":{"operationId":"listMessages","summary":"List messages","description":"Messages inside conversations. Also available as /conversations/{id}/messages.\n\nSorted by created_at (default -created_at). Cursor pagination.","tags":["Messages"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at"]}},{"name":"conversation_id","in":"query","required":false,"description":"Only items whose conversation_id equals this value.","schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"description":"Only items whose direction equals this value.","schema":{"type":"string"}},{"name":"sender_kind","in":"query","required":false,"description":"Only items whose sender_kind equals this value.","schema":{"type":"string"}},{"name":"sender_kind[in]","in":"query","required":false,"description":"Only items whose sender_kind is one of these (comma separated).","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/messages/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getMessage","summary":"Get a message","tags":["Messages"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/bookings":{"get":{"operationId":"listBookings","summary":"List bookings","description":"Appointments and reservations. Overlapping bookings on the same calendar are refused (409).\n\nSorted by starts_at, created_at, updated_at (default -starts_at). Cursor pagination.","tags":["Bookings"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["starts_at","-starts_at","created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"description":"Only items whose contact_id equals this value.","schema":{"type":"string"}},{"name":"service_id","in":"query","required":false,"description":"Only items whose service_id equals this value.","schema":{"type":"string"}},{"name":"resource_id","in":"query","required":false,"description":"Only items whose resource_id equals this value.","schema":{"type":"string"}},{"name":"starts_at[gt]","in":"query","required":false,"description":"Only items with starts_at > this value.","schema":{"type":"string"}},{"name":"starts_at[gte]","in":"query","required":false,"description":"Only items with starts_at >= this value.","schema":{"type":"string"}},{"name":"starts_at[lt]","in":"query","required":false,"description":"Only items with starts_at < this value.","schema":{"type":"string"}},{"name":"starts_at[lte]","in":"query","required":false,"description":"Only items with starts_at <= this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createBooking","summary":"Create a booking","tags":["Bookings"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"},"example":{"starts_at":"2026-11-05T10:00:00+05:30","ends_at":"2026-11-05T10:30:00+05:30","status":"requested"}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/bookings/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getBooking","summary":"Get a booking","tags":["Bookings"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateBooking","summary":"Update a booking","tags":["Bookings"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/tickets":{"get":{"operationId":"listTickets","summary":"List tickets","description":"Support tickets with SLA targets. Status changes stay in the app (agents and workflows).\n\nSorted by created_at, updated_at, number (default -created_at). Cursor pagination.","tags":["Tickets"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","number","-number"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[neq]","in":"query","required":false,"description":"Only items whose status is not this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"priority","in":"query","required":false,"description":"Only items whose priority equals this value.","schema":{"type":"string"}},{"name":"priority[in]","in":"query","required":false,"description":"Only items whose priority is one of these (comma separated).","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Only items whose category equals this value.","schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"description":"Only items whose contact_id equals this value.","schema":{"type":"string"}},{"name":"assignee_id","in":"query","required":false,"description":"Only items whose assignee_id equals this value.","schema":{"type":"string"}},{"name":"tags[contains]","in":"query","required":false,"description":"Only items whose tags contain this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createTicket","summary":"Create a ticket","tags":["Tickets"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"},"example":{"subject":"Order arrived damaged","priority":"high","channel":"email"}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/tickets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getTicket","summary":"Get a ticket","tags":["Tickets"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateTicket","summary":"Update a ticket","tags":["Tickets"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/reviews":{"get":{"operationId":"listReviews","summary":"List reviews","description":"Customer reviews from Google, Facebook, Justdial and others. Negative reviews open alerts.\n\nSorted by reviewed_at, created_at, updated_at (default -reviewed_at). Cursor pagination.","tags":["Reviews"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["reviewed_at","-reviewed_at","created_at","-created_at","updated_at","-updated_at"]}},{"name":"rating","in":"query","required":false,"description":"Only items whose rating equals this value.","schema":{"type":"string"}},{"name":"rating[gte]","in":"query","required":false,"description":"Only items with rating >= this value.","schema":{"type":"string"}},{"name":"rating[lte]","in":"query","required":false,"description":"Only items with rating <= this value.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"source_id","in":"query","required":false,"description":"Only items whose source_id equals this value.","schema":{"type":"string"}},{"name":"sentiment","in":"query","required":false,"description":"Only items whose sentiment equals this value.","schema":{"type":"string"}},{"name":"sentiment[in]","in":"query","required":false,"description":"Only items whose sentiment is one of these (comma separated).","schema":{"type":"string"}},{"name":"reviewed_at[gt]","in":"query","required":false,"description":"Only items with reviewed_at > this value.","schema":{"type":"string"}},{"name":"reviewed_at[gte]","in":"query","required":false,"description":"Only items with reviewed_at >= this value.","schema":{"type":"string"}},{"name":"reviewed_at[lt]","in":"query","required":false,"description":"Only items with reviewed_at < this value.","schema":{"type":"string"}},{"name":"reviewed_at[lte]","in":"query","required":false,"description":"Only items with reviewed_at <= this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createReview","summary":"Create a review","tags":["Reviews"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCreate"},"example":{"source_id":"2f1c0a9e-5b7d-4c3a-9e8f-1a2b3c4d5e6f","rating":5,"body":"Very kind staff.","author_display":"Karthik S"}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/reviews/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getReview","summary":"Get a review","tags":["Reviews"],"security":[{"bearerAuth":[]},{"oauth2":["customer_experience:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/calls":{"get":{"operationId":"listCalls","summary":"List calls","description":"Phone calls handled by the AI Voice Workforce, with summary, sentiment and outcome. Recordings are not exposed.\n\nSorted by started_at, created_at, updated_at (default -started_at). Cursor pagination.","tags":["Calls"],"security":[{"bearerAuth":[]},{"oauth2":["voice:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["started_at","-started_at","created_at","-created_at","updated_at","-updated_at"]}},{"name":"direction","in":"query","required":false,"description":"Only items whose direction equals this value.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"outcome","in":"query","required":false,"description":"Only items whose outcome equals this value.","schema":{"type":"string"}},{"name":"outcome[in]","in":"query","required":false,"description":"Only items whose outcome is one of these (comma separated).","schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"description":"Only items whose contact_id equals this value.","schema":{"type":"string"}},{"name":"lead_id","in":"query","required":false,"description":"Only items whose lead_id equals this value.","schema":{"type":"string"}},{"name":"campaign_id","in":"query","required":false,"description":"Only items whose campaign_id equals this value.","schema":{"type":"string"}},{"name":"is_test","in":"query","required":false,"description":"Only items whose is_test equals this value.","schema":{"type":"string"}},{"name":"started_at[gt]","in":"query","required":false,"description":"Only items with started_at > this value.","schema":{"type":"string"}},{"name":"started_at[gte]","in":"query","required":false,"description":"Only items with started_at >= this value.","schema":{"type":"string"}},{"name":"started_at[lt]","in":"query","required":false,"description":"Only items with started_at < this value.","schema":{"type":"string"}},{"name":"started_at[lte]","in":"query","required":false,"description":"Only items with started_at <= this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/calls/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getCall","summary":"Get a call","tags":["Calls"],"security":[{"bearerAuth":[]},{"oauth2":["voice:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/campaigns":{"get":{"operationId":"listCampaigns","summary":"List campaigns","description":"Old-lead and follow-up campaigns of the AI Revenue Engine.\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"oauth2":["revenue_engine:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"sequence_id","in":"query","required":false,"description":"Only items whose sequence_id equals this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/campaigns/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getCampaign","summary":"Get a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"oauth2":["revenue_engine:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/voice-campaigns":{"get":{"operationId":"listVoiceCampaigns","summary":"List call campaigns","description":"Outbound call campaigns (calling windows, attempts, consent).\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Call campaigns"],"security":[{"bearerAuth":[]},{"oauth2":["voice:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"agent_id","in":"query","required":false,"description":"Only items whose agent_id equals this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCampaignList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/voice-campaigns/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getVoiceCampaign","summary":"Get a voice campaign","tags":["Call campaigns"],"security":[{"bearerAuth":[]},{"oauth2":["voice:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCampaign"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/prospects":{"get":{"operationId":"listProspects","summary":"List prospects","description":"B2B prospects of the AI Sales Workforce. A lawful basis is required; do-not-contact rules always apply.\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Prospects"],"security":[{"bearerAuth":[]},{"oauth2":["sales:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"region","in":"query","required":false,"description":"Only items whose region equals this value.","schema":{"type":"string"}},{"name":"region[in]","in":"query","required":false,"description":"Only items whose region is one of these (comma separated).","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Only items whose account_id equals this value.","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Only items whose email equals this value.","schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"description":"Only items whose owner_id equals this value.","schema":{"type":"string"}},{"name":"name[search]","in":"query","required":false,"description":"Case-insensitive text search in name.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createProspect","summary":"Create a prospect","tags":["Prospects"],"security":[{"bearerAuth":[]},{"oauth2":["sales:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectCreate"},"example":{"name":"Anand Iyer","title":"Head of Operations","email":"anand@acme.example","region":"in","lawful_basis":"consent"}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prospect"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/prospects/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getProspect","summary":"Get a prospect","tags":["Prospects"],"security":[{"bearerAuth":[]},{"oauth2":["sales:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prospect"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateProspect","summary":"Update a prospect","tags":["Prospects"],"security":[{"bearerAuth":[]},{"oauth2":["sales:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prospect"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/documents":{"get":{"operationId":"listDocuments","summary":"List documents","description":"Back-office document metadata (no file contents, no extracted values). Bank statements and KYC are never listed.\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Documents"],"security":[{"bearerAuth":[]},{"oauth2":["back_office:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"doc_type_id","in":"query","required":false,"description":"Only items whose doc_type_id equals this value.","schema":{"type":"string"}},{"name":"scan_status","in":"query","required":false,"description":"Only items whose scan_status equals this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/documents/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getDocument","summary":"Get a document","tags":["Documents"],"security":[{"bearerAuth":[]},{"oauth2":["back_office:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/records":{"get":{"operationId":"listRecords","summary":"List records","description":"Approved bills, invoices, expenses, purchase orders and quotations (sensitive records excluded).\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Records"],"security":[{"bearerAuth":[]},{"oauth2":["back_office:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"kind","in":"query","required":false,"description":"Only items whose kind equals this value.","schema":{"type":"string"}},{"name":"kind[in]","in":"query","required":false,"description":"Only items whose kind is one of these (comma separated).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"party_id","in":"query","required":false,"description":"Only items whose party_id equals this value.","schema":{"type":"string"}},{"name":"issue_date[gte]","in":"query","required":false,"description":"Only items with issue_date >= this value.","schema":{"type":"string"}},{"name":"issue_date[lte]","in":"query","required":false,"description":"Only items with issue_date <= this value.","schema":{"type":"string"}},{"name":"due_date[gte]","in":"query","required":false,"description":"Only items with due_date >= this value.","schema":{"type":"string"}},{"name":"due_date[lte]","in":"query","required":false,"description":"Only items with due_date <= this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRecordList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/records/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getRecord","summary":"Get a record","tags":["Records"],"security":[{"bearerAuth":[]},{"oauth2":["back_office:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRecord"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/posts":{"get":{"operationId":"listPosts","summary":"List posts","description":"AI Content Studio posts. Posts created through the API are drafts; approval and publishing stay in the app.\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Posts"],"security":[{"bearerAuth":[]},{"oauth2":["content:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"description":"Only items whose channel equals this value.","schema":{"type":"string"}},{"name":"channel[in]","in":"query","required":false,"description":"Only items whose channel is one of these (comma separated).","schema":{"type":"string"}},{"name":"plan_id","in":"query","required":false,"description":"Only items whose plan_id equals this value.","schema":{"type":"string"}},{"name":"publish_date[gte]","in":"query","required":false,"description":"Only items with publish_date >= this value.","schema":{"type":"string"}},{"name":"publish_date[lte]","in":"query","required":false,"description":"Only items with publish_date <= this value.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createPost","summary":"Create a post","tags":["Posts"],"security":[{"bearerAuth":[]},{"oauth2":["content:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"},"example":{"channel":"instagram","caption":"Diwali offer: 20% off cleaning this week."}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/posts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getPost","summary":"Get a post","tags":["Posts"],"security":[{"bearerAuth":[]},{"oauth2":["content:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updatePost","summary":"Update a post","tags":["Posts"],"security":[{"bearerAuth":[]},{"oauth2":["content:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/knowledge-articles":{"get":{"operationId":"listKnowledgeArticles","summary":"List knowledge articles","description":"Knowledge base used by the AI assistants and the public help centre. Articles are indexed for search when saved.\n\nSorted by created_at, updated_at (default -created_at). Cursor pagination.","tags":["Knowledge articles"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]}},{"name":"status","in":"query","required":false,"description":"Only items whose status equals this value.","schema":{"type":"string"}},{"name":"status[in]","in":"query","required":false,"description":"Only items whose status is one of these (comma separated).","schema":{"type":"string"}},{"name":"published","in":"query","required":false,"description":"Only items whose published equals this value.","schema":{"type":"string"}},{"name":"source_kind","in":"query","required":false,"description":"Only items whose source_kind equals this value.","schema":{"type":"string"}},{"name":"title[search]","in":"query","required":false,"description":"Case-insensitive text search in title.","schema":{"type":"string"}},{"name":"created_at[gt]","in":"query","required":false,"description":"Only items with created_at > this value.","schema":{"type":"string"}},{"name":"created_at[gte]","in":"query","required":false,"description":"Only items with created_at >= this value.","schema":{"type":"string"}},{"name":"created_at[lt]","in":"query","required":false,"description":"Only items with created_at < this value.","schema":{"type":"string"}},{"name":"created_at[lte]","in":"query","required":false,"description":"Only items with created_at <= this value.","schema":{"type":"string"}},{"name":"updated_at[gt]","in":"query","required":false,"description":"Only items with updated_at > this value.","schema":{"type":"string"}},{"name":"updated_at[gte]","in":"query","required":false,"description":"Only items with updated_at >= this value.","schema":{"type":"string"}},{"name":"updated_at[lt]","in":"query","required":false,"description":"Only items with updated_at < this value.","schema":{"type":"string"}},{"name":"updated_at[lte]","in":"query","required":false,"description":"Only items with updated_at <= this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of items.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createKnowledgeArticle","summary":"Create a knowledge article","tags":["Knowledge articles"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleCreate"},"example":{"title":"Parking","content":"Free parking is available behind the clinic from 9 am to 9 pm."}}}},"responses":{"201":{"description":"Created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticle"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/knowledge-articles/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getKnowledgeArticle","summary":"Get a knowledge article","tags":["Knowledge articles"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"responses":{"200":{"description":"The item.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticle"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateKnowledgeArticle","summary":"Update a knowledge article","tags":["Knowledge articles"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleUpdate"}}}},"responses":{"200":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticle"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"operationId":"deleteKnowledgeArticle","summary":"Delete a knowledge article","tags":["Knowledge articles"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:write"]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/conversations/{id}/messages":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"listConversationMessages","summary":"List the messages of a conversation","tags":["Messages"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at"]}}],"responses":{"200":{"description":"Messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/kb-articles":{"get":{"operationId":"listKbArticlesDeprecated","deprecated":true,"summary":"Deprecated alias of /api/v1/knowledge-articles (sunset 2027-05-01)","tags":["Knowledge articles"],"security":[{"bearerAuth":[]},{"oauth2":["front_desk:read"]}],"responses":{"200":{"description":"As the current endpoint, with Deprecation and Sunset headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleList"}}}}}}},"/api/v1/metrics":{"get":{"operationId":"listMetrics","summary":"List the metrics available to this business","tags":["Metrics"],"security":[{"bearerAuth":[]},{"oauth2":["business_intelligence:read"]}],"responses":{"200":{"description":"Metric catalogue.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/metrics/{key}":{"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"example":"revenue.leads"}],"get":{"operationId":"getMetric","summary":"Compute a metric (total, time series, breakdown, previous period)","tags":["Metrics"],"security":[{"bearerAuth":[]},{"oauth2":["business_intelligence:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"grain","in":"query","schema":{"type":"string","enum":["auto","day","week","month"]}},{"name":"breakdown","in":"query","schema":{"type":"string"}},{"name":"compare","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Metric result in the business's timezone.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/me":{"get":{"operationId":"getMe","summary":"Who this key or token acts for (business, scopes, rate limit)","tags":["Authentication"],"security":[{"bearerAuth":[]},{"oauth2":[]}],"responses":{"200":{"description":"The credential.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/events":{"get":{"operationId":"listEventTypes","summary":"Webhook event catalogue (public)","tags":["Webhooks"],"security":[],"responses":{"200":{"description":"Every event type.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"webhooks":{"contact.created":{"post":{"summary":"A contact was added through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"contact.updated":{"post":{"summary":"A contact was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"contact.deleted":{"post":{"summary":"A contact was deleted through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"message.received":{"post":{"summary":"A customer message arrived on any channel.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"message.created":{"post":{"summary":"A message was added to a conversation.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"message.queued":{"post":{"summary":"An outgoing message was queued for delivery.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"message.sent":{"post":{"summary":"An outgoing message was sent by the channel provider.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"message.failed":{"post":{"summary":"An outgoing message could not be delivered.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"message.bounced":{"post":{"summary":"An email bounced.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"channel.opted_out":{"post":{"summary":"A person opted out of a channel (STOP, unsubscribe).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"booking.created":{"post":{"summary":"A booking was created through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"booking.updated":{"post":{"summary":"A booking was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"booking.requested":{"post":{"summary":"A booking was requested by the assistant or a customer.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"booking.reminder_queued":{"post":{"summary":"A booking reminder was queued.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"booking.reminder_sent":{"post":{"summary":"A booking reminder was sent.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"booking.reminder_skipped":{"post":{"summary":"A booking reminder was skipped.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"calendar.external_cancelled":{"post":{"summary":"A booking was cancelled in the connected calendar.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"calendar.external_moved":{"post":{"summary":"A booking was moved in the connected calendar.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"calendar.external_conflict":{"post":{"summary":"A connected calendar has a conflicting event.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"knowledge_article.created":{"post":{"summary":"A knowledge article was added through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"knowledge_article.updated":{"post":{"summary":"A knowledge article was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"knowledge_article.deleted":{"post":{"summary":"A knowledge article was deleted through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"lead.created":{"post":{"summary":"A new lead was created.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"lead.updated":{"post":{"summary":"A lead was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"lead.stage_changed":{"post":{"summary":"A lead moved to another pipeline stage.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"lead.assigned":{"post":{"summary":"A lead got a new owner.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"followup.enrolled":{"post":{"summary":"A lead was enrolled in a follow-up sequence.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"followup.drafted":{"post":{"summary":"A follow-up message was drafted.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"followup.stopped":{"post":{"summary":"A follow-up sequence stopped for a lead.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"campaign.created":{"post":{"summary":"An old-lead campaign was created.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.call_started":{"post":{"summary":"A phone call started.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.call_ended":{"post":{"summary":"A phone call ended (summary, outcome).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.message_taken":{"post":{"summary":"The voice agent took a message.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.transfer_requested":{"post":{"summary":"A caller asked to speak to a person.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.dial_requested":{"post":{"summary":"An outbound campaign target is ready to dial.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.campaign_created":{"post":{"summary":"An outbound call campaign was created.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"voice.dnc_added":{"post":{"summary":"A number was added to the do-not-call list.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.created":{"post":{"summary":"A support ticket was created.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.updated":{"post":{"summary":"A ticket was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.status_changed":{"post":{"summary":"A ticket changed status.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.assigned":{"post":{"summary":"A ticket got a new assignee or priority.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.merged":{"post":{"summary":"A ticket was merged into another.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.sla_breached":{"post":{"summary":"A ticket missed its SLA target.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"ticket.limit_reached":{"post":{"summary":"The monthly ticket limit was reached.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"csat.sent":{"post":{"summary":"A CSAT survey was sent.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"csat.received":{"post":{"summary":"A CSAT score was received.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"review.received":{"post":{"summary":"A review was added.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"review.negative":{"post":{"summary":"A negative review needs attention.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"prospect.created":{"post":{"summary":"A prospect was added through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"prospect.updated":{"post":{"summary":"A prospect was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.imported":{"post":{"summary":"Prospects were imported.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.enrolled":{"post":{"summary":"A prospect was enrolled in an outbound sequence.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.drafted":{"post":{"summary":"An outbound step was drafted.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.message_sent":{"post":{"summary":"An outbound message was sent.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.reply_logged":{"post":{"summary":"A prospect replied.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.reply_interested":{"post":{"summary":"A prospect replied with interest.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.reply_handed_over":{"post":{"summary":"A reply was handed over to a person.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.meeting_booked":{"post":{"summary":"A meeting was booked with a prospect.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.meeting_scheduled":{"post":{"summary":"A meeting was scheduled.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.meeting_held":{"post":{"summary":"A meeting took place.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.meeting_no_show":{"post":{"summary":"A prospect did not attend a meeting.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.meeting_cancelled":{"post":{"summary":"A meeting was cancelled.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.enrolment_stopped":{"post":{"summary":"An outbound sequence stopped for a prospect.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.opted_out":{"post":{"summary":"A prospect opted out.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"sales.suppression_added":{"post":{"summary":"An address or domain was added to do-not-contact.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"bi.insight_created":{"post":{"summary":"An alert rule produced an insight.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"bi.digest_ready":{"post":{"summary":"The weekly digest is ready.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"bi.dataset_imported":{"post":{"summary":"A dataset was imported.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"bi.dashboard_created":{"post":{"summary":"A dashboard was created.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"bi.question_asked":{"post":{"summary":"Someone asked a question about the data.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.document_uploaded":{"post":{"summary":"A document was uploaded.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.extraction_done":{"post":{"summary":"A document was read (fields extracted).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.document_approved":{"post":{"summary":"A document was approved.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.document_rejected":{"post":{"summary":"A document was rejected.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.approval_requested":{"post":{"summary":"An approval step is waiting.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.record_approved":{"post":{"summary":"A record (bill, invoice, expense) was approved.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.record_rejected":{"post":{"summary":"A record was rejected.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"back_office.record_status_changed":{"post":{"summary":"A record changed status (scheduled, paid).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_created":{"post":{"summary":"A post was created through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_updated":{"post":{"summary":"A post was changed through the API.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.plan_generated":{"post":{"summary":"A content plan was generated.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_submitted":{"post":{"summary":"A post was submitted for approval.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_approved":{"post":{"summary":"A post was approved.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_changes_requested":{"post":{"summary":"Changes were requested on a post.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_scheduled":{"post":{"summary":"A post was scheduled.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.post_published":{"post":{"summary":"A post was marked as published.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.ideas_refreshed":{"post":{"summary":"Content ideas were refreshed.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}},"content.review_consent_withdrawn":{"post":{"summary":"A customer withdrew consent to feature a review.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx within 10 seconds."}}}}},"components":{"schemas":{"Problem":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status","code"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","enum":["invalid_token","expired_token","revoked_token","ip_not_allowed","feature_not_in_package","product_not_in_package","org_inactive","insufficient_scope","not_found","method_not_allowed","conflict","idempotency_in_progress","idempotency_mismatch","invalid_request","invalid_body","invalid_field","missing_field","validation_failed","invalid_filter","invalid_sort","invalid_cursor","invalid_range","limit_reached","payload_too_large","unsupported_media_type","rate_limited","internal_error","unavailable"]},"request_id":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}},"Deleted":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"type":"string"},"id":{"type":"string"},"deleted":{"const":true}}},"WebhookEvent":{"type":"object","description":"Body of every webhook (Standard Webhooks). Verify the webhook-signature header before trusting it.","required":["id","type","timestamp","api_version","org_id","data"],"properties":{"id":{"type":"string","description":"Same as the webhook-id header; stable across retries and replays."},"type":{"type":"string","enum":["contact.created","contact.updated","contact.deleted","message.received","message.created","message.queued","message.sent","message.failed","message.bounced","channel.opted_out","booking.created","booking.updated","booking.requested","booking.reminder_queued","booking.reminder_sent","booking.reminder_skipped","calendar.external_cancelled","calendar.external_moved","calendar.external_conflict","knowledge_article.created","knowledge_article.updated","knowledge_article.deleted","lead.created","lead.updated","lead.stage_changed","lead.assigned","followup.enrolled","followup.drafted","followup.stopped","campaign.created","voice.call_started","voice.call_ended","voice.message_taken","voice.transfer_requested","voice.dial_requested","voice.campaign_created","voice.dnc_added","ticket.created","ticket.updated","ticket.status_changed","ticket.assigned","ticket.merged","ticket.sla_breached","ticket.limit_reached","csat.sent","csat.received","review.received","review.negative","prospect.created","prospect.updated","sales.imported","sales.enrolled","sales.drafted","sales.message_sent","sales.reply_logged","sales.reply_interested","sales.reply_handed_over","sales.meeting_booked","sales.meeting_scheduled","sales.meeting_held","sales.meeting_no_show","sales.meeting_cancelled","sales.enrolment_stopped","sales.opted_out","sales.suppression_added","bi.insight_created","bi.digest_ready","bi.dataset_imported","bi.dashboard_created","bi.question_asked","back_office.document_uploaded","back_office.extraction_done","back_office.document_approved","back_office.document_rejected","back_office.approval_requested","back_office.record_approved","back_office.record_rejected","back_office.record_status_changed","content.post_created","content.post_updated","content.plan_generated","content.post_submitted","content.post_approved","content.post_changes_requested","content.post_scheduled","content.post_published","content.ideas_refreshed","content.review_consent_withdrawn","webhook.test"]},"timestamp":{"type":"string","format":"date-time"},"api_version":{"type":"string"},"org_id":{"type":"string","format":"uuid"},"data":{"type":"object","additionalProperties":true}}},"Contact":{"type":"object","properties":{"object":{"const":"contact"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"name":{"description":"Full name.","type":["string","null"]},"email":{"description":"Email address (lower case).","type":["string","null"]},"phone":{"description":"Phone number in E.164 form.","type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"description":"Lower-case tags."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Your own key / value data."},"source":{"description":"Where the contact came from.","type":["string","null"]},"consent_marketing":{"type":"boolean","description":"Marketing consent given."},"opted_out_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the contact opted out of messages."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","name","email","phone","tags","attributes","source","consent_marketing","opted_out_at","created_at","updated_at"],"additionalProperties":false,"description":"People and businesses you talk to. Shared by every product."},"ContactList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"ContactCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+?[0-9 ()-]{6,20}$"},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"attributes":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"source":{"type":"string","maxLength":60},"consent_marketing":{"type":"boolean"}},"additionalProperties":false},"ContactUpdate":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^\\+?[0-9 ()-]{6,20}$"},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"attributes":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"source":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"consent_marketing":{"type":"boolean"}},"additionalProperties":false},"Lead":{"type":"object","properties":{"object":{"const":"lead"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"contact_id":{"anyOf":[{"type":"string","format":"uuid","description":"The contact."},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid","description":"The conversation it came from."},{"type":"null"}]},"name":{"type":"string","description":"Lead name."},"stage":{"type":"string","enum":["new","qualified","quoted","booked","won","lost","nurture"],"description":"Pipeline stage."},"value_estimate":{"description":"Expected value.","type":["number","null"]},"currency":{"type":"string","description":"ISO 4217 currency code."},"source":{"description":"Source, e.g. website, whatsapp.","type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"description":"Lower-case tags."},"owner_id":{"anyOf":[{"type":"string","format":"uuid","description":"Team login that owns the lead."},{"type":"null"}]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Intent score 0-100 (computed)."},"score_reasons":{"type":"array","items":{},"description":"Why the score was given."},"next_action":{"description":"Next step.","type":["string","null"]},"next_action_due":{"anyOf":[{"type":"string","format":"date-time","description":"When the next step is due."},{"type":"null"}]},"lost_reason":{"description":"Why the lead was lost.","type":["string","null"]},"last_activity_at":{"type":"string","format":"date-time","description":"Last activity."},"stage_changed_at":{"type":"string","format":"date-time","description":"Last stage change."},"closed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When it was won or lost."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","contact_id","conversation_id","name","stage","value_estimate","currency","source","tags","owner_id","score","score_reasons","next_action","next_action_due","lost_reason","last_activity_at","stage_changed_at","closed_at","created_at","updated_at"],"additionalProperties":false,"description":"Sales opportunities in the AI Revenue Engine pipeline. New leads are scored and routed automatically."},"LeadList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"LeadCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"stage":{"type":"string","enum":["new","qualified","quoted","booked","won","lost","nurture"]},"value_estimate":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"source":{"type":"string","maxLength":60},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"next_action":{"type":"string","maxLength":300},"next_action_due":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["name"],"additionalProperties":false},"LeadUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contact_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"stage":{"type":"string","enum":["new","qualified","quoted","booked","won","lost","nurture"]},"value_estimate":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000000},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"next_action":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"next_action_due":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lost_reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},"Conversation":{"type":"object","properties":{"object":{"const":"conversation"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"contact_id":{"anyOf":[{"type":"string","format":"uuid","description":"The contact."},{"type":"null"}]},"channel_id":{"anyOf":[{"type":"string","format":"uuid","description":"The channel."},{"type":"null"}]},"status":{"type":"string","enum":["open","pending","handover","closed"],"description":"Status."},"assigned_to":{"anyOf":[{"type":"string","format":"uuid","description":"Assigned team login."},{"type":"null"}]},"ai_enabled":{"type":"boolean","description":"The assistant answers."},"subject":{"description":"Subject (email).","type":["string","null"]},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","description":"Last message."},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"description":"Lower-case tags."},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","contact_id","channel_id","status","assigned_to","ai_enabled","subject","last_message_at","tags","created_at","updated_at"],"additionalProperties":false,"description":"Customer conversations on every channel (web chat, WhatsApp, email, voice)."},"ConversationList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"Message":{"type":"object","properties":{"object":{"const":"message"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"conversation_id":{"type":"string","format":"uuid","description":"The conversation."},"direction":{"type":"string","enum":["in","out"],"description":"in = from the customer."},"sender_kind":{"type":"string","enum":["contact","ai","staff","system"],"description":"Who wrote it."},"body":{"description":"Text.","type":["string","null"]},"attachments":{"type":"array","items":{},"description":"Attachments."},"created_at":{"type":"string","format":"date-time","description":"When it was sent."}},"required":["object","id","conversation_id","direction","sender_kind","body","attachments","created_at"],"additionalProperties":false,"description":"Messages inside conversations. Also available as /conversations/{id}/messages."},"MessageList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"Booking":{"type":"object","properties":{"object":{"const":"booking"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"contact_id":{"anyOf":[{"type":"string","format":"uuid","description":"The contact."},{"type":"null"}]},"service_id":{"anyOf":[{"type":"string","format":"uuid","description":"The service."},{"type":"null"}]},"resource_id":{"anyOf":[{"type":"string","format":"uuid","description":"The booking calendar (person, room, table)."},{"type":"null"}]},"starts_at":{"type":"string","format":"date-time","description":"Start."},"ends_at":{"type":"string","format":"date-time","description":"End."},"status":{"type":"string","enum":["requested","confirmed","cancelled","no_show","done"],"description":"Status."},"source":{"description":"Where it was made (api, web, voice...).","type":["string","null"]},"notes":{"description":"Notes.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","contact_id","service_id","resource_id","starts_at","ends_at","status","source","notes","created_at","updated_at"],"additionalProperties":false,"description":"Appointments and reservations. Overlapping bookings on the same calendar are refused (409)."},"BookingList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"BookingCreate":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"service_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"resource_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"ends_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"status":{"type":"string","enum":["requested","confirmed"]},"notes":{"type":"string","maxLength":2000}},"required":["starts_at","ends_at"],"additionalProperties":false},"BookingUpdate":{"type":"object","properties":{"status":{"type":"string","enum":["requested","confirmed","cancelled","no_show","done"]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"ends_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false},"Ticket":{"type":"object","properties":{"object":{"const":"ticket"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Ticket number per business."},"subject":{"type":"string","description":"Subject."},"description":{"description":"Description.","type":["string","null"]},"status":{"type":"string","enum":["new","open","waiting_customer","resolved","closed"],"description":"Status."},"priority":{"type":"string","enum":["low","normal","high","urgent"],"description":"Priority."},"category":{"type":"string","description":"Category key."},"source":{"type":"string","description":"How it was created."},"channel":{"description":"Channel.","type":["string","null"]},"contact_id":{"anyOf":[{"type":"string","format":"uuid","description":"The contact."},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid","description":"The conversation."},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","description":"Assigned team login."},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"description":"Lower-case tags."},"first_response_due_at":{"anyOf":[{"type":"string","format":"date-time","description":"First response target."},{"type":"null"}]},"resolution_due_at":{"anyOf":[{"type":"string","format":"date-time","description":"Resolution target."},{"type":"null"}]},"first_responded_at":{"anyOf":[{"type":"string","format":"date-time","description":"First response."},{"type":"null"}]},"resolved_at":{"anyOf":[{"type":"string","format":"date-time","description":"Resolved."},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Closed."},{"type":"null"}]},"first_response_breached":{"type":"boolean","description":"First response SLA missed."},"resolution_breached":{"type":"boolean","description":"Resolution SLA missed."},"sentiment":{"description":"Customer mood.","type":["string","null"]},"csat_score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"CSAT 1-5."},"ai_summary":{"description":"AI summary.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","number","subject","description","status","priority","category","source","channel","contact_id","conversation_id","assignee_id","tags","first_response_due_at","resolution_due_at","first_responded_at","resolved_at","closed_at","first_response_breached","resolution_breached","sentiment","csat_score","ai_summary","created_at","updated_at"],"additionalProperties":false,"description":"Support tickets with SLA targets. Status changes stay in the app (agents and workflows)."},"TicketList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"TicketCreate":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":8000},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"category":{"type":"string","maxLength":40},"channel":{"type":"string","enum":["web_chat","whatsapp","email","sms","voice","instagram","facebook","phone","review","other"]},"contact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["subject"],"additionalProperties":false},"TicketUpdate":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"category":{"type":"string","maxLength":40},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"additionalProperties":false},"Review":{"type":"object","properties":{"object":{"const":"review"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"source_id":{"type":"string","format":"uuid","description":"The review source."},"rating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1-5 stars."},"body":{"description":"Text.","type":["string","null"]},"author_display":{"description":"Author name as shown.","type":["string","null"]},"reviewed_at":{"type":"string","format":"date-time","description":"When it was written."},"source_url":{"description":"Link to the review.","type":["string","null"]},"external_id":{"description":"Id on the review site.","type":["string","null"]},"status":{"type":"string","enum":["new","replied","ignored"],"description":"Status."},"reply_draft":{"description":"Reply draft.","type":["string","null"]},"replied_at":{"anyOf":[{"type":"string","format":"date-time","description":"When it was replied to."},{"type":"null"}]},"sentiment":{"description":"positive, neutral or negative.","type":["string","null"]},"ticket_id":{"anyOf":[{"type":"string","format":"uuid","description":"Ticket opened for it."},{"type":"null"}]},"consent_to_feature":{"type":"boolean","description":"Customer agreed to feature it."},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","source_id","rating","body","author_display","reviewed_at","source_url","external_id","status","reply_draft","replied_at","sentiment","ticket_id","consent_to_feature","created_at","updated_at"],"additionalProperties":false,"description":"Customer reviews from Google, Facebook, Justdial and others. Negative reviews open alerts."},"ReviewList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"ReviewCreate":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"rating":{"type":"integer","minimum":1,"maximum":5},"body":{"type":"string","maxLength":8000},"author_display":{"type":"string","maxLength":120},"reviewed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"source_url":{"type":"string","maxLength":2000,"format":"uri"},"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["source_id","rating"],"additionalProperties":false},"Call":{"type":"object","properties":{"object":{"const":"call"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"direction":{"type":"string","enum":["inbound","outbound"],"description":"Direction."},"agent_id":{"anyOf":[{"type":"string","format":"uuid","description":"Voice agent."},{"type":"null"}]},"contact_id":{"anyOf":[{"type":"string","format":"uuid","description":"The contact."},{"type":"null"}]},"lead_id":{"anyOf":[{"type":"string","format":"uuid","description":"Lead created or updated."},{"type":"null"}]},"booking_id":{"anyOf":[{"type":"string","format":"uuid","description":"Booking made on the call."},{"type":"null"}]},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Outbound campaign."},{"type":"null"}]},"from_number":{"description":"Caller number.","type":["string","null"]},"to_number":{"description":"Called number.","type":["string","null"]},"status":{"type":"string","description":"Call status."},"outcome":{"description":"answered, booked, message, transferred or missed.","type":["string","null"]},"language":{"description":"Language.","type":["string","null"]},"started_at":{"type":"string","format":"date-time","description":"Start."},"answered_at":{"anyOf":[{"type":"string","format":"date-time","description":"Answered."},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time","description":"End."},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Duration."},"billed_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Billed minutes."},"summary":{"description":"Summary.","type":["string","null"]},"sentiment":{"description":"Sentiment.","type":["string","null"]},"intent":{"description":"Intent.","type":["string","null"]},"message_taken":{"description":"Message taken for the team.","type":["string","null"]},"is_test":{"type":"boolean","description":"Simulated test call."},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","direction","agent_id","contact_id","lead_id","booking_id","campaign_id","from_number","to_number","status","outcome","language","started_at","answered_at","ended_at","duration_seconds","billed_minutes","summary","sentiment","intent","message_taken","is_test","created_at","updated_at"],"additionalProperties":false,"description":"Phone calls handled by the AI Voice Workforce, with summary, sentiment and outcome. Recordings are not exposed."},"CallList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"Campaign":{"type":"object","properties":{"object":{"const":"campaign"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"name":{"type":"string","description":"Name."},"sequence_id":{"type":"string","format":"uuid","description":"Follow-up sequence."},"segment":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Who is in the campaign."},"status":{"type":"string","description":"Status."},"lead_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leads in the campaign."},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","name","sequence_id","segment","status","lead_count","created_at","updated_at"],"additionalProperties":false,"description":"Old-lead and follow-up campaigns of the AI Revenue Engine."},"CampaignList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"VoiceCampaign":{"type":"object","properties":{"object":{"const":"voice_campaign"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"name":{"type":"string","description":"Name."},"agent_id":{"type":"string","format":"uuid","description":"Voice agent."},"source":{"type":"string","description":"segment or list."},"purpose":{"description":"Purpose.","type":["string","null"]},"timezone":{"type":"string","description":"Calling timezone."},"window_start":{"type":"string","description":"Calling window start (HH:MM:SS)."},"window_end":{"type":"string","description":"Calling window end."},"window_days":{"type":"array","items":{},"description":"Calling days."},"max_attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Attempts per person."},"retry_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minutes between attempts."},"status":{"type":"string","description":"Status."},"target_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People to call."},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","name","agent_id","source","purpose","timezone","window_start","window_end","window_days","max_attempts","retry_minutes","status","target_count","created_at","updated_at"],"additionalProperties":false,"description":"Outbound call campaigns (calling windows, attempts, consent)."},"VoiceCampaignList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceCampaign"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"Prospect":{"type":"object","properties":{"object":{"const":"prospect"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"account_id":{"anyOf":[{"type":"string","format":"uuid","description":"Target account."},{"type":"null"}]},"contact_id":{"anyOf":[{"type":"string","format":"uuid","description":"Linked contact."},{"type":"null"}]},"name":{"type":"string","description":"Name."},"title":{"description":"Job title.","type":["string","null"]},"email":{"description":"Email.","type":["string","null"]},"phone":{"description":"Phone.","type":["string","null"]},"linkedin_url":{"description":"LinkedIn profile.","type":["string","null"]},"timezone":{"description":"Timezone.","type":["string","null"]},"region":{"type":"string","enum":["in","us","ca","eu","uk","ae","sa","br","au","other"],"description":"Region (decides the privacy rules)."},"lawful_basis":{"type":"string","enum":["legitimate_interest","consent","none"],"description":"Lawful basis for contact."},"status":{"type":"string","description":"Status."},"opted_out_at":{"anyOf":[{"type":"string","format":"date-time","description":"Opted out."},{"type":"null"}]},"last_contacted_at":{"anyOf":[{"type":"string","format":"date-time","description":"Last contacted."},{"type":"null"}]},"last_replied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Last reply."},{"type":"null"}]},"source":{"description":"Source.","type":["string","null"]},"owner_id":{"anyOf":[{"type":"string","format":"uuid","description":"Owner."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","account_id","contact_id","name","title","email","phone","linkedin_url","timezone","region","lawful_basis","status","opted_out_at","last_contacted_at","last_replied_at","source","owner_id","created_at","updated_at"],"additionalProperties":false,"description":"B2B prospects of the AI Sales Workforce. A lawful basis is required; do-not-contact rules always apply."},"ProspectList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Prospect"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"ProspectCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+?[0-9]{7,15}$"},"linkedin_url":{"type":"string","maxLength":300,"pattern":"^https:\\/\\/([a-z]{2,3}\\.)?linkedin\\.com\\/"},"timezone":{"type":"string","maxLength":60},"region":{"type":"string","enum":["in","us","ca","eu","uk","ae","sa","br","au","other"]},"lawful_basis":{"type":"string","enum":["legitimate_interest","consent","none"]},"basis_note":{"type":"string","maxLength":300},"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"source":{"type":"string","maxLength":60},"notes":{"type":"string","maxLength":4000}},"required":["name","region","lawful_basis"],"additionalProperties":false},"ProspectUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^\\+?[0-9]{7,15}$"},{"type":"null"}]},"linkedin_url":{"anyOf":[{"type":"string","maxLength":300,"pattern":"^https:\\/\\/([a-z]{2,3}\\.)?linkedin\\.com\\/"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"Document":{"type":"object","properties":{"object":{"const":"document"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"doc_type_id":{"type":"string","format":"uuid","description":"Document type."},"file_name":{"type":"string","description":"File name."},"mime_type":{"type":"string","description":"MIME type."},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size."},"sha256":{"description":"SHA-256 of the file.","type":["string","null"]},"status":{"type":"string","description":"Processing status."},"scan_status":{"type":"string","description":"Virus scan status."},"extraction_mode":{"description":"ai, rules or manual.","type":["string","null"]},"extracted_fields":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Fields read."},"corrected_fields":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Fields corrected in review."},"record_id":{"anyOf":[{"type":"string","format":"uuid","description":"Record created from it."},{"type":"null"}]},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time","description":"Uploaded."},{"type":"null"}]},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","doc_type_id","file_name","mime_type","size_bytes","sha256","status","scan_status","extraction_mode","extracted_fields","corrected_fields","record_id","uploaded_at","reviewed_at","created_at","updated_at"],"additionalProperties":false,"description":"Back-office document metadata (no file contents, no extracted values). Bank statements and KYC are never listed."},"DocumentList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"BusinessRecord":{"type":"object","properties":{"object":{"const":"record"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"kind":{"type":"string","description":"bill, invoice, expense, purchase_order or quote."},"status":{"type":"string","description":"Status."},"document_id":{"anyOf":[{"type":"string","format":"uuid","description":"Source document."},{"type":"null"}]},"party_id":{"anyOf":[{"type":"string","format":"uuid","description":"Vendor or customer."},{"type":"null"}]},"party_name":{"description":"Vendor or customer name.","type":["string","null"]},"number":{"description":"Document number.","type":["string","null"]},"issue_date":{"anyOf":[{"type":"string","format":"date","description":"Issue date."},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date","description":"Due date."},{"type":"null"}]},"currency":{"type":"string","description":"Currency."},"subtotal":{"description":"Subtotal.","type":["number","null"]},"tax_amount":{"description":"Tax.","type":["number","null"]},"total":{"type":"number","description":"Total."},"category":{"description":"Category.","type":["string","null"]},"notes":{"description":"Notes.","type":["string","null"]},"flags":{"type":"array","items":{"type":"string"},"description":"Flags."},"approved_at":{"anyOf":[{"type":"string","format":"date-time","description":"Approved."},{"type":"null"}]},"scheduled_for":{"anyOf":[{"type":"string","format":"date","description":"Payment scheduled for."},{"type":"null"}]},"paid_at":{"anyOf":[{"type":"string","format":"date-time","description":"Marked paid."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","kind","status","document_id","party_id","party_name","number","issue_date","due_date","currency","subtotal","tax_amount","total","category","notes","flags","approved_at","scheduled_for","paid_at","created_at","updated_at"],"additionalProperties":false,"description":"Approved bills, invoices, expenses, purchase orders and quotations (sensitive records excluded)."},"BusinessRecordList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/BusinessRecord"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"Post":{"type":"object","properties":{"object":{"const":"post"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"plan_id":{"anyOf":[{"type":"string","format":"uuid","description":"Content plan."},{"type":"null"}]},"channel":{"type":"string","description":"Channel."},"status":{"type":"string","description":"idea, draft, in_review, approved, scheduled, published_manually or archived."},"title":{"description":"Title.","type":["string","null"]},"caption":{"description":"Caption or body.","type":["string","null"]},"hashtags":{"type":"array","items":{"type":"string"},"description":"Hashtags."},"alt_text":{"description":"Image alt text.","type":["string","null"]},"link_url":{"description":"Link.","type":["string","null"]},"language":{"type":"string","enum":["en","ta","hi","ar"],"description":"Language."},"publish_date":{"anyOf":[{"type":"string","format":"date","description":"Planned date."},{"type":"null"}]},"publish_time":{"description":"Planned time (HH:MM:SS).","type":["string","null"]},"variant_of":{"anyOf":[{"type":"string","format":"uuid","description":"Original post of a variant."},{"type":"null"}]},"source":{"type":"string","description":"How it was made."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Version number."},"approved_at":{"anyOf":[{"type":"string","format":"date-time","description":"Approved."},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string","format":"date-time","description":"Marked published."},{"type":"null"}]},"published_url":{"description":"Published link.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","plan_id","channel","status","title","caption","hashtags","alt_text","link_url","language","publish_date","publish_time","variant_of","source","version","approved_at","published_at","published_url","created_at","updated_at"],"additionalProperties":false,"description":"AI Content Studio posts. Posts created through the API are drafts; approval and publishing stay in the app."},"PostList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"PostCreate":{"type":"object","properties":{"channel":{"type":"string","enum":["instagram","facebook","linkedin","x","youtube","google_business","blog","email","whatsapp_status"]},"title":{"type":"string","maxLength":300},"caption":{"type":"string","maxLength":63206},"hashtags":{"maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"alt_text":{"type":"string","maxLength":1000},"link_url":{"type":"string","maxLength":2000,"format":"uri"},"language":{"type":"string","enum":["en","ta","hi","ar"]},"publish_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"publish_time":{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$"}},"required":["channel"],"additionalProperties":false},"PostUpdate":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"caption":{"anyOf":[{"type":"string","maxLength":63206},{"type":"null"}]},"hashtags":{"maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"alt_text":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"link_url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"language":{"type":"string","enum":["en","ta","hi","ar"]},"publish_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"publish_time":{"anyOf":[{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$"},{"type":"null"}]}},"additionalProperties":false},"KnowledgeArticle":{"type":"object","properties":{"object":{"const":"knowledge_article"},"id":{"type":"string","format":"uuid","description":"Unique id (UUID)."},"title":{"type":"string","description":"Title."},"source_kind":{"type":"string","enum":["text","url","file","faq"],"description":"Kind."},"content":{"description":"Text.","type":["string","null"]},"status":{"type":"string","description":"pending, processing, ready or error."},"published":{"type":"boolean","description":"Shown in the public help centre."},"slug":{"description":"Help centre URL slug.","type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","description":"Published."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was created."},"updated_at":{"type":"string","format":"date-time","description":"When it last changed."}},"required":["object","id","title","source_kind","content","status","published","slug","published_at","created_at","updated_at"],"additionalProperties":false,"description":"Knowledge base used by the AI assistants and the public help centre. Articles are indexed for search when saved."},"KnowledgeArticleList":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeArticle"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= to get the next page."}}},"KnowledgeArticleCreate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":10,"maxLength":60000},"source_kind":{"type":"string","enum":["text","faq"]},"published":{"type":"boolean"},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,79}$"}},"required":["title","content"],"additionalProperties":false},"KnowledgeArticleUpdate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":10,"maxLength":60000},"published":{"type":"boolean"},"slug":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,79}$"},{"type":"null"}]}},"additionalProperties":false}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from Developers > API keys (opk_live_...)."},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://app.originpixel.in/oauth/authorize","tokenUrl":"https://app.originpixel.in/api/oauth/token","refreshUrl":"https://app.originpixel.in/api/oauth/token","scopes":{"contacts:read":"Read: Contacts","contacts:write":"Read and write: Contacts","front_desk:read":"Read: AI Front Desk (conversations, messages, bookings, knowledge)","front_desk:write":"Read and write: AI Front Desk (conversations, messages, bookings, knowledge)","revenue_engine:read":"Read: AI Revenue Engine (leads, campaigns)","revenue_engine:write":"Read and write: AI Revenue Engine (leads, campaigns)","voice:read":"Read: AI Voice Workforce (calls, call campaigns)","voice:write":"Read and write: AI Voice Workforce (calls, call campaigns)","customer_experience:read":"Read: AI Customer Experience (tickets, reviews)","customer_experience:write":"Read and write: AI Customer Experience (tickets, reviews)","sales:read":"Read: AI Sales Workforce (prospects)","sales:write":"Read and write: AI Sales Workforce (prospects)","business_intelligence:read":"Read: AI Business Intelligence (metrics)","business_intelligence:write":"Read and write: AI Business Intelligence (metrics)","back_office:read":"Read: AI Back-Office Workforce (documents, records)","back_office:write":"Read and write: AI Back-Office Workforce (documents, records)","content:read":"Read: AI Content Studio (posts)","content:write":"Read and write: AI Content Studio (posts)"}},"clientCredentials":{"tokenUrl":"https://app.originpixel.in/api/oauth/token","scopes":{"contacts:read":"Read: Contacts","contacts:write":"Read and write: Contacts","front_desk:read":"Read: AI Front Desk (conversations, messages, bookings, knowledge)","front_desk:write":"Read and write: AI Front Desk (conversations, messages, bookings, knowledge)","revenue_engine:read":"Read: AI Revenue Engine (leads, campaigns)","revenue_engine:write":"Read and write: AI Revenue Engine (leads, campaigns)","voice:read":"Read: AI Voice Workforce (calls, call campaigns)","voice:write":"Read and write: AI Voice Workforce (calls, call campaigns)","customer_experience:read":"Read: AI Customer Experience (tickets, reviews)","customer_experience:write":"Read and write: AI Customer Experience (tickets, reviews)","sales:read":"Read: AI Sales Workforce (prospects)","sales:write":"Read and write: AI Sales Workforce (prospects)","business_intelligence:read":"Read: AI Business Intelligence (metrics)","business_intelligence:write":"Read and write: AI Business Intelligence (metrics)","back_office:read":"Read: AI Back-Office Workforce (documents, records)","back_office:write":"Read and write: AI Back-Office Workforce (documents, records)","content:read":"Read: AI Content Studio (posts)","content:write":"Read and write: AI Content Studio (posts)"}}}}},"parameters":{"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the first response (24 hours)."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in this minute."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."},"RequestId":{"schema":{"type":"string"},"description":"Quote this when you contact support."}},"responses":{"E400":{"description":"Bad request","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E401":{"description":"Missing or invalid credentials","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E403":{"description":"Not allowed (scope, package or IP)","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E404":{"description":"Not found","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E409":{"description":"Conflict","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E422":{"description":"Validation failed","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}