{"openapi":"3.1.0","info":{"title":"OpenCX API","description":"\nOpenCX is an AI-powered, all-in-one platform for customer support and outbound communications.\n\nUse this API to manage your OpenCX organization's AI agents, actions, conversations, contacts, and more.\n\nTo get started, generate a new API key from the dashboard.\n\n## Authentication\nAll API endpoints require authentication using a Bearer token. You can generate an API key from your OpenCX dashboard.\n\n## Rate Limiting\nAPI requests are rate limited to ensure fair usage. The current limits are:\n- 100 requests per minute for standard endpoints\n- 1000 requests per minute for streaming endpoints\n\n## Error Handling\nThe API uses standard HTTP status codes and returns detailed error messages in the response body.\n","version":"1.0-beta","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SessionChannel":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SessionChannel","type":"string","enum":["web","email","phone_voice","slack","sms","whatsapp","instagram","messenger","api","web_voice"]},"CreateSlaPolicyDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateSlaPolicyDtoInput","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"office_hours_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"first_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":60,"maximum":9007199254740991},{"type":"null"}]},"next_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":60,"maximum":9007199254740991},{"type":"null"}]},"resolution_target_seconds":{"anyOf":[{"type":"integer","minimum":300,"maximum":9007199254740991},{"type":"null"}]}},"required":["name"]},"UpdateSlaPolicyDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateSlaPolicyDtoInput","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"office_hours_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"first_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":60,"maximum":9007199254740991},{"type":"null"}]},"next_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":60,"maximum":9007199254740991},{"type":"null"}]},"resolution_target_seconds":{"anyOf":[{"type":"integer","minimum":300,"maximum":9007199254740991},{"type":"null"}]}}},"ContactsFilter":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ContactsFilter","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"all_contacts"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contact_id_in"},"contact_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","contact_ids"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_created_at_between"},"after":{"type":"string","format":"date-time"},"before":{"type":"string","format":"date-time"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_email_domain_name_in"},"domain_name_in":{"type":"array","items":{"type":"string"}}},"required":["type","domain_name_in"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_affected_by_sequence"},"sequence_id":{"type":"string"}},"required":["type","sequence_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_name_in"},"name_in":{"type":"array","items":{"type":"string"}}},"required":["type","name_in"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_phone_number_in"},"phone_number_in":{"type":"array","items":{"type":"string"}}},"required":["type","phone_number_in"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_email_in"},"email_in":{"type":"array","items":{"type":"string"}}},"required":["type","email_in"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_attributes_in"},"attributes":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contacts_sessions_attributes_in"},"attributes":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contact_belongs_to_segment"},"segment_id":{"type":"string"}},"required":["type","segment_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"last_contacted_at_between"},"after":{"type":"string","format":"date-time"},"before":{"type":"string","format":"date-time"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"last_contacted_at_with_handoff_between"},"after":{"type":"string","format":"date-time"},"before":{"type":"string","format":"date-time"}},"required":["type"],"additionalProperties":false}]},"CreateGroupDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateGroupDtoInput","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"is_support_enabled":{"type":"boolean"},"support_office_hours_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"support_assignment_strategy":{"type":"string","enum":["least-busy","round-robin","unassigned"]}},"required":["name"]},"MakeOutboundCallDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/MakeOutboundCallDtoInput","type":"object","properties":{"phoneAgentId":{"type":"string"},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}]}},"required":["phoneAgentId","contact"]},"WhatsAppTemplateVariableDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/WhatsAppTemplateVariableDto","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"GLOBAL_DYNAMIC"},"ref":{"type":"string","enum":["CONTACT_NAME","CONTACT_EMAIL","CONTACT_NUMBER"]},"fallback":{"type":"string"}},"required":["type","ref","fallback"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"DYNAMIC"},"ref":{"type":"string"},"fallback":{"type":"string"}},"required":["type","ref","fallback"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"CONSTANT"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}]},"WhatsAppTemplateMappingDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/WhatsAppTemplateMappingDto","type":"object","properties":{"header":{"type":"object","properties":{"type":{"type":"string","const":"header"},"parameters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"},"parameter_name":{"description":"Required if parameters are named","type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image","description":"JPEG, JPG, PNG"},"image":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"}},"required":["link"],"additionalProperties":false}},"required":["type","image"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"video","description":"MP4"},"video":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"}},"required":["link"],"additionalProperties":false}},"required":["type","video"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document","description":"PDF"},"document":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"}},"required":["link"],"additionalProperties":false}},"required":["type","document"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"location"},"location":{"type":"object","properties":{"latitude":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"},"longitude":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"},"name":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"},"address":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"}},"required":["latitude","longitude","name","address"],"additionalProperties":false}},"required":["type","location"],"additionalProperties":false}]}}},"required":["type","parameters"],"additionalProperties":false},"body":{"type":"object","properties":{"type":{"type":"string","const":"body"},"parameters":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"},"parameter_name":{"description":"Required if parameters are named","type":"string"}},"required":["type","text"],"additionalProperties":false}}},"required":["type","parameters"],"additionalProperties":false},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"button"},"index":{"type":"string","enum":["0","1","2","3","4","5","6","7","8","9"]},"sub_type":{"type":"string","const":"url"},"parameters":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"$ref":"#/components/schemas/WhatsAppTemplateVariableDto"}},"required":["type","text"],"additionalProperties":false}}},"required":["type","index","sub_type","parameters"],"additionalProperties":false}}},"additionalProperties":false},"GetVocQueryDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GetVocQueryDtoInput","type":"object","properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category name"},"status":{"anyOf":[{"default":"all","type":"string","enum":["all","unresolved","resolved","archived"]},{"type":"null"}]},"sentiment":{"anyOf":[{"description":"Filter by sentiment","type":"string","enum":["angry","happy","neutral"]},{"type":"null"}]},"sortBy":{"anyOf":[{"default":"occurrence_count","type":"string","enum":["occurrence_count","last_seen_at","first_seen_at","created_at"]},{"type":"null"}]},"sortOrder":{"anyOf":[{"default":"desc","type":"string","enum":["asc","desc"]},{"type":"null"}]},"minSessions":{"anyOf":[{"description":"Minimum occurrence count","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"search":{"description":"Search in insight content","anyOf":[{"type":"string"},{"type":"null"}]},"teamId":{"description":"Filter by specific team ID or none for unassigned insights","anyOf":[{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","const":"not_assigned"},{"type":"null","const":null}]},{"type":"null"}]},"insightNumber":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Filter by insight number"},"sessionLanguage":{"description":"Filter by language","anyOf":[{"type":"string","enum":["el","de","fr","it","es","pt","nl","da","sv","no","fi","et","is","pl","cs","sk","hu","ro","bg","hr","sr","uk","ru","tr","en","zh","ja","ko","hi","id","ms","th","vi","tl","ar","he","fa","af","sw"]},{"type":"null"}]},"ticketSentiment":{"anyOf":[{"description":"Filter by sentiment","type":"string","enum":["angry","happy","neutral"]},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SessionChannel"},{"type":"null"}],"description":"Filter by session channel"},"sessionFromDate":{"anyOf":[{"description":"Filter sessions created from this date (ISO 8601)","type":"string"},{"type":"null"}]},"sessionToDate":{"anyOf":[{"description":"Filter sessions created to this date (ISO 8601)","type":"string"},{"type":"null"}]},"sessionStatus":{"anyOf":[{"type":"string","enum":["closed_resolved","closed_unresolved","open"]},{"type":"null"}],"description":"Filter by session status"},"sessionContactId":{"anyOf":[{"description":"Filter by session contact ID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"ticketCustomData":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},{"type":"null"}],"description":"A list of objects with key-value pairs to filter by. Relationship is OR between objects, and AND between the values in each object"},"contactCustomData":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},{"type":"null"}],"description":"Filter by contact custom data key-value pairs"},"page":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"FileUploadDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/FileUploadDtoInput","anyOf":[{"type":"object","properties":{"file":{"type":"string","format":"binary","contentEncoding":"binary","description":"The file to upload. 5MB max."}},"required":["file"]},{"type":"null"}]},"AddUserToGroupDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AddUserToGroupDtoInput","type":"object","properties":{"userId":{"type":"number"},"groupId":{"type":"string"}},"required":["userId","groupId"]},"RedactMessageDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/RedactMessageDtoInput","type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"The message UUID to be redacted"},"reason":{"description":"Optional reason for redaction","type":"string"}},"required":["messageId"]},"RedactSessionDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/RedactSessionDtoInput","type":"object","properties":{"sessionId":{"type":"string","minLength":1,"description":"The session UUID whose messages will be redacted"},"reason":{"description":"Optional reason for redaction","type":"string"}},"required":["sessionId"]},"SalesforceMiawWebhookBody":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SalesforceMiawWebhookBodyInput","type":"object","properties":{"event":{"type":"string","enum":["message:new"]},"session_id":{"type":"string"}},"required":["event","session_id"]},"CreateWebsiteDatasourceDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateWebsiteDatasourceDtoInput","type":"object","properties":{"url":{"type":"string","format":"uri"},"display_name":{"type":"string"},"page_limit":{"default":100,"anyOf":[{"type":"integer","minimum":1,"maximum":5000},{"type":"null"}]},"exclude_paths":{"default":[],"type":"array","items":{"type":"string"}},"include_paths":{"default":[],"type":"array","items":{"type":"string"}},"crawl_interval_hours":{"default":168,"anyOf":[{"type":"integer","minimum":24,"maximum":9007199254740991},{"type":"null"}]},"auto_start_crawl":{"default":true,"type":"boolean"}},"required":["url"]},"UpdateWebsiteDatasourceDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateWebsiteDatasourceDtoInput","type":"object","properties":{"display_name":{"type":"string"},"page_limit":{"anyOf":[{"type":"integer","minimum":1,"maximum":5000},{"type":"null"}]},"exclude_paths":{"type":"array","items":{"type":"string"}},"include_paths":{"type":"array","items":{"type":"string"}},"crawl_interval_hours":{"anyOf":[{"type":"integer","minimum":24,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["active","paused"]}}},"BulkPageActionDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/BulkPageActionDtoInput","type":"object","properties":{"page_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["page_ids"]},"DeletePagesDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/DeletePagesDtoInput","type":"object","properties":{"page_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"delete_kb_items":{"default":false,"type":"boolean"}},"required":["page_ids"]},"SyncPageByUrlDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SyncPageByUrlDtoInput","type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL to scrape and sync to the knowledge base"}},"required":["url"]},"CreateActionPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateActionPublicDtoInput","type":"object","properties":{"name":{"type":"string","description":"Action display name"},"description":{"description":"What this action does","type":"string"},"api_endpoint":{"type":"string","format":"uri","description":"The full API endpoint URL to call"},"request_type":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method"},"operation_id":{"description":"Unique operation ID (auto-generated from name if omitted)","type":"string"},"payload":{"type":"object","properties":{"base_url":{"description":"Base URL for the API endpoint","type":"string"},"path":{"description":"API path (e.g. \"/api/v1/bookings\")","type":"string"},"method":{"description":"HTTP method (get, post, put, delete, patch)","type":"string"},"operationId":{"description":"OpenAPI operation ID","type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"Request parameters","type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Parameter name"},"in":{"type":"string","enum":["query","path","header","cookie"],"description":"Where the parameter is sent"},"description":{"type":"string"},"required":{"type":"boolean"},"schema":{"description":"JSON Schema for the parameter value","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","in"]}},"requestBody":{"description":"Request body specification","type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean"},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"description":"Content type to schema mapping (e.g. \"application/json\": { schema: {...} })"}},"required":["content"]},"responses":{"description":"Response specifications keyed by status code","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":{},"description":"OpenAPI-style operation spec: parameters, requestBody, responses, etc."},"enabled_on_channel":{"description":"Channel restrictions (defaults to web only)","type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/SessionChannel"},"description":"Channels where this action is available (e.g. [\"web\", \"email\", \"whatsapp\"])"}},"required":["channels"]},"pinned":{"description":"Whether to pin this action prominently","type":"boolean"},"tags":{"description":"Tags for organizing actions","type":"array","items":{"type":"string"}},"require_form_submission":{"description":"Require the user to submit a form before executing","type":"boolean"}},"required":["name","api_endpoint","request_type","payload"]},"UpdateActionPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateActionPublicDtoInput","type":"object","properties":{"name":{"type":"string","description":"Action display name"},"description":{"description":"What this action does","type":"string"},"api_endpoint":{"type":"string","format":"uri","description":"The full API endpoint URL to call"},"request_type":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method"},"operation_id":{"description":"Unique operation ID (auto-generated from name if omitted)","type":"string"},"payload":{"type":"object","properties":{"base_url":{"description":"Base URL for the API endpoint","type":"string"},"path":{"description":"API path (e.g. \"/api/v1/bookings\")","type":"string"},"method":{"description":"HTTP method (get, post, put, delete, patch)","type":"string"},"operationId":{"description":"OpenAPI operation ID","type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"Request parameters","type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Parameter name"},"in":{"type":"string","enum":["query","path","header","cookie"],"description":"Where the parameter is sent"},"description":{"type":"string"},"required":{"type":"boolean"},"schema":{"description":"JSON Schema for the parameter value","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","in"]}},"requestBody":{"description":"Request body specification","type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean"},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"description":"Content type to schema mapping (e.g. \"application/json\": { schema: {...} })"}},"required":["content"]},"responses":{"description":"Response specifications keyed by status code","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":{},"description":"OpenAPI-style operation spec: parameters, requestBody, responses, etc."},"enabled_on_channel":{"description":"Channel restrictions (defaults to web only)","type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/SessionChannel"},"description":"Channels where this action is available (e.g. [\"web\", \"email\", \"whatsapp\"])"}},"required":["channels"]},"pinned":{"description":"Whether to pin this action prominently","type":"boolean"},"tags":{"description":"Tags for organizing actions","type":"array","items":{"type":"string"}},"require_form_submission":{"description":"Require the user to submit a form before executing","type":"boolean"}}},"UpdateAutopilotInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateAutopilotInputDtoInput","type":"object","properties":{"channel":{"type":"string","enum":["web","email","phone","whatsapp","slack","sms","instagram","messenger","api","web_voice"],"description":"Channel to update: web, email, phone, whatsapp, slack, sms, instagram, messenger, api, web_voice"},"autopilot_enabled":{"type":"boolean","description":"Set true to enable autopilot, false to disable"},"ai_agent_version":{"description":"AI agent version to use for this channel","type":"string","enum":["v1","v2"]}},"required":["channel","autopilot_enabled"]},"ChatAttachmentInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ChatAttachmentInputInput","type":"object","properties":{"name":{"type":"string","description":"The name of the file"},"url":{"description":"The URL of the file (mutually exclusive with base64)","type":"string"},"base64":{"description":"Base64-encoded file content (mutually exclusive with url). Can be a data URL (data:mimetype;base64,...) or raw base64 string.","type":"string"},"mime_type":{"description":"MIME type of the file (e.g., \"image/png\", \"application/pdf\"). Optional if using data URL format or if type can be detected from file content.","type":"string"}},"required":["name"]},"PublicAPIHttpOverrides":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PublicAPIHttpOverridesInput","type":"object","properties":{"query_params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"path_params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body_params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"LanguageIsoCodeValues":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/LanguageIsoCodeValuesInput","type":"string","enum":["en","fr","de","nl","pl","pt","es","it","ru","ja","ko","zh","ar","tr","sv","da","no","fi","el","cs","hu","th","vi","id","he","hi","uk","ro","bg","hr","sk","sl","sr","et","lv","lt","is","ga","ms","tl","fa","bn","ta","te","ur","sw","zu","af","sq","hy","az","eu","be","bs","ca","cy"]},"AuthenticateUserPayloadDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AuthenticateUserPayloadDtoInput","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"type":"string"},"language":{"$ref":"#/components/schemas/LanguageIsoCodeValues"},"customData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"chat_context":{"type":"string"},"http_action_overrides":{"$ref":"#/components/schemas/PublicAPIHttpOverrides"}},"required":["email"]},"SaveContactInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SaveContactInputInput","type":"object","properties":{"contact":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string"},"name":{"type":"string"},"custom_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"http_action_overrides":{"$ref":"#/components/schemas/PublicAPIHttpOverrides"}}}},"required":["contact"]},"UpdateContactInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateContactInputInput","type":"object","properties":{"contact":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string"},"name":{"type":"string"},"custom_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"http_action_overrides":{"$ref":"#/components/schemas/PublicAPIHttpOverrides"}}}},"required":["contact"]},"PublicContactsFilter":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PublicContactsFilterInput","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"all_contacts"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"contact_id_in"},"contact_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","contact_ids"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_created_at_between"},"after":{},"before":{}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_email_domain_name_in"},"domain_name_in":{"type":"array","items":{"type":"string"}}},"required":["type","domain_name_in"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_name_in"},"name_in":{"type":"array","items":{"type":"string"}}},"required":["type","name_in"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_phone_number_in"},"phone_number_in":{"type":"array","items":{"type":"string"}}},"required":["type","phone_number_in"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_email_in"},"email_in":{"type":"array","items":{"type":"string"}}},"required":["type","email_in"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_attributes_in"},"attributes":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"contacts_affected_by_sequence"},"sequence_id":{"type":"string"}},"required":["type","sequence_id"]},{"type":"object","properties":{"type":{"type":"string","const":"last_contacted_at_between"},"after":{},"before":{}},"required":["type"]}]},"PublicContactsCompositeFilter":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PublicContactsCompositeFilterInput","type":"object","properties":{"or":{"minItems":1,"type":"array","items":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/PublicContactsFilter"}}},"required":["and"]}}},"required":["or"]},"SearchContactsInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SearchContactsInputInput","type":"object","properties":{"filter":{"$ref":"#/components/schemas/PublicContactsCompositeFilter"},"cursor":{"description":"Pagination cursor to fetch the next set of results","type":"string"}},"required":["filter"]},"CreateChatSessionInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateChatSessionInputInput","type":"object","properties":{"contact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"default":{"type":"api"},"type":"object","properties":{"type":{"$ref":"#/components/schemas/SessionChannel"}},"required":["type"]},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}]}}},"UpdateChatSessionInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateChatSessionInputInput","type":"object","properties":{"status":{"type":"string","enum":["open","closed_resolved","closed_unresolved"]},"generate_summary_and_sentiment_on_resolve":{"type":"boolean"},"reflect_status_change_for_integration":{"type":"boolean"},"session_closed_payload":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"string"}]}}},"SendMessageInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SendMessageInputInput","type":"object","properties":{"sender":{"type":"string","enum":["contact","agent"]},"contact":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone_number":{"type":"string"},"avatar_url":{"type":"string"},"custom_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"agent":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"avatar_url":{"type":"string"}}},"message":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ChatAttachmentInput"}}},"required":["type","text"]},"should_take_over_session_from_ai":{"default":false,"type":"boolean"}},"required":["sender","message"]},"FilterSessionsPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/FilterSessionsPublicDtoInput","type":"object","properties":{"filters":{"default":{},"type":"object","properties":{"date":{"description":"Date range filter on session creation time","type":"object","properties":{"from":{"description":"Start date (ISO 8601)","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))$"},"to":{"description":"End date (ISO 8601)","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))$"}}},"channels":{"description":"Filter by channels (web, email, whatsapp, phone_voice, sms, slack, etc.)","type":"array","items":{"$ref":"#/components/schemas/SessionChannel"}},"status":{"description":"Filter by status codes (0 = open, 1 = closed_resolved, 2 = closed_unresolved, or custom status IDs)","type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"ai_closure":{"description":"Filter by AI closure type (e.g. \"handed_off\", \"resolved\", \"no_resolution\")","type":"array","items":{"type":"string","enum":["assumed_resolved","handed_off","resolved"]}},"sentiment":{"description":"Filter by customer sentiment (angry, happy, neutral)","type":"array","items":{"type":"string","enum":["angry","happy","neutral"]}},"assignees":{"description":"Filter by assignee user IDs (empty array = unassigned)","type":"array","items":{"type":"number"}},"team_ids":{"description":"Filter by team/group IDs","type":"array","items":{"type":"string"}},"contact_ids":{"description":"Filter by contact IDs","type":"array","items":{"type":"string"}},"ticket_number":{"description":"Filter by exact ticket number","type":"number"},"language":{"description":"Filter by session language codes","type":"array","items":{"type":"string"}},"tags":{"description":"Filter by tag names (sessions must have ALL specified tags)","type":"array","items":{"type":"string"}},"waiting_on":{"description":"Filter by who the session is waiting on","type":"string","enum":["customers","human_agents"]},"custom_data":{"description":"Filter by session custom data (OR between objects, AND within each object)","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}},"sort_by":{"description":"Sort field (default: last_message_at)","type":"string","enum":["last_message_at","created_at"]},"sort_order":{"description":"Sort direction (default: desc)","type":"string","enum":["asc","desc"]},"page":{"default":1,"description":"Page number (1-based, default: 1)","type":"number"},"limit":{"default":25,"description":"Results per page (1-100, default: 25)","type":"number"}}},"EmailRecipient":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/EmailRecipientInput","type":"object","properties":{"to_email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"email_body":{"type":"string"},"email_subject":{"type":"string"},"email_sender_name":{"type":"string"},"email_is_transactional":{"type":"boolean"}},"required":["to_email"]},"SendEmailInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SendEmailInputInput","type":"object","properties":{"from_email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/EmailRecipient"}},"delay_in_minutes":{"type":"number","exclusiveMinimum":0},"fallback_email_subject":{"type":"string"},"fallback_email_sender_name":{"type":"string"},"fallback_email_body":{"type":"string"}},"required":["from_email","recipients"]},"PutCustomDomainInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PutCustomDomainInputInput","type":"object","properties":{"domainName":{"type":"string"}},"required":["domainName"]},"CreateOfficeHoursPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateOfficeHoursPublicDtoInput","type":"object","properties":{"name":{"type":"string","description":"Schedule name (e.g. \"Business Hours\", \"Weekend Support\")"},"iana_timezone":{"type":"string","description":"IANA timezone for the schedule (e.g. \"America/New_York\", \"Europe/London\", \"Asia/Tokyo\")"},"shifts":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"string","enum":["everyday","friday","friday_and_saturday","monday","monday_to_friday","saturday","sunday","sunday_and_monday","sunday_to_thursday","thursday","tuesday","wednesday"],"description":"Day(s) of week: \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\", \"everyday\", \"monday_to_friday\", \"sunday_to_thursday\", \"friday_and_saturday\", \"sunday_and_monday\""},"start_time":{"type":"string","description":"Start time in HH:mm:ss format (e.g. \"09:00:00\")"},"end_time":{"type":"string","description":"End time in HH:mm:ss format (e.g. \"17:00:00\")"}},"required":["day_of_week","start_time","end_time"]},"description":"Time blocks when support is available. Use day ranges like \"monday_to_friday\" for convenience."}},"required":["name","iana_timezone","shifts"]},"UpdateOfficeHoursPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateOfficeHoursPublicDtoInput","type":"object","properties":{"name":{"type":"string","description":"Updated schedule name"},"iana_timezone":{"type":"string","description":"Updated IANA timezone"},"shifts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Shift ID (from the existing schedule)"},"day_of_week":{"type":"string","enum":["everyday","friday","friday_and_saturday","monday","monday_to_friday","saturday","sunday","sunday_and_monday","sunday_to_thursday","thursday","tuesday","wednesday"],"description":"Day(s) of week: \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\", \"everyday\", \"monday_to_friday\", \"sunday_to_thursday\", \"friday_and_saturday\", \"sunday_and_monday\""},"start_time":{"type":"string","description":"Start time in HH:mm:ss format (e.g. \"09:00:00\")"},"end_time":{"type":"string","description":"End time in HH:mm:ss format (e.g. \"17:00:00\")"}},"required":["id","day_of_week","start_time","end_time"]},"description":"Complete list of shifts — replaces all existing shifts"}},"required":["name","iana_timezone","shifts"]},"UpdateOrganizationInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateOrganizationInputDtoInput","type":"object","properties":{"name":{"description":"The name of the organization.","type":"string","minLength":1}}},"CreatePhoneAgentPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreatePhoneAgentPublicDtoInput","type":"object","properties":{"name":{"type":"string","description":"Agent display name"},"type":{"description":"Agent type: \"inbound\" (receives calls, default) or \"outbound\" (makes calls)","type":"string","enum":["inbound","outbound"]},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Voice ID from the /phone/voices endpoint. Omit for default voice."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary language code (e.g. \"en\", \"es\", \"fr\")"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the agent says when it picks up (default: \"Hello?\")"},"instructions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Training scenario IDs to attach to this agent"},"handoff_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Phone number to transfer to when handing off to a human (E.164 format)"},"use_org_knowledgebase":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the agent can search your knowledge base during calls (default: false)"},"actionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Action IDs the agent can call during conversations"}},"required":["name"]},"UpdatePhoneAgentPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdatePhoneAgentPublicDtoInput","type":"object","properties":{"name":{"type":"string","description":"Agent display name"},"type":{"description":"Agent type: \"inbound\" (receives calls, default) or \"outbound\" (makes calls)","type":"string","enum":["inbound","outbound"]},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Voice ID from the /phone/voices endpoint. Omit for default voice."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary language code (e.g. \"en\", \"es\", \"fr\")"},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the agent says when it picks up (default: \"Hello?\")"},"instructions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Training scenario IDs to attach to this agent"},"handoff_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Phone number to transfer to when handing off to a human (E.164 format)"},"use_org_knowledgebase":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the agent can search your knowledge base during calls (default: false)"},"actionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Action IDs the agent can call during conversations"}}},"CreateSequenceInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateSequenceInputInput","type":"object","properties":{"name":{"default":"New Sequence","type":"string"},"custom_id":{"type":"string"},"is_continuous":{"default":true,"type":"boolean"},"filter":{"anyOf":[{"type":"object","properties":{"or":{"minItems":1,"type":"array","items":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ContactsFilter"}}},"required":["and"]}}},"required":["or"]},{"type":"null"}]},"steps":{"minItems":1,"type":"array","items":{"type":"object","properties":{"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"send_emails"},"data":{"type":"object","properties":{"from_email":{"type":"string"},"email_subject":{"type":"string"},"email_body":{"type":"string"},"email_sender_name":{"type":"string"},"email_is_transactional":{"type":"boolean"}},"required":["from_email","email_subject","email_body","email_sender_name","email_is_transactional"]}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","const":"make_phone_calls"},"data":{"type":"object","properties":{"aiPhoneAgentId":{"type":"string"}},"required":["aiPhoneAgentId"]}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","const":"send_sms_messages"},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","const":"send_whatsapp_messages"},"data":{"type":"object","properties":{"phone_number_id":{"type":"string"},"template":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"parameters":{"$ref":"#/components/schemas/WhatsAppTemplateMappingDto"}},"required":["name","language","parameters"]}},"required":["phone_number_id","template"]}},"required":["type","data"]}]},"delay_in_minutes":{"type":"number","minimum":0}},"required":["action"]}}},"required":["filter","steps"]},"AddContactsToSequenceInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AddContactsToSequenceInputInput","type":"object","properties":{"contacts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"]},{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"]},{"type":"object","properties":{"phone_number":{"type":"string"}},"required":["phone_number"]}]}}},"required":["contacts"]},"CreateTrainingPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateTrainingPublicDtoInput","type":"object","properties":{"title":{"type":"string","description":"The scenario title or trigger phrase"},"content":{"type":"string","description":"The instruction body — how the AI should respond"},"type":{"description":"BEHAVIORAL (always active) or SCENARIO_SPECIFIC (semantic match, default)","type":"string","enum":["BEHAVIORAL","SCENARIO_SPECIFIC"]},"is_draft":{"description":"If true, saved as draft and not used by the AI","type":"boolean"},"directory_id":{"description":"Directory ID to organize into","anyOf":[{"type":"string"},{"type":"null"}]},"restricted_to_channels":{"description":"Limit to specific channels (empty = all)","type":"array","items":{"$ref":"#/components/schemas/SessionChannel"}},"restricted_to_segments":{"description":"Limit to specific segments (empty = all)","type":"array","items":{"type":"string"}}},"required":["title","content"]},"AssignInsightDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AssignInsightDtoInput","type":"object","properties":{"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["groupId"]},"SendTemplateInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SendTemplateInputDtoInput","type":"object","properties":{"template_id":{"type":"string"},"phone_number_id":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"]},{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"]},{"type":"object","properties":{"phone_number":{"type":"string"}},"required":["phone_number"]}]},"session_id":{"type":"string"}},"required":["template_id","phone_number_id","variables","contact"]},"CreateWorkflowPublicInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateWorkflowPublicInputInput","type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Workflow name"},"description":{"description":"Workflow description","type":"string"},"trigger_type":{"type":"string","enum":["manual-trigger","ai-trigger","cron-trigger","form-trigger","webhook","contact-created","phone-call-started","phone-call-finished","ticket-created","ticket-reassigned","ticket-resolved","ticket-handoff","pre-ticket-handoff","ticket-tag-added","ticket-inactive","sequence-completed","csat-score-submit","prohibited-topic-detected","sla-first-reply-breached","sla-next-reply-breached","sla-resolution-breached","voice-call-transferred","pre-voice-call-transfer"],"description":"What starts the workflow. Use \"manual-trigger\" for on-demand execution, \"ai-trigger\" for AI-initiated, \"webhook\" for external HTTP triggers, \"cron-trigger\" for scheduled runs, or event-based triggers like \"ticket-created\", \"contact-created\", etc."},"trigger_configuration":{"description":"Trigger-specific configuration (e.g. cron expression for cron-trigger)","anyOf":[{},{"type":"null"}]},"trigger_constraints":{"description":"JSON Logic constraints that must be satisfied for the trigger to fire","anyOf":[{},{"type":"null"}]},"workflow_blocks":{"type":"array","items":{},"description":"Array of workflow steps and control-flow blocks. Each step is an object with { \"$kind\": \"Action\", \"id\": \"<unique-step-id>\", \"type\": \"<action-type>\", \"name\": \"<display-name>\", \"input\": { ... } }. Control-flow blocks use { \"$kind\": \"Block\", \"type\": \"if-else\", \"id\": \"<unique-id>\", \"inputs\": { \"condition\": { \"operatorName\": \"equals\", \"left\": \"{{step_id.output.field}}\", \"right\": \"value\" } }, \"branches\": { \"then\": [...steps], \"else\": [...steps] } }. Use {{step_id.output.field}} to reference outputs from previous steps."},"workflow_editor_state":{"description":"React Flow editor state (nodes, edges, viewport) for the dashboard visual editor","anyOf":[{},{"type":"null"}]}},"required":["name","trigger_type","workflow_blocks"]},"UpdateWorkflowPublicInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateWorkflowPublicInputInput","type":"object","properties":{"name":{"description":"New workflow name","type":"string","minLength":1},"description":{"description":"New workflow description","anyOf":[{"type":"string"},{"type":"null"}]},"trigger_type":{"description":"New trigger type","type":"string","enum":["manual-trigger","ai-trigger","cron-trigger","form-trigger","webhook","contact-created","phone-call-started","phone-call-finished","ticket-created","ticket-reassigned","ticket-resolved","ticket-handoff","pre-ticket-handoff","ticket-tag-added","ticket-inactive","sequence-completed","csat-score-submit","prohibited-topic-detected","sla-first-reply-breached","sla-next-reply-breached","sla-resolution-breached","voice-call-transferred","pre-voice-call-transfer"]},"trigger_configuration":{"description":"New trigger configuration","anyOf":[{},{"type":"null"}]},"trigger_constraints":{"description":"New trigger constraints","anyOf":[{},{"type":"null"}]},"workflow_blocks":{"description":"New workflow step/block definitions (replaces existing blocks)","type":"array","items":{}},"workflow_editor_state":{"description":"React Flow editor state (nodes, edges, viewport) for the dashboard visual editor","anyOf":[{},{"type":"null"}]}}},"ValidateWorkflowPublicInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ValidateWorkflowPublicInputInput","type":"object","properties":{"trigger_type":{"type":"string","enum":["manual-trigger","ai-trigger","cron-trigger","form-trigger","webhook","contact-created","phone-call-started","phone-call-finished","ticket-created","ticket-reassigned","ticket-resolved","ticket-handoff","pre-ticket-handoff","ticket-tag-added","ticket-inactive","sequence-completed","csat-score-submit","prohibited-topic-detected","sla-first-reply-breached","sla-next-reply-breached","sla-resolution-breached","voice-call-transferred","pre-voice-call-transfer"],"description":"Trigger type to validate against"},"workflow_blocks":{"type":"array","items":{},"description":"Workflow blocks to validate"}},"required":["trigger_type","workflow_blocks"]},"SyncContentTreeDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SyncContentTreeDtoInput","type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug"]}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug"]}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug"]}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug"]}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug"]}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug"]}}},"required":["name","slug","articles"]}}},"required":["name","slug","articles"]}}},"required":["name","slug","articles"]}}},"required":["name","slug","articles"]}}},"required":["name","slug","articles"]}}},"required":["name","slug","articles"]}},"openapi_spec":{"type":"string"}},"required":["categories"]},"BlockContactInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/BlockContactInputDtoInput","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The email of the contact to block"},"reason":{"description":"Why the contact is being blocked","type":"string"}},"required":["email"]},"BlockDomainsInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/BlockDomainsInputDtoInput","type":"object","properties":{"domains":{"type":"string","minLength":1,"description":"Domain(s) to block — comma-separated for multiple (e.g. \"spam.com, junk.org\")"},"reason":{"description":"Why these domains are being blocked","type":"string"}},"required":["domains"]},"UpsertTagInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpsertTagInputDtoInput","type":"object","properties":{"tag_name":{"type":"string","description":"Tag name (e.g. \"billing\", \"refund\", \"feature-request\")"},"exclude_from_auto_tagging":{"description":"If true, the AI will never auto-apply this tag (default: false)","type":"boolean"}},"required":["tag_name"]},"UpdateAutoTaggingInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateAutoTaggingInputDtoInput","type":"object","properties":{"enabled":{"type":"boolean","description":"Set true to enable, false to disable"}},"required":["enabled"]},"SearchTrainingKnowledgeInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SearchTrainingKnowledgeInputDtoInput","type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":500},"limit":{"default":20,"type":"number","minimum":1,"maximum":50},"visibility":{"type":"array","items":{"type":"string","enum":["internal","public"]}},"sourceTypes":{"type":"array","items":{"type":"string","enum":["custom_training","help_center","integration","website"]}},"dataSources":{"type":"array","items":{"type":"string","enum":["confluence","notion","zendesk_support","shopify","gitbook","intercom","front","freshdesk","ai_instructions","custom_training","website"]}}},"required":["query"]},"CreateTrainingDirectoryInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateTrainingDirectoryInputDtoInput","type":"object","properties":{"name":{"type":"string","description":"The directory name"}},"required":["name"]},"UpdateTrainingDirectoryInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateTrainingDirectoryInputDtoInput","type":"object","properties":{"name":{"type":"string","description":"The new directory name"}},"required":["name"]},"ToggleDraftInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ToggleDraftInputDtoInput","type":"object","properties":{"draft":{"type":"boolean","description":"Set true for draft (inactive), false to publish (active)"}},"required":["draft"]},"MoveTrainingInputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/MoveTrainingInputDtoInput","type":"object","properties":{"directory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target directory ID, or null to uncategorize"}},"required":["directory_id"]},"UploadOpenApiSpecDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UploadOpenApiSpecDtoInput","type":"object","properties":{"spec":{"type":"string"}},"required":["spec"]},"GenericResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GenericResponseDto","type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"}},"required":["code","status","message"],"additionalProperties":false}},"additionalProperties":false},"GroupDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GroupDto","type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_support_enabled":{"type":"boolean"},"support_office_hours_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"support_assignment_strategy":{"type":"string","enum":["least-busy","round-robin","unassigned"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","organization_id","name","description","is_support_enabled","support_office_hours_id","support_assignment_strategy","created_at","updated_at","deleted_at"],"additionalProperties":false},"PhoneAgentDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PhoneAgentDto","type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["inbound","outbound"]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoff_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"speed":{"anyOf":[{"type":"number"},{"type":"null"}]},"interruptible":{"type":"boolean"},"actionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"instructions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"data_collection_fields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"data_collection_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"type":"string","enum":["oppie-vox","oppie-vox-turbo","oppie-vox-2","oppie-vox-livekit"]},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"provider_external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{"anyOf":[{},{"type":"null"}]},"manual_mode":{"type":"boolean"},"custom_llm":{"anyOf":[{"type":"string"},{"type":"null"}]},"use_org_knowledgebase":{"type":"boolean"}},"required":["id","org_id","phone_number","name","type","language","accent","handoff_phone_number","speed","interruptible","actionIds","instructions","data_collection_fields","data_collection_webhook_url","model","voice_id","first_message","created_at","updated_at","provider_external_id","flow","manual_mode","custom_llm","use_org_knowledgebase"],"additionalProperties":false},"PhoneAgentVoiceDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PhoneAgentVoiceDto","type":"object","properties":{"voice_id":{"type":"string"},"name":{"type":"string"},"labels":{"type":"object","properties":{"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"age":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string"},{"type":"null"}]},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["accent","description","age","gender","use_case","language"],"additionalProperties":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["voice_id","name","labels","description","preview_url"],"additionalProperties":false},"SequenceStep":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SequenceStep","type":"object","properties":{"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"send_emails"},"data":{"type":"object","properties":{"from_email":{"type":"string"},"email_subject":{"type":"string"},"email_body":{"type":"string"},"email_sender_name":{"type":"string"},"email_is_transactional":{"type":"boolean"}},"required":["from_email","email_subject","email_body","email_sender_name","email_is_transactional"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"make_phone_calls"},"data":{"type":"object","properties":{"aiPhoneAgentId":{"type":"string"}},"required":["aiPhoneAgentId"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"send_sms_messages"},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"send_whatsapp_messages"},"data":{"type":"object","properties":{"phone_number_id":{"type":"string"},"template":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"parameters":{"$ref":"#/components/schemas/WhatsAppTemplateMappingDto"}},"required":["name","language","parameters"],"additionalProperties":false}},"required":["phone_number_id","template"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}]},"delay_in_minutes":{"type":"number","minimum":0},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"}},"required":["action"],"additionalProperties":false},"SequenceStatus":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SequenceStatus","type":"string","enum":["pending","complete","canceled","active"]},"SequenceDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SequenceDto","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"org_id":{"type":"string"},"custom_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"filter":{"anyOf":[{"type":"object","properties":{"or":{"minItems":1,"type":"array","items":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ContactsFilter"}}},"required":["and"],"additionalProperties":false}}},"required":["or"],"additionalProperties":false},{"type":"null"}]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/SequenceStep"}},"is_continuous":{"type":"boolean"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/SequenceStatus"},{"type":"null"}]}},"required":["id","name","org_id","custom_id","filter","steps","is_continuous","started_at","canceled_at","ended_at","status"],"additionalProperties":false},"SemanticSearchResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SemanticSearchResponseDto","type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"visibility":{"type":"string","enum":["internal","public"]},"source_type":{"type":"string","enum":["custom_training","help_center","integration","website"]},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"},"content":{"type":"string"},"data_source":{"type":"string","enum":["confluence","notion","zendesk_support","shopify","gitbook","intercom","front","freshdesk","ai_instructions","custom_training","website"]},"stream":{"anyOf":[{"type":"string"},{"type":"null"}]},"relevance_score":{"type":"number","minimum":0,"maximum":100},"directory_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"directory_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_draft":{"type":"boolean"}},"required":["id","title","visibility","source_type","source_url","updated_at","content","data_source","stream","relevance_score","directory_id","directory_name"],"additionalProperties":false}},"total_count":{"type":"number"}},"required":["results","total_count"],"additionalProperties":false},"CustomTrainingDirectoriesDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CustomTrainingDirectoriesDto","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"org_id":{"type":"string"}},"required":["id","name","org_id"],"additionalProperties":false},"SlaOverviewResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SlaOverviewResponseDto","type":"object","properties":{"coverage_rate":{"type":"number"},"total_sessions":{"type":"number"},"sla_sessions":{"type":"number"},"compliance":{"type":"object","properties":{"overall":{"type":"number"},"first_reply":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false},"next_reply":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false},"resolution":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false}},"required":["overall","first_reply","next_reply","resolution"],"additionalProperties":false},"percentiles":{"type":"object","properties":{"first_reply":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false},"next_reply":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false},"resolution":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false}},"required":["first_reply","next_reply","resolution"],"additionalProperties":false}},"required":["coverage_rate","total_sessions","sla_sessions","compliance","percentiles"],"additionalProperties":false},"SlaBreakdownResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SlaBreakdownResponseDto","type":"array","items":{"type":"object","properties":{"grouping":{"type":"object","properties":{"type":{"type":"string","enum":["policy","team","agent","channel"]},"id":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"name":{"type":"string"}},"required":["type","id","name"],"additionalProperties":false},"sessions_count":{"type":"number"},"compliance":{"type":"object","properties":{"overall":{"type":"number"},"first_reply":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false},"next_reply":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false},"resolution":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false}},"required":["overall","first_reply","next_reply","resolution"],"additionalProperties":false},"percentiles":{"type":"object","properties":{"first_reply":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false},"next_reply":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false},"resolution":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false}},"required":["first_reply","next_reply","resolution"],"additionalProperties":false}},"required":["grouping","sessions_count","compliance","percentiles"],"additionalProperties":false}},"SlaTrendResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SlaTrendResponseDto","type":"object","properties":{"granularity":{"type":"string","enum":["day","week"]},"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sessions_count":{"type":"number"},"compliance":{"type":"object","properties":{"overall":{"type":"number"},"first_reply":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false},"next_reply":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false},"resolution":{"type":"object","properties":{"fulfilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"breached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed_after_breach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate":{"type":"number"}},"required":["fulfilled","breached","completed_after_breach","active","rate"],"additionalProperties":false}},"required":["overall","first_reply","next_reply","resolution"],"additionalProperties":false},"percentiles":{"type":"object","properties":{"first_reply":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false},"next_reply":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false},"resolution":{"type":"object","properties":{"p50":{"type":"number"},"p90":{"type":"number"},"p95":{"type":"number"}},"required":["p50","p90","p95"],"additionalProperties":false}},"required":["first_reply","next_reply","resolution"],"additionalProperties":false}},"required":["date","sessions_count","compliance","percentiles"],"additionalProperties":false}}},"required":["granularity","data"],"additionalProperties":false},"SlaBreachHeatmapResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SlaBreachHeatmapResponseDto","type":"object","properties":{"timezone":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"integer","minimum":0,"maximum":6},"hour":{"type":"integer","minimum":0,"maximum":23},"breaches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["day_of_week","hour","breaches"],"additionalProperties":false}}},"required":["timezone","data"],"additionalProperties":false},"StartOneOffSequenceOutputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/StartOneOffSequenceOutputDto","type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false},"error":{"type":"object","properties":{"code":{"type":"string","enum":["sequence_not_found","one_off_sequence_is_canceled","sequence_already_started"]},"status":{"anyOf":[{"type":"number","const":400},{"type":"number","const":404}]},"message":{"type":"string"}},"required":["code","status","message"],"additionalProperties":false}},"additionalProperties":false},"SalesforceMiawWebhookResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SalesforceMiawWebhookResponse","type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"],"additionalProperties":false},"PublicCategoryDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PublicCategoryDto","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["base","suggested","user_defined"]}},"required":["id","name","description","type"],"additionalProperties":false},"ExportArticleDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ExportArticleDto","type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","slug","content_markdown","meta_title","meta_description"],"additionalProperties":false},"ExportCategoryDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ExportCategoryDto","type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ExportArticleDto"}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ExportArticleDto"}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ExportArticleDto"}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ExportArticleDto"}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ExportArticleDto"}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ExportArticleDto"}}},"required":["name","slug","description","icon","articles"],"additionalProperties":false}}},"required":["name","slug","description","icon","articles","categories"],"additionalProperties":false}}},"required":["name","slug","description","icon","articles","categories"],"additionalProperties":false}}},"required":["name","slug","description","icon","articles","categories"],"additionalProperties":false}}},"required":["name","slug","description","icon","articles","categories"],"additionalProperties":false}}},"required":["name","slug","description","icon","articles","categories"],"additionalProperties":false},"ExportContentTreeDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ExportContentTreeDto","type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/ExportCategoryDto"}},"media":{"type":"array","items":{"type":"object","properties":{"file_name":{"type":"string"},"url":{"type":"string"},"checksum":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["file_name","url","checksum"],"additionalProperties":false}},"openapi_spec":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["categories"],"additionalProperties":false},"HcMediaFileDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/HcMediaFileDto","type":"object","properties":{"id":{"type":"string"},"file_name":{"type":"string"},"url":{"type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"type":"number"},"checksum":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","file_name","url","content_type","file_size","checksum","created_at"],"additionalProperties":false},"HcMediaUploadResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/HcMediaUploadResponseDto","type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"file_name":{"type":"string"}},"required":["id","url","file_name"],"additionalProperties":false},"VerifiedWidgetContactTokenResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/VerifiedWidgetContactTokenResponseDto","type":"object","properties":{"token":{"type":"string","description":"The JWT token to use for further requests"},"contact":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["token","contact"],"additionalProperties":false},"ActionPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ActionPublicResponseDto","type":"object","properties":{"id":{"type":"string","description":"Unique action ID"},"name":{"type":"string","description":"Action display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does"},"api_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The API endpoint URL this action calls"},"request_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTTP method (GET, POST, PUT, PATCH, DELETE)"},"operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unique operation ID used to reference this action"},"payload":{"anyOf":[{"type":"object","properties":{"base_url":{"description":"Base URL for the API endpoint","type":"string"},"path":{"description":"API path (e.g. \"/api/v1/bookings\")","type":"string"},"method":{"description":"HTTP method (get, post, put, delete, patch)","type":"string"},"operationId":{"description":"OpenAPI operation ID","type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"parameters":{"description":"Request parameters","type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Parameter name"},"in":{"type":"string","enum":["query","path","header","cookie"],"description":"Where the parameter is sent"},"description":{"type":"string"},"required":{"type":"boolean"},"schema":{"description":"JSON Schema for the parameter value","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","in"],"additionalProperties":false}},"requestBody":{"description":"Request body specification","type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean"},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"description":"Content type to schema mapping (e.g. \"application/json\": { schema: {...} })"}},"required":["content"],"additionalProperties":false},"responses":{"description":"Response specifications keyed by status code","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":{},"description":"OpenAPI-style operation specification for the action"},{"type":"null"}],"description":"OpenAPI-style operation spec defining parameters, request body, and responses"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action status (e.g. \"live\")"},"pinned":{"type":"boolean","description":"Whether this action is pinned prominently"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for organizing actions"},"enabled_on_channel":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/SessionChannel"},"description":"Channels where this action is available"}},"required":["channels"],"additionalProperties":false,"description":"Channel restrictions"},"is_handoff_like":{"type":"boolean","description":"Whether this action behaves like a handoff to a human agent"},"require_form_submission":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether a form must be submitted before the action executes"},"created_at":{"description":"When the action was created","type":"string","format":"date-time"},"updated_at":{"description":"When the action was last updated","type":"string","format":"date-time"}},"required":["id","name","description","api_endpoint","request_type","operation_id","payload","status","pinned","tags","enabled_on_channel","is_handoff_like","require_form_submission","created_at","updated_at"],"additionalProperties":false},"AutopilotStatusResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AutopilotStatusResponseDto","type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","description":"Channel name"},"autopilot_enabled":{"type":"boolean","description":"Whether the AI autopilot is enabled on this channel"},"ai_agent_version":{"type":"string","enum":["v1","v2"],"description":"AI agent version used on this channel"}},"required":["channel","autopilot_enabled","ai_agent_version"],"additionalProperties":false}}},"required":["channels"],"additionalProperties":false},"SaveContactOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SaveContactOutput","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false},"Contact":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/Contact","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"custom_data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["id","email","phone_number","name","custom_data"],"additionalProperties":false},"CreateChatSessionOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateChatSessionOutput","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false},"GetChatSessionOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GetChatSessionOutput","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","closed_resolved","closed_unresolved"]},"ai_closure_type":{"anyOf":[{"type":"string","enum":["assumed_resolved","handed_off","resolved"]},{"type":"null"}]},"sentiment":{"anyOf":[{"type":"string","enum":["angry","happy","neutral"]},{"type":"null"}]},"channel":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SessionChannel"}},"required":["type"],"additionalProperties":false},"contact":{"$ref":"#/components/schemas/Contact"},"language":{"type":"string"},"assignee_id":{"type":"string"},"custom_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"handoff":{"type":"object","properties":{"sentiment":{"type":"string","enum":["angry","happy","neutral"]},"summary":{"type":"string"}},"required":["summary"],"additionalProperties":false},"ticketing_system":{"type":"object","properties":{"name":{"type":"string","enum":["dynamics365","freshchat","freshdesk","front","gorgias","hubspot","intercom","open","salesforce","twilio_flex","zendesk","zendesk_v2"]},"external_id":{"type":"string"},"id_type":{"type":"string","enum":["conversation_id","ticket_id","case_id","conversation_sid"]}},"required":["name","external_id","id_type"],"additionalProperties":false},"ticket_number":{"type":"number"},"assist_mode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","status","ai_closure_type","sentiment","channel","ticket_number","assist_mode","created_at","updated_at"],"additionalProperties":false},"SendMessageOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SendMessageOutput","type":"object","properties":{"success":{"type":"boolean"},"data":{"anyOf":[{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["message"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"success":{"type":"boolean","const":true},"code":{"anyOf":[{"type":"string"},{"type":"string","const":"session_assigned_to_human_agent"},{"type":"string","const":"response_cancelled"},{"type":"string","const":"skipping_unuseful_response"}]},"autopilotResponse":{"type":"object","properties":{"type":{"type":"string","const":"text"},"value":{"type":"object","properties":{"error":{"type":"boolean"},"content":{"type":"string"}},"required":["error","content"],"additionalProperties":false},"id":{"type":"string"},"mightSolveUserIssue":{"type":"boolean"},"completelyAndFullyCoveredUserIssue":{"type":"boolean"},"debugInfo":{"type":"object","properties":{"actionCalls":{"type":"array","items":{"type":"object","properties":{"action":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"openapi":{"type":"object","properties":{"openapi_spec_id":{"type":"string"},"operation_spec":{},"operation_id":{"type":"string"},"operation_method":{"type":"string"}},"required":["operation_spec"],"additionalProperties":false},"metadata":{},"required_form_submission":{"type":"boolean"},"is_handoff_like":{"type":"boolean"}},"required":["name","id","metadata"],"additionalProperties":false},"arguments":{},"result":{}},"required":["action","arguments","result"],"additionalProperties":false}},"actionSearchQuery":{"type":"string"},"knowledge":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"source_type":{"type":"string"},"url":{"type":"string"}},"required":["source","source_type","url"],"additionalProperties":false}},"knowledge_used":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"source":{"type":"string"}},"required":["content","source"],"additionalProperties":false}},"work_instructions_scanned":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"],"additionalProperties":false}},"client_context":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Context provided from the client. For example, dynamic metadata sent from the widget such as: the current product name on the page, the current Shopify shop domain, etc etc."},"additional_debug_data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Org-specific or message-type-specific debug data."},"whatsapp_template_request":{"anyOf":[{},{"type":"null"}]},"rule_violation_reflections":{"type":"array","items":{"type":"object","properties":{"rule_name":{"type":"string"},"violation_description":{"type":"string","description":"How the rule was violated"}},"required":["rule_name","violation_description"],"additionalProperties":false}},"tool_call_results_quick_reply_suggestions":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}}},"required":["tool_name","suggestions"],"additionalProperties":false}}},"additionalProperties":false},"mode":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"didExitMode":{"type":"boolean"}},"required":["type","value","mightSolveUserIssue","completelyAndFullyCoveredUserIssue"],"additionalProperties":false},"uiResponse":{"type":"object","properties":{"type":{"type":"string","const":"ui"},"value":{"type":"object","properties":{"type":{"type":"string","const":"ui_component"},"request_response":{},"name":{"type":"string"},"content":{"type":"string"}},"required":["type","request_response","name"],"additionalProperties":false},"mightSolveUserIssue":{"type":"boolean"}},"required":["type","value","mightSolveUserIssue"],"additionalProperties":false},"sessionIsHandedOff":{"type":"boolean"},"resolveArgs":{"type":"object","properties":{"summary":{"type":"string","description":"Summary of the conversation with the user to be viewed by a human agent."},"sentiment":{"type":"string","enum":["angry","happy","neutral"]}},"required":["summary","sentiment"],"additionalProperties":false},"toolCallResultsQuickReplySuggestions":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}}},"required":["tool_name","suggestions"],"additionalProperties":false}}},"required":["success"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}]}]}},"required":["success","data"],"additionalProperties":false},"ChatMessageSender":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ChatMessageSender","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"contact"},"name":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"ai"},"name":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_agent"},"name":{"type":"string"}},"required":["type"],"additionalProperties":false}]},"ChatHistoryOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ChatHistoryOutput","type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"sender":{"$ref":"#/components/schemas/ChatMessageSender"},"content":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","sender","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"workflow_message"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflow_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}},"required":["type","workflow_id","workflow_run_id","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sequence_message"},"sequence_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}},"required":["type","sequence_id","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"handoff"},"integration":{"type":"object","properties":{"type":{"type":"string","enum":["zendesk","salesforce-miaw"]}},"required":["type"],"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_resolved_by_agent"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_resolved_by_system"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_resolved_by_api"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_unresolved_by_agent"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_unresolved_by_system"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_unresolved_by_api"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_resolved_by_contact"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"closed_resolved_by_integration"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sub_status_set_by_agent"},"sub_status_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sub_status_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sub_status_set_by_system"},"sub_status_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sub_status_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sub_status_set_by_api"},"sub_status_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sub_status_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sub_status_removed_by_agent"},"sub_status_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sub_status_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sub_status_removed_by_system"},"sub_status_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sub_status_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sub_status_removed_by_api"},"sub_status_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sub_status_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"ai_resolved_issue"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"ai_assumed_issue_resolved"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"user_confirmed_issue_resolved"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_agent_comment"},"human_agent_id":{"type":"number"},"content":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},"comment_thread_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["type","human_agent_id","content","comment_thread_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_agent_joined"},"human_agent_id":{"type":"number"}},"required":["type","human_agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_agent_takeover"},"human_agent_id":{"type":"number"}},"required":["type","human_agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"human_agent_reopened_session"},"human_agent_id":{"type":"number"}},"required":["type","human_agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"ai_reopened_session"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"state_checkpoint"},"payload":{}},"required":["type","payload"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"csat_requested"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"csat_submitted"},"payload":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"required":["type","payload"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_changed"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"prohibited_topic_detected"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","topic"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_assigned_by_system"},"assigned_agent_id":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_assigned_by_user"},"assigned_agent_id":{"type":"number"},"actor_id":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_unassigned_by_system"},"unassigned_agent_id":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_unassigned_by_user"},"unassigned_agent_id":{"type":"number"},"actor_id":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"team_assigned_by_system"},"assigned_team_id":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"team_assigned_by_user"},"assigned_team_id":{"type":"string"},"actor_id":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"team_unassigned_by_system"},"unassigned_team_id":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"team_unassigned_by_user"},"unassigned_team_id":{"type":"string"},"actor_id":{"type":"number"}},"required":["type"],"additionalProperties":false}]}},"required":["created_at","event"],"additionalProperties":false},"CrawlDatasource":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlDatasource","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"page_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"exclude_paths":{"type":"array","items":{"type":"string"}},"include_paths":{"type":"array","items":{"type":"string"}},"crawl_interval_hours":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_crawl_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_crawl_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","url","display_name","status","page_limit","exclude_paths","include_paths","crawl_interval_hours","last_crawl_started_at","last_crawl_completed_at","error_message","created_at","updated_at"],"additionalProperties":false},"CrawlDatasourceListItem":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlDatasourceListItem","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"page_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"exclude_paths":{"type":"array","items":{"type":"string"}},"include_paths":{"type":"array","items":{"type":"string"}},"crawl_interval_hours":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_crawl_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_crawl_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"page_count":{"type":"number"}},"required":["id","url","display_name","status","page_limit","exclude_paths","include_paths","crawl_interval_hours","last_crawl_started_at","last_crawl_completed_at","error_message","created_at","updated_at","page_count"],"additionalProperties":false},"CrawlDatasourceDetail":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlDatasourceDetail","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"page_limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"exclude_paths":{"type":"array","items":{"type":"string"}},"include_paths":{"type":"array","items":{"type":"string"}},"crawl_interval_hours":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_crawl_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_crawl_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"page_stats":{"type":"object","properties":{"total":{"type":"number"},"synced":{"type":"number"},"pending":{"type":"number"},"error":{"type":"number"},"excluded":{"type":"number"}},"required":["total","synced","pending","error","excluded"],"additionalProperties":false},"active_crawl_job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"total_pages":{"anyOf":[{"type":"number"},{"type":"null"}]},"completed_pages":{"type":"number"},"new_pages":{"type":"number"},"updated_pages":{"type":"number"},"removed_pages":{"type":"number"},"unchanged_pages":{"type":"number"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","status","total_pages","completed_pages","new_pages","updated_pages","removed_pages","unchanged_pages","started_at"],"additionalProperties":false},{"type":"null"}]}},"required":["id","url","display_name","status","page_limit","exclude_paths","include_paths","crawl_interval_hours","last_crawl_started_at","last_crawl_completed_at","error_message","created_at","updated_at","page_stats","active_crawl_job"],"additionalProperties":false},"CrawlJob":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlJob","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"datasource_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"total_pages":{"anyOf":[{"type":"number"},{"type":"null"}]},"completed_pages":{"type":"number"},"new_pages":{"type":"number"},"updated_pages":{"type":"number"},"removed_pages":{"type":"number"},"unchanged_pages":{"type":"number"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","datasource_id","status","started_at","completed_at","total_pages","completed_pages","new_pages","updated_pages","removed_pages","unchanged_pages","error_message","created_at","updated_at"],"additionalProperties":false},"CrawlPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlPage","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"datasource_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"sync_status":{"type":"string"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","datasource_id","url","title","sync_status","last_synced_at","error_message","created_at","updated_at"],"additionalProperties":false},"CrawlDatasourceListResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlDatasourceListResponse","type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"total_pages":{"type":"number"},"has_next_page":{"type":"boolean"},"has_prev_page":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CrawlDatasourceListItem"}}},"required":["total","page","limit","total_pages","has_next_page","has_prev_page","data"],"additionalProperties":false},"CrawlJobListResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlJobListResponse","type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"total_pages":{"type":"number"},"has_next_page":{"type":"boolean"},"has_prev_page":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CrawlJob"}}},"required":["total","page","limit","total_pages","has_next_page","has_prev_page","data"],"additionalProperties":false},"CrawlPageListResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CrawlPageListResponse","type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"total_pages":{"type":"number"},"has_next_page":{"type":"boolean"},"has_prev_page":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CrawlPage"}}},"required":["total","page","limit","total_pages","has_next_page","has_prev_page","data"],"additionalProperties":false},"CsatScorePublic":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CsatScorePublic","type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"session_id":{"type":"string"},"score":{"type":"number"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"null"}]}},"required":["id","organization_id","session_id","score","comment","channel","created_at","updated_at","contact"],"additionalProperties":false},"CsatScorePublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CsatScorePublicResponseDto","anyOf":[{"$ref":"#/components/schemas/CsatScorePublic"},{"type":"null"}]},"PaginatedCsatScoresPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PaginatedCsatScoresPublicResponseDto","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CsatScorePublic"}},"current_page":{"type":"number"},"per_page":{"type":"number"},"total":{"type":"number"},"total_pages":{"type":"number"}},"required":["data","current_page","per_page","total","total_pages"],"additionalProperties":false},"PutCustomDomainOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PutCustomDomainOutput","type":"object","properties":{"domainRecords":{"anyOf":[{},{"type":"null"}]},"domainStatus":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domainRecords","domainStatus"],"additionalProperties":false},"HandoffAnalyticsPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/HandoffAnalyticsPublicResponseDto","type":"object","properties":{"summary":{"type":"string"},"total_handoffs":{"type":"number"},"total_sessions":{"type":"number"},"start_date":{"type":"string"},"end_date":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","enum":["based_on_instructions","instructions_not_clear","insufficient_knowledge","insufficient_tools","prohibited_topic","user_requested_human_assistance"]},"count":{"type":"number"},"percentage":{"type":"number"}},"required":["reason","count","percentage"],"additionalProperties":false}},"reason_combinations":{"type":"array","items":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string","enum":["based_on_instructions","instructions_not_clear","insufficient_knowledge","insufficient_tools","prohibited_topic","user_requested_human_assistance"]}},"session_count":{"type":"number"},"percentage":{"type":"number"}},"required":["reasons","session_count","percentage"],"additionalProperties":false}},"sentiments":{"type":"array","items":{"type":"object","properties":{"sentiment":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"},"percentage":{"type":"number"}},"required":["sentiment","count","percentage"],"additionalProperties":false}},"trends":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"number"}},"required":["date","count"],"additionalProperties":false}},"knowledge_references":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ai_profile","instruction","knowledge","prohibited_topic","tool"]},"id":{"type":"string"},"count":{"type":"number"}},"required":["type","id","count"],"additionalProperties":false}},"tool_references":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ai_profile","instruction","knowledge","prohibited_topic","tool"]},"id":{"type":"string"},"count":{"type":"number"}},"required":["type","id","count"],"additionalProperties":false}},"instruction_references":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ai_profile","instruction","knowledge","prohibited_topic","tool"]},"id":{"type":"string"},"count":{"type":"number"}},"required":["type","id","count"],"additionalProperties":false}},"prohibited_topic_references":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ai_profile","instruction","knowledge","prohibited_topic","tool"]},"id":{"type":"string"},"count":{"type":"number"}},"required":["type","id","count"],"additionalProperties":false}}},"required":["summary","total_handoffs","total_sessions","start_date","end_date","reasons","reason_combinations","sentiments","trends","knowledge_references","tool_references","instruction_references","prohibited_topic_references"],"additionalProperties":false},"OfficeHoursPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/OfficeHoursPublicResponseDto","type":"object","properties":{"id":{"type":"string","description":"Office hours schedule ID"},"name":{"type":"string","description":"Schedule name (e.g. \"Weekday Support\", \"Weekend Hours\")"},"iana_timezone":{"type":"string","description":"IANA timezone (e.g. \"America/New_York\", \"Europe/London\")"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"shifts":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"string","enum":["everyday","friday","friday_and_saturday","monday","monday_to_friday","saturday","sunday","sunday_and_monday","sunday_to_thursday","thursday","tuesday","wednesday"],"description":"Day(s) of week: \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\", \"everyday\", \"monday_to_friday\", \"sunday_to_thursday\", \"friday_and_saturday\", \"sunday_and_monday\""},"start_time":{"type":"string","description":"Start time in HH:mm:ss format (e.g. \"09:00:00\")"},"end_time":{"type":"string","description":"End time in HH:mm:ss format (e.g. \"17:00:00\")"},"id":{"type":"string","description":"Shift ID"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["day_of_week","start_time","end_time","id","created_at","updated_at"],"additionalProperties":false},"description":"The time blocks when support is available"}},"required":["id","name","iana_timezone","created_at","updated_at","shifts"],"additionalProperties":false},"OrganizationDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/OrganizationDto","type":"object","properties":{"name":{"type":"string","description":"The name of the organization."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the organization was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the organization was last updated."}},"required":["name","created_at","updated_at"],"additionalProperties":false},"AddContactsToSequenceOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AddContactsToSequenceOutput","type":"object","properties":{"run_id":{"type":"string"}},"required":["run_id"],"additionalProperties":false},"CreateSequenceOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/CreateSequenceOutput","type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"TagPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/TagPublicResponseDto","type":"object","properties":{"tag_name":{"type":"string","description":"The tag name (unique per org)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of what this tag means"},"exclude_from_auto_tagging":{"type":"boolean","description":"If true, the AI will never auto-apply this tag"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["tag_name","description","exclude_from_auto_tagging","created_at","updated_at"],"additionalProperties":false},"TrainingPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/TrainingPublicResponseDto","type":"object","properties":{"id":{"type":"string","description":"Unique training ID"},"title":{"type":"string","description":"The scenario title or trigger phrase"},"content":{"type":"string","description":"The instruction body — how the AI should respond"},"type":{"type":"string","enum":["BEHAVIORAL","SCENARIO_SPECIFIC"],"description":"BEHAVIORAL (always active) or SCENARIO_SPECIFIC (semantic match)"},"is_draft":{"type":"boolean","description":"Draft trainings are saved but not used by the AI"},"directory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Directory this training belongs to"},"restricted_to_channels":{"type":"array","items":{"$ref":"#/components/schemas/SessionChannel"},"description":"Channels this applies to (empty = all)"},"restricted_to_segments":{"type":"array","items":{"type":"string"},"description":"Contact segments this applies to (empty = all)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","title","content","type","is_draft","directory_id","restricted_to_channels","restricted_to_segments","created_at","updated_at"],"additionalProperties":false},"DirectoryTreeItem":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/DirectoryTreeItem","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"org_id":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/TrainingPublicResponseDto"}}},"required":["id","name","org_id","items"],"additionalProperties":false},"TrainingDirectoryTreePublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/TrainingDirectoryTreePublicDto","type":"object","properties":{"directories":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryTreeItem"}},"uncategorized":{"type":"array","items":{"$ref":"#/components/schemas/TrainingPublicResponseDto"}}},"required":["directories","uncategorized"],"additionalProperties":false},"PublicInsight":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PublicInsight","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"insight_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content":{"type":"string"},"sentiment":{"type":"string","enum":["angry","happy","neutral"]},"occurrence_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description"],"additionalProperties":false},{"type":"null"}]},"team":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"resolved_by":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_by":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","avatar_url","reason"],"additionalProperties":false},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deep_research":{"anyOf":[{"type":"string"},{"type":"null"}]},"deep_research_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_seen_at":{"type":"string","format":"date-time"},"last_seen_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","insight_number","content","sentiment","occurrence_count","category","team","resolved_by","resolved_at","archived_by","archived_at","deep_research","deep_research_completed_at","first_seen_at","last_seen_at","created_at","updated_at"],"additionalProperties":false},"PublicPaginatedInsightsDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/PublicPaginatedInsightsDto","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicInsight"}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","page","total","totalPages"],"additionalProperties":false},"SendTemplateOutputDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SendTemplateOutputDto","type":"object","properties":{"whatsapp_message_id":{"type":"string"},"opencx_message_id":{"type":"string"},"opencx_session_id":{"type":"string"}},"required":["whatsapp_message_id","opencx_message_id","opencx_session_id"],"additionalProperties":false},"WorkflowPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/WorkflowPublicResponseDto","type":"object","properties":{"id":{"type":"number","description":"Version serial ID"},"workflow_id":{"type":"string","description":"Workflow UUID (groups all versions of the same workflow)"},"name":{"type":"string","description":"Workflow name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this version is currently active"},"trigger_type":{"type":"string","description":"Trigger type: \"manual-trigger\", \"ai-trigger\", \"cron-trigger\", \"webhook\", \"form-trigger\", or event-based triggers"},"version_number":{"type":"number","description":"Version number (increments with each edit)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","workflow_id","name","description","is_active","trigger_type","version_number","created_at","updated_at"],"additionalProperties":false},"WorkflowDetailPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/WorkflowDetailPublicResponseDto","type":"object","properties":{"id":{"type":"number","description":"Version serial ID"},"workflow_id":{"type":"string","description":"Workflow UUID (groups all versions of the same workflow)"},"name":{"type":"string","description":"Workflow name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this version is currently active"},"trigger_type":{"type":"string","description":"Trigger type: \"manual-trigger\", \"ai-trigger\", \"cron-trigger\", \"webhook\", \"form-trigger\", or event-based triggers"},"version_number":{"type":"number","description":"Version number (increments with each edit)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"workflow_blocks":{"anyOf":[{"type":"array","items":{}},{"type":"null"}],"description":"Workflow step/block definitions"},"trigger_configuration":{"anyOf":[{},{"type":"null"}],"description":"Trigger-specific configuration"},"trigger_constraints":{"anyOf":[{},{"type":"null"}],"description":"Trigger constraint rules (JSON Logic)"}},"required":["id","workflow_id","name","description","is_active","trigger_type","version_number","created_at","updated_at","workflow_blocks","trigger_configuration","trigger_constraints"],"additionalProperties":false},"WorkflowRunPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/WorkflowRunPublicResponseDto","type":"object","properties":{"id":{"type":"string","description":"Run UUID"},"workflow_id":{"type":"number","description":"Workflow version serial ID that was executed"},"status":{"anyOf":[{"type":"string","enum":["canceled","completed","failed","idle","in_progress"]},{"type":"null"}],"description":"Run status: \"idle\", \"in_progress\", \"completed\", \"failed\", \"canceled\""},"trigger_cause":{"type":"string","enum":["automatic","manual","scheduled"],"description":"What caused the run: \"manual\", \"automatic\", \"scheduled\""},"duration_in_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How long the run took"},"run_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"run_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"is_test_run":{"type":"boolean","description":"Whether this was a test run"},"created_at":{"type":"string","format":"date-time"}},"required":["id","workflow_id","status","trigger_cause","duration_in_seconds","run_started_at","run_ended_at","is_test_run","created_at"],"additionalProperties":false},"ValidateWorkflowPublicOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ValidateWorkflowPublicOutput","type":"object","properties":{"valid":{"type":"boolean","description":"Whether the workflow definition is valid"},"issues":{"type":"array","items":{"type":"object","properties":{"step_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The step ID where the issue was found, if applicable"},"message":{"type":"string","description":"Description of the validation issue"}},"required":["step_id","message"],"additionalProperties":false},"description":"List of validation issues found"},"action_types_used":{"type":"array","items":{"type":"string"},"description":"List of action types referenced in the workflow"}},"required":["valid","issues","action_types_used"],"additionalProperties":false},"FieldSchemaPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/FieldSchemaPublicDto","type":"object","properties":{"name":{"type":"string","description":"Field name (use as key in input object)"},"type":{"type":"string","description":"Field type: text, number, boolean, select, object, array, etc."},"display_name":{"type":"string","description":"Human-readable label"},"description":{"description":"What this field does","type":"string"},"required":{"type":"boolean","description":"Whether this field must be provided"}},"required":["name","type","display_name","required"],"additionalProperties":false},"ActionTypePublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ActionTypePublicDto","type":"object","properties":{"type":{"type":"string","description":"Action type identifier (e.g. \"ask-ai\", \"send-webhook\"). Use this as the \"type\" in workflow_blocks."},"name":{"type":"string","description":"Human-readable name"},"description":{"type":"string","description":"What this action does"},"category":{"type":"string","description":"Action category (e.g. \"AI\", \"Session\", \"Outbound\")"},"icon":{"type":"string","description":"Icon name"},"input_fields":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FieldSchemaPublicDto"}},{"type":"null"}],"description":"Input fields this action accepts. Pass these in the \"input\" object of the workflow block."},"output_fields":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FieldSchemaPublicDto"}},{"type":"null"}],"description":"Output fields this action produces. Reference via {{step_id.output.field_name}}."}},"required":["type","name","description","category","icon","input_fields","output_fields"],"additionalProperties":false},"TriggerTypePublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/TriggerTypePublicDto","type":"object","properties":{"type":{"type":"string","description":"Trigger type identifier. Use this as the \"trigger_type\" when creating a workflow."},"name":{"type":"string","description":"Human-readable name"},"description":{"type":"string","description":"What this trigger does"},"icon":{"type":"string","description":"Icon name"}},"required":["type","name","description","icon"],"additionalProperties":false},"WorkflowDefinitionsPublicDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/WorkflowDefinitionsPublicDto","type":"object","properties":{"action_types":{"type":"array","items":{"$ref":"#/components/schemas/ActionTypePublicDto"},"description":"Available action types with their input/output schemas"},"trigger_types":{"type":"array","items":{"$ref":"#/components/schemas/TriggerTypePublicDto"},"description":"Available trigger types"},"block_types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["type","name","description"],"additionalProperties":false},"description":"Available control-flow block types (if-else, switch)"}},"required":["action_types","trigger_types","block_types"],"additionalProperties":false},"SyncResultDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SyncResultDto","type":"object","properties":{"changes":{"type":"object","properties":{"categories":{"type":"object","properties":{"added":{"type":"number"},"modified":{"type":"number"},"removed":{"type":"number"}},"required":["added","modified","removed"],"additionalProperties":false},"articles":{"type":"object","properties":{"added":{"type":"number"},"modified":{"type":"number"},"removed":{"type":"number"}},"required":["added","modified","removed"],"additionalProperties":false}},"required":["categories","articles"],"additionalProperties":false}},"required":["changes"],"additionalProperties":false},"HelpCenterListItemDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/HelpCenterListItemDto","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"MediaUploadResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/MediaUploadResponseDto","type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the stored file."},"url":{"type":"string","description":"Public URL for the uploaded image."}},"required":["id","url"],"additionalProperties":false},"MediaPublicErrorResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/MediaPublicErrorResponseDto","type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"],"additionalProperties":false},"ListHelpCenterMediaOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListHelpCenterMediaOutput","type":"array","items":{"$ref":"#/components/schemas/HcMediaFileDto"}},"DeleteHelpCenterMediaOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/DeleteHelpCenterMediaOutput","type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false},"ActionTagsResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ActionTagsResponseDto","type":"array","items":{"type":"string"}},"ListChatSessionsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListChatSessionsOutput","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GetChatSessionOutput"}},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next"],"additionalProperties":false},"FilterChatSessionsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/FilterChatSessionsOutput","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GetChatSessionOutput"}},"page":{"type":"number"},"limit":{"type":"number"},"has_next":{"type":"boolean"},"has_previous":{"type":"boolean"}},"required":["data","page","limit","has_next","has_previous"],"additionalProperties":false},"SearchPublicResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SearchPublicResponseDto","type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Contact ID"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Contact name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Contact email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Contact phone number"}},"required":["id","name","email","phone"],"additionalProperties":false}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message ID"},"session_id":{"type":"string","description":"Session this message belongs to"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message content"},"type":{"type":"string","description":"Message type"}},"required":["id","session_id","message","type"],"additionalProperties":false}}},"required":["contacts","messages"],"additionalProperties":false},"ListChatHistoryOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListChatHistoryOutput","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ChatHistoryOutput"}},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next"],"additionalProperties":false},"ListContactsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListContactsOutput","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next"],"additionalProperties":false},"SearchContactsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/SearchContactsOutput","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next"],"additionalProperties":false},"ListBlockedContactsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListBlockedContactsOutput","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Block record ID"},"contact_id":{"type":"string","description":"The blocked contact ID"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Contact email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Contact name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Contact phone number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the contact was blocked"},"created_at":{"type":"string","format":"date-time"}},"required":["id","contact_id","email","name","phone_number","reason","created_at"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"total_pages":{"type":"number"}},"required":["data","total","page","total_pages"],"additionalProperties":false},"ContactBlockStatusOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ContactBlockStatusOutput","type":"object","properties":{"is_blocked":{"type":"boolean"}},"required":["is_blocked"],"additionalProperties":false},"ListBlockedDomainsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListBlockedDomainsOutput","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Block record ID"},"domain":{"type":"string","description":"The blocked domain"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the domain was blocked"},"created_at":{"type":"string","format":"date-time"}},"required":["id","domain","reason","created_at"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"total_pages":{"type":"number"}},"required":["data","total","page","total_pages"],"additionalProperties":false},"BlockDomainsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/BlockDomainsOutput","type":"object","properties":{"blocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Block record ID"},"domain":{"type":"string","description":"The blocked domain"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the domain was blocked"},"created_at":{"type":"string","format":"date-time"}},"required":["id","domain","reason","created_at"],"additionalProperties":false},"description":"Domains that were successfully blocked"},"skipped":{"type":"array","items":{"type":"string"},"description":"Domains that were already blocked"},"summary":{"type":"object","properties":{"total":{"type":"number"},"blocked":{"type":"number"},"skipped":{"type":"number"}},"required":["total","blocked","skipped"],"additionalProperties":false}},"required":["blocked","skipped","summary"],"additionalProperties":false},"DomainBlockStatusOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/DomainBlockStatusOutput","type":"object","properties":{"is_blocked":{"type":"boolean"}},"required":["is_blocked"],"additionalProperties":false},"GetCustomDomainsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GetCustomDomainsOutput","type":"array","items":{"type":"object","properties":{"domainName":{"type":"string"},"domainNameVerificationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"records":{"anyOf":[{},{"type":"null"}]}},"required":["domainName","domainNameVerificationStatus","records"],"additionalProperties":false}},"ListOfficeHoursOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListOfficeHoursOutput","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfficeHoursPublicResponseDto"}}},"required":["data"],"additionalProperties":false},"ListTagsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListTagsOutput","type":"array","items":{"$ref":"#/components/schemas/TagPublicResponseDto"}},"TagsInUseOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/TagsInUseOutput","type":"object","properties":{"tags":{"type":"array","items":{"type":"string"},"description":"Tag names currently applied to sessions"}},"required":["tags"],"additionalProperties":false},"AutoTaggingStatusOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/AutoTaggingStatusOutput","type":"object","properties":{"enabled":{"type":"boolean","description":"Whether AI auto-tagging is enabled"}},"required":["enabled"],"additionalProperties":false},"UpdateAutoTaggingOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UpdateAutoTaggingOutput","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"ListWorkflowsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListWorkflowsOutput","type":"array","items":{"$ref":"#/components/schemas/WorkflowPublicResponseDto"}},"DeleteWorkflowOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/DeleteWorkflowOutput","type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false},"ActivateWorkflowOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ActivateWorkflowOutput","type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false},"DeactivateWorkflowOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/DeactivateWorkflowOutput","type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false},"ListWorkflowRunsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListWorkflowRunsOutput","type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunPublicResponseDto"}},"total_items":{"type":"number"},"total_pages":{"type":"number"},"has_next_page":{"type":"boolean"},"current_page":{"type":"number"}},"required":["runs","total_items","total_pages","has_next_page","current_page"],"additionalProperties":false},"ListVoicesOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListVoicesOutput","type":"array","items":{"$ref":"#/components/schemas/PhoneAgentVoiceDto"}},"ListPhoneAgentsOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListPhoneAgentsOutput","type":"array","items":{"$ref":"#/components/schemas/PhoneAgentDto"}},"MakeOutboundCallResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/MakeOutboundCallResponseDto","type":"object","properties":{"error":{"description":"Error details if the call failed","type":"object","properties":{"code":{"type":"string"},"status":{"type":"number"}},"additionalProperties":false},"result":{"description":"Call result from the provider"}},"additionalProperties":false},"GetSequenceOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GetSequenceOutput","$ref":"#/components/schemas/SequenceDto"},"TestConnectionOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/TestConnectionOutput","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"ListHelpCentersOutput":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/ListHelpCentersOutput","type":"array","items":{"$ref":"#/components/schemas/HelpCenterListItemDto"}},"UploadOpenApiSpecResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/UploadOpenApiSpecResponseDto","type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false},"GetOpenApiSpecResponseDto":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"#/components/schemas/GetOpenApiSpecResponseDto","type":"object","properties":{"spec":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["spec"],"additionalProperties":false},"ErrorDto":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/actions":{"get":{"operationId":"listActions","summary":"List all actions","description":"List all actions configured for your organization. Actions are HTTP API calls the AI agent can make during conversations.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionPublicResponseDto"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"createAction","summary":"Create an action","description":"Create a new action that the AI agent can call during conversations. The payload field uses OpenAPI-style parameter and request body specifications to define how the API call should be constructed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateActionPublicDto"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/actions/tags":{"get":{"operationId":"listActionTags","summary":"List distinct action tags","description":"Get all unique tags used across actions in your organization.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionTagsResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/actions/{action_id}":{"get":{"operationId":"getAction","summary":"Get an action","description":"Get a single action by ID.","parameters":[{"schema":{"type":"string"},"in":"path","name":"action_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateAction","summary":"Update an action","description":"Update an existing action. Only provided fields are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateActionPublicDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"action_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteAction","summary":"Delete an action","description":"Permanently delete a single action by ID.","parameters":[{"schema":{"type":"string"},"in":"path","name":"action_id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/actions/all":{"delete":{"operationId":"deleteAllActions","summary":"Delete all actions","description":"Delete all actions. This is safe when you can re-import from an OpenAPI spec. Manually created dashboard actions will also be deleted.","responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/actions/import":{"put":{"operationId":"importActionsFromOpenApiSpec","summary":"Import actions from OpenAPI spec","description":"Upload an OpenAPI specification file (v2, v3, or v3.1; YAML or JSON). Actions are created for each operation in the spec. Previous imports from the same spec are replaced.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadDto"}}}},"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/chat/sessions":{"post":{"operationId":"createChatSession","summary":"Create a chat session","description":"Creates a new chat session for the organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatSessionInput"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatSessionOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"listChatSessions","summary":"List chat sessions","description":"Returns a paginated list of chat sessions for the organization. Supports filtering by status, channel, handoff state, and date ranges.","parameters":[{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor to fetch the next set of results"},{"schema":{"type":"boolean"},"in":"query","name":"handed_off","required":false,"description":"Filter by handoff status. Use \"true\" or \"false\""},{"schema":{"type":"string"},"in":"query","name":"status","required":false,"description":"Filter by session status (open, closed_resolved, closed_unresolved)"},{"schema":{"$ref":"#/components/schemas/SessionChannel"},"in":"query","name":"channel_type","required":false},{"schema":{"type":"string"},"in":"query","name":"created_after","required":false,"description":"Filter sessions created after this ISO 8601 timestamp"},{"schema":{"type":"string"},"in":"query","name":"created_before","required":false,"description":"Filter sessions created before this ISO 8601 timestamp"},{"schema":{"type":"string"},"in":"query","name":"updated_after","required":false,"description":"Filter sessions updated after this ISO 8601 timestamp"},{"schema":{"type":"string"},"in":"query","name":"updated_before","required":false,"description":"Filter sessions updated before this ISO 8601 timestamp"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatSessionsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/chat/sessions/filter":{"post":{"operationId":"filterChatSessions","summary":"Filter chat sessions","description":"Search and filter chat sessions with advanced criteria. Supports filtering by date range, channels, status, sentiment, tags, assignees, teams, contacts, language, custom data, and more. Results are paginated and sortable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterSessionsPublicDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterChatSessionsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/chat/sessions/search":{"get":{"operationId":"searchContactsAndMessages","summary":"Search contacts and messages","description":"Full-text search across contacts (by name, email, phone) and chat messages. Returns matching contacts and messages with their session IDs.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"q","required":true,"description":"Search query (a name, email, phone, or keyword)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/chat/sessions/{session_id}":{"get":{"operationId":"getChatSession","summary":"Get a chat session","description":"Retrieves details of a specific chat session by its ID.","parameters":[{"schema":{"type":"string"},"in":"path","name":"session_id","required":true,"description":"The unique identifier of the chat session"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatSessionOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateChatSession","summary":"Update a chat session","description":"Updates a chat session. Can change status, generate summary/sentiment on resolve, and reflect status changes to integrations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatSessionInput"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"session_id","required":true,"description":"The unique identifier of the chat session"}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/chat/sessions/{session_id}/send":{"post":{"operationId":"sendMessage","summary":"Send a message","description":"Sends a message in a chat session. The message can be sent as either a contact or an agent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageInput"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"session_id","required":true,"description":"The unique identifier of the chat session"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/chat/sessions/{session_id}/history":{"get":{"operationId":"listChatHistory","summary":"List chat session history","description":"Returns a paginated list of events (messages, handoffs, status changes, etc.) for a chat session.","parameters":[{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor to fetch the next set of results"},{"schema":{"type":"string"},"in":"path","name":"session_id","required":true,"description":"The unique identifier of the chat session"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatHistoryOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/contacts":{"post":{"operationId":"saveContact","summary":"Create a contact","description":"Create a new contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveContactInput"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveContactOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"listContacts","summary":"List contacts","parameters":[{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Pagination cursor to fetch the next set of results"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListContactsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/contacts/{contact_id}":{"delete":{"operationId":"deleteContact","summary":"Delete a contact","parameters":[{"schema":{"type":"string"},"in":"path","name":"contact_id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateContact","summary":"Update a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactInput"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"contact_id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/contacts/search":{"post":{"operationId":"searchContacts","summary":"Search contacts","description":"Search contacts using composite filters (OR of AND groups). Each rule narrows the set; groups are combined with OR logic.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchContactsInput"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchContactsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl":{"post":{"operationId":"createCrawlDatasource","summary":"Create a website datasource","tags":["Crawl"],"description":"Create a new website datasource and optionally start an initial crawl. Crawled content is automatically indexed into your knowledge base.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebsiteDatasourceDto"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlDatasource"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"listCrawlDatasources","summary":"List website datasources","tags":["Crawl"],"description":"Retrieve a paginated list of all website datasources for your organization.","parameters":[{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlDatasourceListResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}":{"get":{"operationId":"getCrawlDatasource","summary":"Get website datasource details","tags":["Crawl"],"description":"Retrieve a website datasource with page statistics and active crawl job information.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlDatasourceDetail"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateCrawlDatasource","summary":"Update website datasource settings","tags":["Crawl"],"description":"Update configuration for a website datasource. Changes to crawl interval or status automatically reschedule crawls.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebsiteDatasourceDto"}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlDatasource"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteCrawlDatasource","summary":"Delete a website datasource","tags":["Crawl"],"description":"Delete a website datasource and all its crawl jobs and pages. Optionally delete linked knowledge base items via the delete_kb_items query parameter.","parameters":[{"schema":{"type":"string"},"in":"query","name":"delete_kb_items","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/crawl":{"post":{"operationId":"startCrawl","summary":"Start a new crawl","tags":["Crawl"],"description":"Start a new crawl for the given website datasource. Only one crawl can be active per datasource at a time.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlJob"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"cancelCrawl","summary":"Cancel active crawl","tags":["Crawl"],"description":"Cancel the currently active crawl for the given website datasource.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/crawls":{"get":{"operationId":"listCrawlJobs","summary":"List crawl history","tags":["Crawl"],"description":"Retrieve a paginated list of crawl jobs for a website datasource.","parameters":[{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":10,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlJobListResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/crawls/{jobId}":{"get":{"operationId":"getCrawlJob","summary":"Get crawl job status","tags":["Crawl"],"description":"Retrieve the status and details of a specific crawl job.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"jobId","required":true,"description":"The crawl job ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlJob"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/pages":{"get":{"operationId":"listCrawlPages","summary":"List crawled pages","tags":["Crawl"],"description":"Retrieve a paginated list of pages for a website datasource. Filter by sync status or search by URL/title.","parameters":[{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["pending","synced","error","excluded"]},"in":"query","name":"sync_status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlPageListResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/pages/exclude":{"post":{"operationId":"excludeCrawlPages","summary":"Exclude pages from sync","tags":["Crawl"],"description":"Bulk exclude pages from future syncs. Excluded pages retain their knowledge base items but are skipped during crawls.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPageActionDto"}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"excluded":{"type":"number"}},"required":["excluded"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/pages/include":{"post":{"operationId":"includeCrawlPages","summary":"Include excluded pages back into sync","tags":["Crawl"],"description":"Bulk include previously excluded pages back into the sync cycle.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPageActionDto"}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"included":{"type":"number"}},"required":["included"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/pages/delete":{"post":{"operationId":"deleteCrawlPages","summary":"Delete pages","tags":["Crawl"],"description":"Bulk delete pages from a website datasource. Optionally delete linked knowledge base items.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePagesDto"}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/pages/sync":{"post":{"operationId":"syncCrawlPageByUrl","summary":"Scrape and sync a page by URL","tags":["Crawl"],"description":"Scrape a URL and sync its content to the knowledge base. If the page already exists in the datasource it is re-scraped; otherwise a new page record is created.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPageByUrlDto"}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/crawl/{id}/pages/{pageId}/resync":{"post":{"operationId":"resyncCrawlPage","summary":"Resync a single page","tags":["Crawl"],"description":"Re-scrape and re-sync a single page to the knowledge base with the latest content.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"description":"The website datasource ID"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"pageId","required":true,"description":"The page ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/csat/scores":{"get":{"operationId":"getCsatScores","summary":"Get all CSAT scores","description":"Retrieve all CSAT scores for the organization with pagination","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"number"},"in":"query","name":"per_page","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCsatScoresPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/csat/scores/{score_id}":{"get":{"operationId":"getCsatScore","summary":"Get specific CSAT score","description":"Retrieve details of a specific CSAT score","parameters":[{"schema":{"type":"string"},"in":"path","name":"score_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsatScorePublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/csat/scores/session/{session_id}":{"get":{"operationId":"getCsatScoreBySession","summary":"Get session CSAT score","description":"Retrieve CSAT score for a specific session","parameters":[{"schema":{"type":"string"},"in":"path","name":"session_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsatScorePublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/csat/settings/channel/{channel}":{"get":{"operationId":"isCsatEnabledForChannel","summary":"Check if CSAT is enabled for a channel","description":"Check whether CSAT collection is enabled for the specified channel","parameters":[{"schema":{"$ref":"#/components/schemas/SessionChannel"},"in":"path","name":"channel","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string"},"enabled":{"type":"boolean"}},"required":["channel","enabled"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/csat/sessions/{session_id}/sent":{"get":{"operationId":"hasSessionCsatSent","summary":"Check if CSAT has been sent for a session","description":"Check whether a CSAT request has been sent for the specified session","parameters":[{"schema":{"type":"string"},"in":"path","name":"session_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"csat_sent":{"type":"boolean"}},"required":["session_id","csat_sent"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/autopilot":{"get":{"operationId":"getAutopilotStatus","summary":"Get autopilot status","description":"Get the autopilot enabled/disabled status for each channel. When autopilot is enabled on a channel, the AI automatically responds to customer messages.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotStatusResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"operationId":"updateAutopilotStatus","summary":"Enable or disable autopilot for a channel","description":"Turn autopilot on or off for a specific channel. When disabled, the AI will not automatically respond on that channel — conversations go directly to human agents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAutopilotInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotStatusResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/blocklist/contacts":{"get":{"operationId":"listBlockedContacts","summary":"List blocked contacts","description":"List all blocked contacts. Blocked contacts are ignored by the AI — their messages will not trigger any automated responses.","parameters":[{"schema":{"default":1,"type":"number"},"in":"query","name":"page","required":false,"description":"Page number (default: 1)"},{"schema":{"default":20,"type":"number"},"in":"query","name":"limit","required":false,"description":"Results per page (default: 20)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBlockedContactsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"blockContact","summary":"Block a contact","description":"Block a contact by email. The AI will stop responding to messages from this contact.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockContactInputDto"}}}},"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/blocklist/contacts/check/{contact_id}":{"get":{"operationId":"checkContactBlocked","summary":"Check if a contact is blocked","description":"Check whether a specific contact is currently blocked.","parameters":[{"schema":{"type":"string"},"in":"path","name":"contact_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBlockStatusOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/blocklist/contacts/{id}":{"delete":{"operationId":"unblockContact","summary":"Unblock a contact","description":"Remove a contact from the blocklist. The AI will resume responding to them.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The block record ID"}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/blocklist/domains":{"get":{"operationId":"listBlockedDomains","summary":"List blocked domains","description":"List all blocked email domains. Messages from contacts with emails on blocked domains are ignored by the AI.","parameters":[{"schema":{"default":1,"type":"number"},"in":"query","name":"page","required":false,"description":"Page number (default: 1)"},{"schema":{"default":20,"type":"number"},"in":"query","name":"limit","required":false,"description":"Results per page (default: 20)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBlockedDomainsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"blockDomains","summary":"Block email domains","description":"Block one or more email domains. Pass a comma-separated string for multiple domains (e.g. \"spam.com, junk.org\"). Messages from contacts with emails on these domains will be ignored.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDomainsInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDomainsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/blocklist/domains/check":{"get":{"operationId":"checkDomainBlocked","summary":"Check if a domain or email is blocked","description":"Check whether a domain is blocked. You can pass either a bare domain (e.g. \"spam.com\") or a full email (e.g. \"user@spam.com\") — the domain will be extracted automatically.","parameters":[{"schema":{"type":"string"},"in":"query","name":"value","required":true,"description":"A domain (e.g. \"spam.com\") or email (e.g. \"user@spam.com\")"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainBlockStatusOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/blocklist/domains/{id}":{"delete":{"operationId":"unblockDomain","summary":"Unblock a domain","description":"Remove a domain from the blocklist.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The block record ID"}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/email":{"post":{"operationId":"sendEmail","summary":"Send emails","description":"\nSend emails to multiple contacts, possibly with a time delay.\n\nTo send emails using the API, you must first verify the domain you want to\nsend emails from. You can add and verify custom domains in the settings.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailInput"}}}},"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/email/domains":{"put":{"operationId":"putCustomDomain","summary":"Add or update a custom domain for email sending","description":"\nAdd or update a custom domain for sending emails. After adding a domain, you'll need to verify it by adding the provided DNS records.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutCustomDomainInput"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutCustomDomainOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"listCustomDomains","summary":"List all custom domains","description":"\nList all custom domains for your organization, including their verification status and DNS records.\n","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCustomDomainsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/email/domains/{domainName}/verify":{"patch":{"operationId":"startVerifyingCustomDomain","summary":"Start verification process for a custom domain","description":"\nStart the verification process for a custom domain. Make sure you've added the DNS records before starting verification.\n","parameters":[{"schema":{"type":"string"},"in":"path","name":"domainName","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/email/domains/{domainName}":{"delete":{"operationId":"deleteCustomDomain","summary":"Delete a custom domain","description":"\nDelete a custom domain from your organization. This will prevent you from sending emails from this domain.\n","parameters":[{"schema":{"type":"string"},"in":"path","name":"domainName","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/handoff-analytics":{"get":{"operationId":"getHandoffAnalytics","summary":"Get handoff analytics","description":"Get a comprehensive overview of AI-to-human handoff events for a date range, including reason breakdowns, sentiment analysis, trends, and referenced resources.","parameters":[{"schema":{"type":"string"},"in":"query","name":"start_date","required":false,"description":"Start date in ISO 8601 format (defaults to 30 days ago)"},{"schema":{"type":"string"},"in":"query","name":"end_date","required":false,"description":"End date in ISO 8601 format (defaults to now)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffAnalyticsPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/office-hours":{"get":{"operationId":"listOfficeHours","summary":"List office hours schedules","description":"List all office hours schedules for your organization. Office hours define when your support team is available. The AI uses this to set expectations and route conversations appropriately outside business hours.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOfficeHoursOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"createOfficeHours","summary":"Create an office hours schedule","description":"Create a new office hours schedule with time shifts. Each shift defines a day (or day range) and start/end times. Example: Monday-Friday 9am-5pm EST would be one shift with day_of_week \"monday_to_friday\", start_time \"09:00:00\", end_time \"17:00:00\", and iana_timezone \"America/New_York\".","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfficeHoursPublicDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeHoursPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/office-hours/{id}":{"get":{"operationId":"getOfficeHours","summary":"Get an office hours schedule","description":"Get a specific office hours schedule by ID, including all its shifts.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeHoursPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"operationId":"updateOfficeHours","summary":"Update an office hours schedule","description":"Update an office hours schedule. The shifts array replaces all existing shifts — include all shifts you want to keep.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfficeHoursPublicDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteOfficeHours","summary":"Delete an office hours schedule","description":"Delete an office hours schedule and all its shifts. This action cannot be undone.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/tags":{"get":{"operationId":"listTags","summary":"List tags","description":"List all tags for your organization. Tags categorize chat sessions (e.g. \"billing\", \"refund\", \"feature-request\"). The AI can auto-tag sessions based on these.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTagsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"operationId":"upsertTag","summary":"Create or update a tag","description":"Create a new tag or update an existing one. If a tag with this name already exists, it will be updated. Use exclude_from_auto_tagging to prevent the AI from auto-applying this tag.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTagInputDto"}}}},"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/tags/in-use":{"get":{"operationId":"listTagsInUse","summary":"List tags in use","description":"List all distinct tag names that are actually applied to sessions. Useful to see which tags are being used vs. unused.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsInUseOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/tags/{tag_name}":{"delete":{"operationId":"deleteTag","summary":"Delete a tag","description":"Remove a tag from your organization. Sessions that already have this tag will keep it.","parameters":[{"schema":{"type":"string"},"in":"path","name":"tag_name","required":true,"description":"The tag name to remove"}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/tags/auto-tagging":{"get":{"operationId":"getAutoTaggingStatus","summary":"Get auto-tagging status","description":"Check whether AI auto-tagging is enabled for your organization. When enabled, the AI automatically applies relevant tags to chat sessions based on conversation content.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTaggingStatusOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"operationId":"updateAutoTaggingStatus","summary":"Enable or disable auto-tagging","description":"Turn AI auto-tagging on or off. When enabled, the AI will automatically apply relevant tags from your taxonomy to chat sessions based on conversation content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAutoTaggingInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAutoTaggingOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/definitions":{"get":{"operationId":"listWorkflowDefinitions","summary":"[Beta] List available action and trigger types","tags":["Workflows (Beta)"],"description":"List all available workflow action types and trigger types with their metadata. Use this to discover what actions and triggers are available when building workflows programmatically.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinitionsPublicDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/validate":{"post":{"operationId":"validateWorkflow","summary":"[Beta] Validate a workflow definition","tags":["Workflows (Beta)"],"description":"Validate workflow blocks without creating a workflow. Returns validation issues and the list of action types used. Use this before creating or updating a workflow to catch errors early.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateWorkflowPublicInput"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateWorkflowPublicOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows":{"get":{"operationId":"listWorkflows","summary":"[Beta] List workflows","tags":["Workflows (Beta)"],"description":"List all workflows in your organization (latest version of each). Workflows automate multi-step processes triggered by events, schedules, webhooks, or manual action.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflowsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"createWorkflow","summary":"[Beta] Create a workflow","tags":["Workflows (Beta)"],"description":"Create a new workflow. The workflow is created as an inactive draft (version 1). Use the activate endpoint to make it live. Use GET /workflows/definitions to discover available action and trigger types.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowPublicInput"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/{workflow_id}":{"get":{"operationId":"getWorkflow","summary":"[Beta] Get a workflow","tags":["Workflows (Beta)"],"description":"Get a specific workflow by its UUID, including its blocks, trigger configuration, and active status.","parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateWorkflow","summary":"[Beta] Update a workflow (creates a new version)","tags":["Workflows (Beta)"],"description":"Update a workflow by creating a new version. The new version is created as an inactive draft. Only the provided fields are changed; omitted fields carry over from the current version. Use the activate endpoint to make the new version live.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowPublicInput"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteWorkflow","summary":"[Beta] Delete a workflow","tags":["Workflows (Beta)"],"description":"Soft-delete a workflow and all its versions. Active versions are deactivated first. This cannot be undone.","parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWorkflowOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/{workflow_id}/activate":{"post":{"operationId":"activateWorkflow","summary":"[Beta] Activate a workflow","tags":["Workflows (Beta)"],"description":"Activate the latest version of a workflow. Any previously active version is deactivated. The workflow will start responding to its configured trigger.","parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateWorkflowOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/{workflow_id}/deactivate":{"post":{"operationId":"deactivateWorkflow","summary":"[Beta] Deactivate a workflow","tags":["Workflows (Beta)"],"description":"Deactivate the currently active version of a workflow. The workflow will stop responding to its trigger.","parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateWorkflowOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/{workflow_id}/trigger":{"post":{"operationId":"triggerWorkflow","summary":"[Beta] Trigger a workflow","tags":["Workflows (Beta)"],"description":"Manually trigger a workflow. The workflow must have a \"manual-trigger\" trigger type and must be active. The workflow runs asynchronously in the background.","parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true,"description":"The workflow UUID to trigger"}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/{workflow_id}/runs":{"get":{"operationId":"listWorkflowRuns","summary":"[Beta] List workflow runs","tags":["Workflows (Beta)"],"description":"List execution runs for a workflow with filtering and pagination. Filter by status (completed, failed, in_progress, canceled, idle), trigger cause (manual, automatic, scheduled), and search by keyword.","parameters":[{"schema":{"default":1,"type":"number"},"in":"query","name":"page","required":false,"description":"Page number (1-based)"},{"schema":{"default":20,"type":"number"},"in":"query","name":"limit","required":false,"description":"Results per page (max 50)"},{"schema":{"type":"string"},"in":"query","name":"status","required":false,"description":"Comma-separated statuses: completed, failed, in_progress, canceled, idle"},{"schema":{"type":"string"},"in":"query","name":"trigger_cause","required":false,"description":"Comma-separated causes: manual, automatic, scheduled"},{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflowRunsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/workflows/{workflow_id}/runs/{run_id}":{"get":{"operationId":"getWorkflowRun","summary":"[Beta] Get a workflow run","tags":["Workflows (Beta)"],"description":"Get details of a specific workflow run, including status, duration, trigger info, and timestamps.","parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true},{"schema":{"type":"string"},"in":"path","name":"run_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/org":{"get":{"operationId":"getOrg","summary":"Get current organization","tags":["Organization"],"description":"Retrieve the organization associated with the current API key.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateOrg","summary":"Update current organization","tags":["Organization"],"description":"Update settings of the organization associated with the current API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/phone/voices":{"get":{"operationId":"listVoices","summary":"List available voices","description":"List all available voices for AI phone agents. Each voice has an ID, name, labels (accent, gender, age, use case), and a preview URL. Use the voice_id when creating or updating a phone agent.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVoicesOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/phone":{"post":{"operationId":"createPhoneAgent","summary":"Create an AI phone agent","description":"Create an AI phone agent powered by the latest voice model. Use GET /phone/voices to browse available voices. Only name is required — everything else has sensible defaults.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePhoneAgentPublicDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneAgentDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"listPhoneAgents","summary":"List AI phone agents","description":"List all AI phone agents in your organization with full details including name, type, model, voice, language, phone number, and configuration.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPhoneAgentsOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/phone/{phone_agent_id}":{"get":{"operationId":"getPhoneAgent","summary":"Get an AI phone agent","description":"Get full details of a specific AI phone agent including its voice, language, instructions, phone number, model, and all configuration.","parameters":[{"schema":{"type":"string"},"in":"path","name":"phone_agent_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneAgentDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updatePhoneAgent","summary":"Update an AI phone agent","description":"Update an existing AI phone agent. Only the fields you provide will be changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneAgentPublicDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"phone_agent_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneAgentDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deletePhoneAgent","summary":"Delete an AI phone agent","description":"Permanently delete an AI phone agent and release its phone number. This action cannot be undone.","parameters":[{"schema":{"type":"string"},"in":"path","name":"phone_agent_id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/phone/outbound-call":{"post":{"operationId":"makeOutboundCall","summary":"Make an AI phone call","description":"Initiate an outbound call using an AI phone agent. You can target either an existing contact by ID or a raw phone number in E.164 format.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MakeOutboundCallDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MakeOutboundCallResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/redaction/message":{"post":{"operationId":"redactMessage","summary":"Redact a specific message","description":"Redact a specific message by message ID, including any attached images","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactMessageDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"itemId":{"type":"string"},"redactionType":{"type":"string","enum":["message","session"]},"affectedCount":{"type":"number"}},"required":["success","message","itemId","redactionType","affectedCount"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/redaction/session":{"post":{"operationId":"redactSession","summary":"Redact all messages in a session","description":"Redact all messages in a session by session ID, including any attached images","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactSessionDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"itemId":{"type":"string"},"redactionType":{"type":"string","enum":["message","session"]},"affectedCount":{"type":"number"},"messagesRedacted":{"type":"number"}},"required":["success","message","itemId","redactionType","affectedCount","messagesRedacted"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sequences":{"post":{"operationId":"createSequence","summary":"Create a sequence","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSequenceInput"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSequenceOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sequences/{sequence_id}":{"get":{"operationId":"getSequence","summary":"Get a sequence","parameters":[{"schema":{"type":"string"},"in":"path","name":"sequence_id","required":true,"description":"The unique identifier of the sequence"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSequenceOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"patch":{"operationId":"updateSequence","summary":"Update a sequence","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"default":"New Sequence","type":"string"},"custom_id":{"type":"string"},"is_continuous":{"default":true,"type":"boolean"},"filter":{"anyOf":[{"type":"object","properties":{"or":{"minItems":1,"type":"array","items":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ContactsFilter"}}},"required":["and"]}}},"required":["or"]},{"type":"null"}]},"steps":{"minItems":1,"type":"array","items":{"type":"object","properties":{"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["send_emails"]},"data":{"type":"object","properties":{"from_email":{"type":"string"},"email_subject":{"type":"string"},"email_body":{"type":"string"},"email_sender_name":{"type":"string"},"email_is_transactional":{"type":"boolean"}},"required":["from_email","email_subject","email_body","email_sender_name","email_is_transactional"]}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["make_phone_calls"]},"data":{"type":"object","properties":{"aiPhoneAgentId":{"type":"string"}},"required":["aiPhoneAgentId"]}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["send_sms_messages"]},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["send_whatsapp_messages"]},"data":{"type":"object","properties":{"phone_number_id":{"type":"string"},"template":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"parameters":{"$ref":"#/components/schemas/WhatsAppTemplateMappingDto"}},"required":["name","language","parameters"]}},"required":["phone_number_id","template"]}},"required":["type","data"]}]},"delay_in_minutes":{"type":"number","minimum":0}},"required":["action"]}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"sequence_id","required":true,"description":"The unique identifier of the sequence"}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sequences/{sequence_id}/start":{"put":{"operationId":"startSequence","summary":"Start a sequence","parameters":[{"schema":{"type":"string"},"in":"path","name":"sequence_id","required":true,"description":"The unique identifier of the sequence"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOneOffSequenceOutputDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sequences/{sequence_id}/cancel":{"put":{"operationId":"cancelSequence","summary":"Cancel a sequence","parameters":[{"schema":{"type":"string"},"in":"path","name":"sequence_id","required":true,"description":"The unique identifier of the sequence"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sequences/{sequence_id}/contacts":{"post":{"operationId":"addContactsToSequence","summary":"Add contacts to a continuous sequence","description":"\nAdd contacts to a continuous sequence (`is_continuous` property of the sequence must be `true`).\nContacts will *not* be added to the sequence if the sequence's `filter` does not apply to the contact.\n\nAny contacts added will automatically be added to contacts if they don't already exist.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddContactsToSequenceInput"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"sequence_id","required":true,"description":"The unique identifier of the sequence"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddContactsToSequenceOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/teams":{"get":{"operationId":"getTeams","summary":"Get all teams","description":"Retrieve all teams for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupDto"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"createTeam","summary":"Create new team","description":"Create a new team in the organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupDto"}}}},"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/teams/{teamId}":{"get":{"operationId":"getTeam","summary":"Get specific team","description":"Retrieve details of a specific team","parameters":[{"schema":{"type":"string"},"in":"path","name":"teamId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GroupDto"},{"type":"null"}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"operationId":"updateTeam","summary":"Update team","description":"Update an existing team","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"teamId","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteTeam","summary":"Delete team","description":"Delete an existing team","parameters":[{"schema":{"type":"string"},"in":"path","name":"teamId","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/teams/{teamId}/users":{"post":{"operationId":"addUserToTeam","summary":"Add user to team","description":"Add a user to an existing team","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUserToGroupDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"teamId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email"],"additionalProperties":false}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"getUsersInTeam","summary":"Get users in team","description":"Retrieve all users in a specific team","parameters":[{"schema":{"type":"string"},"in":"path","name":"teamId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email"],"additionalProperties":false}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/teams/{teamId}/users/{userId}":{"delete":{"operationId":"removeUserFromTeam","summary":"Remove user from team","description":"Remove a user from a team","parameters":[{"schema":{"type":"string"},"in":"path","name":"teamId","required":true},{"schema":{"type":"number"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training":{"get":{"operationId":"listTrainings","summary":"List all trainings","description":"List all training scenarios for your organization. Trainings teach the AI how to respond to specific situations.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainingPublicResponseDto"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"createTraining","summary":"Create a training","description":"Create a new training scenario. Use type \"BEHAVIORAL\" for always-active instructions (tone, guardrails) or \"SCENARIO_SPECIFIC\" (default) for question-triggered scenarios.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrainingPublicDto"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/search":{"post":{"operationId":"searchTrainingKnowledge","summary":"Semantic search across training and knowledge base","description":"Search across all training scenarios and knowledge base items using natural language. Returns results ranked by semantic relevance with a 0-100 relevance score. Use this to find existing content before creating new training scenarios.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTrainingKnowledgeInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/directories/tree":{"get":{"operationId":"getTrainingDirectoryTree","summary":"Get directory tree","description":"Get all directories with their trainings, plus uncategorized trainings. Useful for getting a full overview of how trainings are organized.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"show_drafts","required":false,"description":"Include draft trainings (default: true)"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"show_published","required":false,"description":"Include published trainings (default: true)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingDirectoryTreePublicDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/directories":{"get":{"operationId":"listTrainingDirectories","summary":"List training directories","description":"List all directories used to organize trainings.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomTrainingDirectoriesDto"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"operationId":"createTrainingDirectory","summary":"Create a training directory","description":"Create a new directory for organizing trainings.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrainingDirectoryInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTrainingDirectoriesDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/directories/{directory_id}":{"put":{"operationId":"updateTrainingDirectory","summary":"Update a training directory","description":"Rename a training directory.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrainingDirectoryInputDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"directory_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTrainingDirectoriesDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteTrainingDirectory","summary":"Delete a training directory","description":"Delete a training directory and all trainings inside it. This action cannot be undone.","parameters":[{"schema":{"type":"string"},"in":"path","name":"directory_id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/{id}":{"get":{"operationId":"getTraining","summary":"Get a training","description":"Get a single training by ID.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"operationId":"updateTraining","summary":"Update a training","description":"Update an existing training.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrainingPublicDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPublicResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"operationId":"deleteTraining","summary":"Delete a training","description":"Permanently delete a training. This action cannot be undone.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/{id}/draft":{"put":{"operationId":"toggleTrainingDraft","summary":"Toggle draft status","description":"Publish or unpublish a training. Draft trainings are saved but not used by the AI.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleDraftInputDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/training/{id}/move":{"post":{"operationId":"moveTrainingToDirectory","summary":"Move a training to a directory","description":"Move a training into a directory, or set directory_id to null to uncategorize it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveTrainingInputDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/insights":{"post":{"operationId":"getVocInsights","summary":"Get customer insights","description":"Retrieve customer insights (paginated response)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVocQueryDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPaginatedInsightsDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/insights/categories":{"get":{"operationId":"getCategories","summary":"Get categories","description":"Retrieve categories for customer feedback","parameters":[{"schema":{"type":"string","enum":["base","suggested","user_defined"]},"in":"query","name":"type","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicCategoryDto"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/insights/{id}":{"get":{"operationId":"getVocInsight","summary":"Get a specific customer insight","description":"Retrieve detailed information about a specific insight","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInsight"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/insights/{id}/resolve":{"post":{"operationId":"resolveInsight","summary":"Mark an insight as resolved","description":"Resolves a customer insight and optionally adds resolution details","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/insights/{id}/assign":{"post":{"operationId":"assignInsight","summary":"Assign insight to a group (team)","description":"Assigns a customer insight to a specific group (team)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignInsightDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/whatsapp/send-template":{"post":{"operationId":"sendTemplate","summary":"Send a WhatsApp template","description":"Directly send a WhatsApp template to a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTemplateInputDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTemplateOutputDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/widget/authenticate-user":{"post":{"operationId":"authenticateWidgetUser","summary":"Authenticate a widget user","description":"authenticate the contacts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateUserPayloadDto"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedWidgetContactTokenResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/test":{"get":{"operationId":"testConnection","summary":"Test API connection","description":"Validates the API key and returns ok if valid.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/hc":{"get":{"operationId":"listHelpCenters","summary":"List help centers","description":"List all help centers accessible by this API key.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHelpCentersOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/hc/{id}/export":{"get":{"operationId":"exportHelpCenterContent","summary":"Export help center content tree","description":"Export all published categories and articles for a help center.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportContentTreeDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/hc/{id}/sync":{"post":{"operationId":"syncHelpCenterContent","summary":"Sync help center content","description":"Replace the help center content tree with the provided tree. Diffs and applies changes atomically. Supports SSE streaming via Accept: text/event-stream.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncContentTreeDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResultDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/hc/{id}/openapi":{"put":{"operationId":"uploadOpenApiSpec","summary":"Upload or update OpenAPI spec","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenApiSpecDto"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenApiSpecResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"getOpenApiSpec","summary":"Get OpenAPI spec","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOpenApiSpecResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/hc/{id}/media":{"post":{"operationId":"uploadHelpCenterMedia","summary":"Upload media file to help center","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HcMediaUploadResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"get":{"operationId":"listHelpCenterMedia","summary":"List help center media files","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHelpCenterMediaOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/hc/{id}/media/{mediaId}":{"delete":{"operationId":"deleteHelpCenterMedia","summary":"Delete help center media file","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"mediaId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteHelpCenterMediaOutput"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/media/upload":{"post":{"summary":"Upload an image","description":"Upload an image to your organization storage. Useful for training content, help center, and other rich-text fields.\n\n**Request body:** `multipart/form-data` with one part named `file`. Use a filename and `Content-Type` that match the image (PNG, JPEG, GIF, or WebP).\n\n**Limits:** 5 MB maximum. Bytes are checked against the declared type (magic-byte validation).","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileUploadDto"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUploadResponseDto"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPublicErrorResponseDto"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPublicErrorResponseDto"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPublicErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sla/policies":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"org_id":{"type":"string"},"name":{"type":"string"},"office_hours_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"first_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"resolution_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","org_id","name","office_hours_id","first_reply_target_seconds","next_reply_target_seconds","resolution_target_seconds","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlaPolicyDto"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"org_id":{"type":"string"},"name":{"type":"string"},"office_hours_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"first_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"resolution_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","org_id","name","office_hours_id","first_reply_target_seconds","next_reply_target_seconds","resolution_target_seconds","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sla/policies/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"org_id":{"type":"string"},"name":{"type":"string"},"office_hours_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"first_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"resolution_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","org_id","name","office_hours_id","first_reply_target_seconds","next_reply_target_seconds","resolution_target_seconds","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlaPolicyDto"}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"org_id":{"type":"string"},"name":{"type":"string"},"office_hours_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"first_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_reply_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"resolution_target_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","org_id","name","office_hours_id","first_reply_target_seconds","next_reply_target_seconds","resolution_target_seconds","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sla/analytics":{"get":{"operationId":"getSlaAnalyticsOverview","summary":"Get SLA analytics overview","description":"Get SLA compliance rates, coverage rate, and response/resolution time percentiles for a date range.","parameters":[{"schema":{},"in":"query","name":"from","required":true},{"schema":{},"in":"query","name":"to","required":true},{"schema":{"default":"UTC","type":"string"},"in":"query","name":"timezone","required":false},{"schema":{"type":"string"},"in":"query","name":"policy_id","required":false},{"schema":{"type":"string"},"in":"query","name":"team_id","required":false},{"schema":{"type":"string","enum":["web","email","phone_voice","slack","sms","whatsapp","instagram","messenger","api","web_voice"]},"in":"query","name":"channel","required":false},{"schema":{"type":"number"},"in":"query","name":"agent_id","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaOverviewResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sla/analytics/breakdown":{"get":{"operationId":"getSlaAnalyticsBreakdown","summary":"Get SLA analytics breakdown","description":"Get SLA compliance rates grouped by policy, team, agent, or channel.","parameters":[{"schema":{},"in":"query","name":"from","required":true},{"schema":{},"in":"query","name":"to","required":true},{"schema":{"default":"UTC","type":"string"},"in":"query","name":"timezone","required":false},{"schema":{"type":"string"},"in":"query","name":"policy_id","required":false},{"schema":{"type":"string"},"in":"query","name":"team_id","required":false},{"schema":{"type":"string","enum":["web","email","phone_voice","slack","sms","whatsapp","instagram","messenger","api","web_voice"]},"in":"query","name":"channel","required":false},{"schema":{"type":"number"},"in":"query","name":"agent_id","required":false},{"schema":{"type":"string","enum":["policy","team","agent","channel"]},"in":"query","name":"group_by","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaBreakdownResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sla/analytics/trend":{"get":{"operationId":"getSlaAnalyticsTrend","summary":"Get SLA analytics trend","description":"Get SLA compliance rates over time, grouped by day or week.","parameters":[{"schema":{},"in":"query","name":"from","required":true},{"schema":{},"in":"query","name":"to","required":true},{"schema":{"default":"UTC","type":"string"},"in":"query","name":"timezone","required":false},{"schema":{"type":"string"},"in":"query","name":"policy_id","required":false},{"schema":{"type":"string"},"in":"query","name":"team_id","required":false},{"schema":{"type":"string","enum":["web","email","phone_voice","slack","sms","whatsapp","instagram","messenger","api","web_voice"]},"in":"query","name":"channel","required":false},{"schema":{"type":"number"},"in":"query","name":"agent_id","required":false},{"schema":{"default":"day","type":"string","enum":["day","week"]},"in":"query","name":"granularity","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaTrendResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/sla/analytics/breach-heatmap":{"get":{"operationId":"getSlaBreachHeatmap","summary":"Get SLA breach heatmap","description":"Get a heatmap of SLA breaches by hour of day and day of week.","parameters":[{"schema":{},"in":"query","name":"from","required":true},{"schema":{},"in":"query","name":"to","required":true},{"schema":{"default":"UTC","type":"string"},"in":"query","name":"timezone","required":false},{"schema":{"type":"string"},"in":"query","name":"policy_id","required":false},{"schema":{"type":"string"},"in":"query","name":"team_id","required":false},{"schema":{"type":"string","enum":["web","email","phone_voice","slack","sms","whatsapp","instagram","messenger","api","web_voice"]},"in":"query","name":"channel","required":false},{"schema":{"type":"number"},"in":"query","name":"agent_id","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlaBreachHeatmapResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}},"/salesforce/miaw/webhook":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesforceMiawWebhookBody"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesforceMiawWebhookResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}}}}},"servers":[{"url":"https://api.open.cx","description":"Production"}],"security":[{"bearerAuth":[]}]}