{"openapi":"3.1.0","info":{"title":"Amomic-AI API","version":"1.0.0","description":"Send messages, place AI calls, and read conversations from your own systems. Authenticate with `Authorization: Bearer amk_â€¦` or `X-Api-Key`. Server-side only â€” these routes send no CORS headers."},"servers":[{"url":"https://services.amomic.in"}],"paths":{"/api/v1/ping":{"get":{"tags":["public-api"],"summary":"Ping","description":"Verify a key without side effects â€” the first call every integration makes.","operationId":"ping_api_v1_ping_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ping Api V1 Ping Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/messages":{"post":{"tags":["public-api"],"summary":"Send Message","description":"Send an outbound message on a connected channel.\n\nSend `Idempotency-Key` and a network retry replays the first result instead\nof sending twice â€” the difference between a safe retry and a customer\nreceiving your order update three times.","operationId":"send_message_api_v1_messages_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/channels":{"get":{"tags":["public-api"],"summary":"List Channels","description":"Sendable identities and callable channels for this workspace.\n\nDiscovery matters more here than in a console API: an integration author has\nno UI to copy a `sender_id` out of.","operationId":"list_channels_api_v1_channels_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Channels Api V1 Channels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/calls":{"post":{"tags":["public-api"],"summary":"Place Call","description":"Have an AI agent call someone.\n\nReturns as soon as the number is ringing â€” the conversation happens after\nthis response. Poll `GET /calls/{id}` or subscribe to `call.ended` for the\noutcome; a synchronous call would mean holding an HTTP request open for\nminutes.","operationId":"place_call_api_v1_calls_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceCallIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/calls/{call_id}":{"get":{"tags":["public-api"],"summary":"Get Call","operationId":"get_call_api_v1_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/calls/{call_id}/hangup":{"post":{"tags":["public-api"],"summary":"Hangup Call","operationId":"hangup_call_api_v1_calls__call_id__hangup_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations":{"get":{"tags":["public-api"],"summary":"List Conversations","operationId":"list_conversations_api_v1_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}":{"get":{"tags":["public-api"],"summary":"Get Conversation","operationId":"get_conversation_api_v1_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConversationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}/messages":{"get":{"tags":["public-api"],"summary":"List Messages","operationId":"list_messages_api_v1_conversations__conversation_id__messages_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents":{"get":{"tags":["public-api"],"summary":"List Agents","operationId":"list_agents_api_v1_agents_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contacts":{"post":{"tags":["public-api"],"summary":"Upsert Contact","description":"Create or match a CRM contact. Matching is by email, then phone.\n\nReturns 409 when the supplied identities already belong to two *different*\ncontacts â€” merging them is a judgement call, and guessing produces a\nduplicate someone has to clean up later.","operationId":"upsert_contact_api_v1_contacts_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertContactIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets":{"post":{"tags":["public-api"],"summary":"Create Ticket","operationId":"create_ticket_api_v1_tickets_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}":{"get":{"tags":["public-api"],"summary":"Get Ticket","operationId":"get_ticket_api_v1_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AISuggestRequest":{"properties":{"guidance":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Guidance"}},"type":"object","title":"AISuggestRequest"},"ActionsToolPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","title":"ActionsToolPolicy","description":"Master switch for action-class knowledge tools on this agent.\n\nA knowledge source marked `action` can change things in the customer's\nsystems. Capability follows KB attachment, so this is the per-agent opt-out:\nturn it off and the agent keeps every read tool but is shown no action tool\nat all."},"ActivateIn":{"properties":{"expected_connection_version":{"type":"integer","minimum":1,"title":"Expected Connection Version"}},"type":"object","required":["expected_connection_version"],"title":"ActivateIn"},"AgentCreate":{"properties":{"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"},"purpose":{"type":"string","maxLength":500,"minLength":1,"title":"Purpose"},"instructions":{"type":"string","maxLength":4000,"title":"Instructions","default":""},"language":{"type":"string","maxLength":16,"minLength":2,"title":"Language","default":"en"},"grounding_policy":{"type":"string","enum":["grounded","balanced"],"title":"Grounding Policy","default":"grounded"},"knowledge_mode":{"type":"string","enum":["required","no_business_knowledge"],"title":"Knowledge Mode","default":"required"},"tool_policy":{"$ref":"#/components/schemas/AgentToolPolicy"}},"type":"object","required":["name","purpose"],"title":"AgentCreate"},"AgentDeploymentSummary":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"channel":{"type":"string","enum":["web","whatsapp","voice","email"],"title":"Channel"},"connection_id":{"type":"string","title":"Connection Id"},"connection_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Label"},"lifecycle_state":{"type":"string","enum":["draft","validating","ready","active","superseded","archived"],"title":"Lifecycle State","default":"active"},"desired_state":{"type":"string","enum":["active","paused"],"title":"Desired State","default":"paused"},"health_state":{"type":"string","enum":["unknown","healthy","degraded","error"],"title":"Health State","default":"unknown"},"version":{"type":"integer","title":"Version","default":1}},"type":"object","required":["deployment_id","channel","connection_id"],"title":"AgentDeploymentSummary","description":"Card-level view of one live/paused deployment, labels included so the\nconsole never has to render raw connection IDs or fan out N+1 queries."},"AgentOut":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"language":{"type":"string","title":"Language","default":"en"},"grounding_policy":{"type":"string","enum":["grounded","balanced"],"title":"Grounding Policy","default":"grounded"},"knowledge_mode":{"type":"string","enum":["required","no_business_knowledge"],"title":"Knowledge Mode","default":"required"},"tool_policy":{"$ref":"#/components/schemas/AgentToolPolicy"},"publication_state":{"type":"string","enum":["never_published","published","archived"],"title":"Publication State","default":"never_published"},"draft_state":{"type":"string","enum":["clean","unpublished_changes","needs_review"],"title":"Draft State","default":"unpublished_changes"},"current_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Version Id"},"version":{"type":"integer","title":"Version","default":1},"knowledge_count":{"type":"integer","title":"Knowledge Count","default":0},"ready_knowledge_count":{"type":"integer","title":"Ready Knowledge Count","default":0},"active_deployment_count":{"type":"integer","title":"Active Deployment Count","default":0},"deployments":{"items":{"$ref":"#/components/schemas/AgentDeploymentSummary"},"type":"array","title":"Deployments"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["agent_id","tenant_id","name"],"title":"AgentOut"},"AgentToolPolicy":{"properties":{"ticketing":{"$ref":"#/components/schemas/TicketingToolPolicy"},"actions":{"$ref":"#/components/schemas/ActionsToolPolicy"},"whatsapp":{"$ref":"#/components/schemas/WhatsAppToolPolicy"},"write_actions":{"type":"string","const":"approved_only","title":"Write Actions","default":"approved_only"}},"type":"object","title":"AgentToolPolicy"},"AgentUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Name"},"purpose":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Purpose"},"instructions":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Instructions"},"language":{"anyOf":[{"type":"string","maxLength":16,"minLength":2},{"type":"null"}],"title":"Language"},"grounding_policy":{"anyOf":[{"type":"string","enum":["grounded","balanced"]},{"type":"null"}],"title":"Grounding Policy"},"knowledge_mode":{"anyOf":[{"type":"string","enum":["required","no_business_knowledge"]},{"type":"null"}],"title":"Knowledge Mode"},"tool_policy":{"anyOf":[{"$ref":"#/components/schemas/AgentToolPolicy"},{"type":"null"}]},"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"AgentUpdate"},"AgentVersionOut":{"properties":{"version_id":{"type":"string","title":"Version Id"},"agent_id":{"type":"string","title":"Agent Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"sequence":{"type":"integer","title":"Sequence"},"configuration_hash":{"type":"string","title":"Configuration Hash"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"},"binding_manifest":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Binding Manifest"},"tool_policy":{"additionalProperties":true,"type":"object","title":"Tool Policy"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Summary"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["version_id","agent_id","tenant_id","sequence","configuration_hash","snapshot","binding_manifest"],"title":"AgentVersionOut"},"AnalyticsKpis":{"properties":{"conversations":{"type":"integer","title":"Conversations","default":0},"messages":{"type":"integer","title":"Messages","default":0},"avg_messages":{"type":"number","title":"Avg Messages","default":0},"unique_visitors":{"type":"integer","title":"Unique Visitors","default":0},"preview_conversations":{"type":"integer","title":"Preview Conversations","default":0}},"type":"object","title":"AnalyticsKpis"},"AnalyticsOverviewOut":{"properties":{"range":{"type":"string","enum":["24h","7d","30d","90d"],"title":"Range"},"kpis":{"$ref":"#/components/schemas/AnalyticsKpis"},"volume":{"items":{"$ref":"#/components/schemas/VolumePoint"},"type":"array","title":"Volume"},"by_bot":{"items":{"$ref":"#/components/schemas/BotBreakdown"},"type":"array","title":"By Bot"},"by_channel":{"items":{"$ref":"#/components/schemas/ChannelBreakdown"},"type":"array","title":"By Channel"},"by_connection":{"items":{"$ref":"#/components/schemas/ConnectionUsage"},"type":"array","title":"By Connection","default":[]},"by_deployment":{"items":{"$ref":"#/components/schemas/DeploymentUsage"},"type":"array","title":"By Deployment","default":[]},"unattributed":{"$ref":"#/components/schemas/UsageUnits","default":{"conversations":0,"messages":0,"unique_visitors":0,"calls":0,"minutes":0}}},"type":"object","required":["range","kpis","volume","by_bot","by_channel"],"title":"AnalyticsOverviewOut"},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string","enum":["messages:send","calls:write","conversations:read","contacts:write","tickets:write","agents:read"]},"type":"array","title":"Scopes"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"key_id":{"type":"string","title":"Key Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"masked":{"type":"string","title":"Masked"},"environment":{"type":"string","enum":["live","test"],"title":"Environment"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"status":{"type":"string","enum":["active","rolling","revoked"],"title":"Status","default":"active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"replaced_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replaced By"},"token":{"type":"string","title":"Token"},"warning":{"type":"string","title":"Warning","default":"Copy this key now. It cannot be shown again."}},"type":"object","required":["key_id","tenant_id","name","masked","environment","token"],"title":"ApiKeyCreated","description":"The one and only response that carries the secret."},"ApiKeyOut":{"properties":{"key_id":{"type":"string","title":"Key Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"masked":{"type":"string","title":"Masked"},"environment":{"type":"string","enum":["live","test"],"title":"Environment"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"status":{"type":"string","enum":["active","rolling","revoked"],"title":"Status","default":"active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"replaced_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replaced By"}},"type":"object","required":["key_id","tenant_id","name","masked","environment"],"title":"ApiKeyOut"},"ApiKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string","enum":["messages:send","calls:write","conversations:read","contacts:write","tickets:write","agents:read"]},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","title":"ApiKeyUpdate"},"ArchiveIn":{"properties":{"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"ArchiveIn"},"AssigneeStats":{"properties":{"uid":{"type":"string","title":"Uid"},"name":{"type":"string","title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"open":{"type":"integer","title":"Open","default":0},"pending":{"type":"integer","title":"Pending","default":0},"waiting_customer":{"type":"integer","title":"Waiting Customer","default":0},"resolved":{"type":"integer","title":"Resolved","default":0},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["uid","name"],"title":"AssigneeStats"},"AttachKnowledgeIn":{"properties":{"kb_id":{"type":"string","maxLength":64,"minLength":1,"title":"Kb Id"},"priority":{"type":"integer","maximum":1000,"minimum":0,"title":"Priority","default":100},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["kb_id"],"title":"AttachKnowledgeIn"},"BindingOut":{"properties":{"binding_id":{"type":"string","title":"Binding Id"},"agent_id":{"type":"string","title":"Agent Id"},"kb_id":{"type":"string","title":"Kb Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"priority":{"type":"integer","title":"Priority","default":100},"enabled":{"type":"boolean","title":"Enabled","default":true},"serving_state":{"type":"string","enum":["empty","ready","degraded","unavailable"],"title":"Serving State","default":"empty"},"active_revision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Revision Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["binding_id","agent_id","kb_id"],"title":"BindingOut"},"Body_legacy_upload_source_v1_bots__bot_id__kb_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_legacy_upload_source_v1_bots__bot_id__kb_upload_post"},"Body_submit_compliance_v1_voice_compliance_post":{"properties":{"alias":{"type":"string","title":"Alias"},"legal_name":{"type":"string","title":"Legal Name"},"registration_certificate":{"type":"string","contentMediaType":"application/octet-stream","title":"Registration Certificate"},"tax_proof":{"type":"string","contentMediaType":"application/octet-stream","title":"Tax Proof"}},"type":"object","required":["alias","legal_name","registration_certificate","tax_proof"],"title":"Body_submit_compliance_v1_voice_compliance_post"},"Body_update_sender_profile_photo_v1_whatsapp_senders__sender_id__profile_photo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_update_sender_profile_photo_v1_whatsapp_senders__sender_id__profile_photo_post"},"Body_upload_asset_v1_bots__bot_id__assets_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_asset_v1_bots__bot_id__assets_post"},"Body_upload_source_v1_kb__kb_id__upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_source_v1_kb__kb_id__upload_post"},"Body_widget_message_vision_w__public_id__messages_vision_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"visitor_id":{"type":"string","maxLength":64,"minLength":8,"title":"Visitor Id"},"text":{"type":"string","maxLength":4000,"title":"Text","default":""},"conversation_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["image","visitor_id"],"title":"Body_widget_message_vision_w__public_id__messages_vision_post"},"BotAvatar":{"properties":{"kind":{"type":"string","enum":["default","custom"],"title":"Kind","default":"default"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","title":"BotAvatar"},"BotBreakdown":{"properties":{"bot_id":{"type":"string","title":"Bot Id"},"bot_name":{"type":"string","title":"Bot Name"},"conversations":{"type":"integer","title":"Conversations"},"messages":{"type":"integer","title":"Messages"}},"type":"object","required":["bot_id","bot_name","conversations","messages"],"title":"BotBreakdown"},"BotCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Name"},"website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Website"}},"type":"object","title":"BotCreate"},"BotLauncher":{"properties":{"icon":{"type":"string","title":"Icon","default":"chat"},"custom_icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Icon Url"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"position":{"type":"string","enum":["right","left"],"title":"Position","default":"right"}},"type":"object","title":"BotLauncher"},"BotOut":{"properties":{"bot_id":{"type":"string","title":"Bot Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"public_id":{"type":"string","title":"Public Id"},"status":{"type":"string","enum":["draft","live"],"title":"Status"},"name":{"type":"string","title":"Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"welcome_message":{"type":"string","title":"Welcome Message"},"suggested_questions":{"items":{"type":"string"},"type":"array","title":"Suggested Questions"},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains"},"theme":{"$ref":"#/components/schemas/BotTheme"},"launcher":{"$ref":"#/components/schemas/BotLauncher"},"avatar":{"$ref":"#/components/schemas/BotAvatar"},"lead_capture":{"$ref":"#/components/schemas/LeadCapture"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"language":{"type":"string","title":"Language","default":"en"},"grounding_policy":{"type":"string","enum":["grounded","balanced"],"title":"Grounding Policy","default":"grounded"},"knowledge_mode":{"type":"string","enum":["required","no_business_knowledge"],"title":"Knowledge Mode","default":"required"},"publication_state":{"type":"string","enum":["never_published","published","archived"],"title":"Publication State","default":"never_published"},"draft_state":{"type":"string","enum":["clean","unpublished_changes","needs_review"],"title":"Draft State","default":"unpublished_changes"},"current_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Version Id"},"version":{"type":"integer","title":"Version","default":1},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived At"},"auto":{"additionalProperties":true,"type":"object","title":"Auto"},"kb_ids":{"items":{"type":"string"},"type":"array","title":"Kb Ids"},"default_kb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Kb Id"},"kb_chunks":{"type":"integer","title":"Kb Chunks","default":0},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["bot_id","tenant_id","public_id","status","name","welcome_message"],"title":"BotOut"},"BotTheme":{"properties":{"primary":{"type":"string","title":"Primary","default":"#6E56CF"},"mode":{"type":"string","enum":["light","dark","auto"],"title":"Mode","default":"auto"},"font":{"type":"string","title":"Font","default":"Inter"}},"type":"object","title":"BotTheme"},"BotUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Name"},"company_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Company Name"},"website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Website"},"status":{"anyOf":[{"type":"string","enum":["draft","live"]},{"type":"null"}],"title":"Status"},"welcome_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Welcome Message"},"suggested_questions":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":5},{"type":"null"}],"title":"Suggested Questions"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Allowed Domains"},"theme":{"anyOf":[{"$ref":"#/components/schemas/BotTheme"},{"type":"null"}]},"launcher":{"anyOf":[{"$ref":"#/components/schemas/BotLauncher"},{"type":"null"}]},"avatar":{"anyOf":[{"$ref":"#/components/schemas/BotAvatar"},{"type":"null"}]},"lead_capture":{"anyOf":[{"$ref":"#/components/schemas/LeadCapture"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Instructions"},"purpose":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Purpose"},"language":{"anyOf":[{"type":"string","maxLength":16,"minLength":2},{"type":"null"}],"title":"Language"},"grounding_policy":{"anyOf":[{"type":"string","enum":["grounded","balanced"]},{"type":"null"}],"title":"Grounding Policy"},"knowledge_mode":{"anyOf":[{"type":"string","enum":["required","no_business_knowledge"]},{"type":"null"}],"title":"Knowledge Mode"}},"type":"object","title":"BotUpdate","description":"Partial update â€” only provided fields change."},"BrandScanIn":{"properties":{"website":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Website"}},"type":"object","title":"BrandScanIn"},"BrandScanOut":{"properties":{"identity":{"additionalProperties":true,"type":"object","title":"Identity"},"theme":{"additionalProperties":true,"type":"object","title":"Theme"},"source":{"type":"string","enum":["website","knowledge","default"],"title":"Source","default":"default"}},"type":"object","title":"BrandScanOut"},"CallOut":{"properties":{"call_id":{"type":"string","title":"Call Id"},"status":{"type":"string","title":"Status"},"direction":{"type":"string","title":"Direction","default":"outbound"},"to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"recording_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Uri"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["call_id","status"],"title":"CallOut"},"ChannelBreakdown":{"properties":{"channel":{"type":"string","title":"Channel"},"conversations":{"type":"integer","title":"Conversations"}},"type":"object","required":["channel","conversations"],"title":"ChannelBreakdown"},"ChatMessageOut":{"properties":{"message_id":{"type":"string","title":"Message Id"},"role":{"type":"string","title":"Role"},"text":{"type":"string","title":"Text"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["message_id","role","text"],"title":"ChatMessageOut"},"ClickToCallRequest":{"properties":{"ticket_id":{"type":"string","maxLength":128,"minLength":1,"title":"Ticket Id"},"mode":{"type":"string","enum":["phone","web"],"title":"Mode","default":"phone"},"from_e164":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"From E164"}},"type":"object","required":["ticket_id"],"title":"ClickToCallRequest","description":"Start a click-to-call from a support ticket.\n\n`phone` rings the agent's own OTP-verified phone and the customer's phone and\nbridges them. `web` bridges the agent's in-browser softphone (already\nregistered) with the customer's phone; the agent leg arrives via SIP/WSS."},"ClickToCallResponse":{"properties":{"call_id":{"type":"string","title":"Call Id"},"status":{"type":"string","title":"Status"},"mode":{"type":"string","enum":["phone","web"],"title":"Mode"},"customer_e164":{"type":"string","title":"Customer E164"},"from_e164":{"type":"string","title":"From E164"},"agent_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent E164"},"webrtc":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Webrtc"}},"type":"object","required":["call_id","status","mode","customer_e164","from_e164"],"title":"ClickToCallResponse"},"CloneDeploymentIn":{"properties":{"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","title":"CloneDeploymentIn"},"ComplianceReviewRequest":{"properties":{"action":{"type":"string","enum":["approve","reject"],"title":"Action"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["action"],"title":"ComplianceReviewRequest","description":"Operator verdict on a pending KYC submission (OIDC surface)."},"ConfigUpdate":{"properties":{"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"phone_number_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Phone Number Id"},"waba_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Waba Id"},"display_number":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Display Number"},"bot_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Bot Id"},"access_token":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Access Token"},"mark_read":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mark Read"},"typing_indicator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Typing Indicator"},"status":{"anyOf":[{"type":"string","enum":["configuring","live","disabled"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"ConfigUpdate"},"ConnectionCreate":{"properties":{"channel":{"type":"string","enum":["web","whatsapp","voice","email"],"title":"Channel"},"label":{"type":"string","maxLength":100,"minLength":1,"title":"Label"},"external_identity":{"additionalProperties":true,"type":"object","title":"External Identity"},"provider_account_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Provider Account Id"},"capabilities":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Capabilities"}},"type":"object","required":["channel","label"],"title":"ConnectionCreate"},"ConnectionOut":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"channel":{"type":"string","enum":["web","whatsapp","voice","email"],"title":"Channel"},"label":{"type":"string","title":"Label"},"external_identity":{"additionalProperties":true,"type":"object","title":"External Identity"},"provider_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Account Id"},"admin_state":{"type":"string","enum":["enabled","disabled"],"title":"Admin State","default":"enabled"},"verification_state":{"type":"string","enum":["unverified","pending","verified"],"title":"Verification State","default":"unverified"},"health_state":{"type":"string","enum":["healthy","degraded","error","unknown"],"title":"Health State","default":"unknown"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"stable_public_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stable Public Id"},"active_deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Deployment Id"},"version":{"type":"integer","title":"Version","default":1},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["connection_id","tenant_id","channel","label"],"title":"ConnectionOut"},"ConnectionUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Label"},"external_identity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Identity"},"admin_state":{"anyOf":[{"type":"string","enum":["enabled","disabled"]},{"type":"null"}],"title":"Admin State"},"health_state":{"anyOf":[{"type":"string","enum":["healthy","degraded","error","unknown"]},{"type":"null"}],"title":"Health State"},"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"ConnectionUpdate"},"ConnectionUsage":{"properties":{"conversations":{"type":"integer","title":"Conversations","default":0},"messages":{"type":"integer","title":"Messages","default":0},"unique_visitors":{"type":"integer","title":"Unique Visitors","default":0},"calls":{"type":"integer","title":"Calls","default":0},"minutes":{"type":"number","title":"Minutes","default":0},"connection_id":{"type":"string","title":"Connection Id"},"channel":{"type":"string","title":"Channel"},"connection_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Label"}},"type":"object","required":["connection_id","channel"],"title":"ConnectionUsage","description":"Usage rolled up to one touchpoint (the default per-deployment view)."},"ConversationOut":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"bot_id":{"type":"string","title":"Bot Id"},"bot_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Name"},"channel":{"type":"string","title":"Channel"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"customer":{"additionalProperties":true,"type":"object","title":"Customer"},"status":{"type":"string","title":"Status","default":"open"},"source":{"type":"string","title":"Source","default":"website"},"message_count":{"type":"integer","title":"Message Count","default":0},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"last_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["conversation_id","bot_id","channel"],"title":"ConversationOut"},"ConversationPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConversationOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ConversationPage"},"ConversationRef":{"properties":{"channel":{"type":"string","enum":["web","whatsapp","voice","email"],"title":"Channel"},"external_id":{"type":"string","title":"External Id"}},"type":"object","required":["channel","external_id"],"title":"ConversationRef"},"CreateTicketIn":{"properties":{"subject":{"type":"string","maxLength":240,"minLength":1,"title":"Subject"},"description":{"type":"string","maxLength":8000,"minLength":1,"title":"Description"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"title":"Priority","default":"normal"},"requester_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Requester Name"},"requester_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Requester Email"},"requester_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Requester Phone"},"tags":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Tags"}},"type":"object","required":["subject","description"],"title":"CreateTicketIn"},"Customer":{"properties":{"external_id":{"type":"string","title":"External Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["external_id"],"title":"Customer"},"DeliveryOut":{"properties":{"delivery_id":{"type":"string","title":"Delivery Id"},"endpoint_id":{"type":"string","title":"Endpoint Id"},"event_type":{"type":"string","title":"Event Type"},"event_id":{"type":"string","title":"Event Id"},"attempt":{"type":"integer","title":"Attempt","default":1},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"succeeded":{"type":"boolean","title":"Succeeded","default":false},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["delivery_id","endpoint_id","event_type","event_id"],"title":"DeliveryOut"},"DeploymentCreate":{"properties":{"connection_id":{"type":"string","maxLength":64,"minLength":1,"title":"Connection Id"},"agent_version_id":{"type":"string","maxLength":64,"minLength":1,"title":"Agent Version Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["connection_id","agent_version_id"],"title":"DeploymentCreate"},"DeploymentListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DeploymentOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"DeploymentListOut"},"DeploymentOut":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"channel":{"type":"string","enum":["web","whatsapp","voice","email"],"title":"Channel"},"connection_id":{"type":"string","title":"Connection Id"},"agent_id":{"type":"string","title":"Agent Id"},"agent_version_id":{"type":"string","title":"Agent Version Id"},"lifecycle_state":{"type":"string","enum":["draft","validating","ready","active","superseded","archived"],"title":"Lifecycle State","default":"draft"},"desired_state":{"type":"string","enum":["active","paused"],"title":"Desired State","default":"paused"},"health_state":{"type":"string","enum":["unknown","healthy","degraded","error"],"title":"Health State","default":"unknown"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"validation_snapshot":{"additionalProperties":true,"type":"object","title":"Validation Snapshot"},"supersedes_deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supersedes Deployment Id"},"rollback_of_deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rollback Of Deployment Id"},"activated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activated At"},"superseded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded At"},"last_healthy_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Healthy At"},"last_error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Error"},"version":{"type":"integer","title":"Version","default":1},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["deployment_id","tenant_id","channel","connection_id","agent_id","agent_version_id"],"title":"DeploymentOut"},"DeploymentUpdate":{"properties":{"agent_version_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Agent Version Id"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"DeploymentUpdate"},"DeploymentUsage":{"properties":{"conversations":{"type":"integer","title":"Conversations","default":0},"messages":{"type":"integer","title":"Messages","default":0},"unique_visitors":{"type":"integer","title":"Unique Visitors","default":0},"calls":{"type":"integer","title":"Calls","default":0},"minutes":{"type":"number","title":"Minutes","default":0},"deployment_id":{"type":"string","title":"Deployment Id"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"channel":{"type":"string","title":"Channel"},"connection_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Label"}},"type":"object","required":["deployment_id","channel"],"title":"DeploymentUsage","description":"Usage for one immutable deployment record (drill-down)."},"DeploymentValidateOut":{"properties":{"ready":{"type":"boolean","title":"Ready"},"blockers":{"items":{"$ref":"#/components/schemas/ReadinessIssue"},"type":"array","title":"Blockers"},"warnings":{"items":{"$ref":"#/components/schemas/ReadinessIssue"},"type":"array","title":"Warnings"},"checks":{"additionalProperties":{"type":"string","enum":["pass","fail","warning"]},"type":"object","title":"Checks"}},"type":"object","required":["ready","checks"],"title":"DeploymentValidateOut"},"EmbeddedSignupComplete":{"properties":{"code":{"type":"string","maxLength":2048,"minLength":8,"title":"Code"},"waba_id":{"type":"string","maxLength":64,"minLength":3,"pattern":"^[0-9]+$","title":"Waba Id"},"phone_number_id":{"type":"string","maxLength":64,"minLength":3,"pattern":"^[0-9]+$","title":"Phone Number Id"},"business_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[0-9]+$"},{"type":"null"}],"title":"Business Id"},"bot_id":{"type":"string","maxLength":64,"minLength":3,"title":"Bot Id"}},"type":"object","required":["code","waba_id","phone_number_id","bot_id"],"title":"EmbeddedSignupComplete","description":"One-time values returned by Meta's Embedded Signup popup."},"EndpointOut":{"properties":{"url":{"type":"string","title":"Url"},"method":{"type":"string","title":"Method","default":"GET"},"header_names":{"items":{"type":"string"},"type":"array","title":"Header Names"},"mode":{"type":"string","title":"Mode","default":"sync"},"capability":{"type":"string","enum":["read","action"],"title":"Capability","default":"read"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"credentials_vaulted":{"type":"boolean","title":"Credentials Vaulted","default":false}},"type":"object","required":["url"],"title":"EndpointOut","description":"Endpoint spec as the console reads it back â€” header values never leave."},"EndpointSpec":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"GET"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body"},"mode":{"type":"string","enum":["sync","live"],"title":"Mode","default":"sync"},"capability":{"type":"string","enum":["read","action"],"title":"Capability","default":"read"},"name":{"anyOf":[{"type":"string","maxLength":63},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"params_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params Schema"},"timeout_ms":{"anyOf":[{"type":"integer","maximum":60000,"minimum":1000},{"type":"null"}],"title":"Timeout Ms"}},"type":"object","required":["url"],"title":"EndpointSpec","description":"A dynamic API source. `mode=sync` = fetch + ingest on a schedule;\n`mode=live` = registered as an answer-time tool (function calling).\n\n`capability` is the read/write boundary the product is built on: knowledge\n*answers questions* (`read` â€” look up an order, check availability), tools\n*change things* (`action` â€” accept a return, cancel a booking). An action\nmust be a live tool and unlocks the mutating HTTP verbs; a read source keeps\nthe GET/POST shape it has always had."},"GreetingGenerateRequest":{"properties":{"bot_id":{"type":"string","maxLength":64,"minLength":1,"title":"Bot Id"},"language":{"type":"string","enum":["en","multi","indic"],"title":"Language","default":"multi"},"greeting_language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Greeting Language"}},"type":"object","required":["bot_id"],"title":"GreetingGenerateRequest","description":"Write an opening line from the agent's knowledge base."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InboundTicket":{"properties":{"tenant_id":{"type":"string","maxLength":120,"minLength":3,"pattern":"^[A-Za-z0-9_-]+$","title":"Tenant Id"},"subject":{"type":"string","maxLength":240,"minLength":1,"title":"Subject"},"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"},"source":{"$ref":"#/components/schemas/TicketSource"},"requester":{"$ref":"#/components/schemas/TicketRequester"},"idempotency_key":{"type":"string","maxLength":240,"minLength":8,"title":"Idempotency Key"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"title":"Priority","default":"normal"},"category":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"},"ai_context":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Ai Context"}},"type":"object","required":["tenant_id","subject","content","source","requester","idempotency_key"],"title":"InboundTicket"},"InternalMessageCreate":{"properties":{"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":240,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"tenant_id":{"type":"string","maxLength":120,"minLength":3,"pattern":"^[A-Za-z0-9_-]+$","title":"Tenant Id"},"source_message_id":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Source Message Id"}},"type":"object","required":["content","tenant_id"],"title":"InternalMessageCreate"},"KbConnectBody":{"properties":{"bot_id":{"type":"string","maxLength":64,"minLength":1,"title":"Bot Id"}},"type":"object","required":["bot_id"],"title":"KbConnectBody"},"KbConnectionOut":{"properties":{"bot_id":{"type":"string","title":"Bot Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["draft","live"],"title":"Status","default":"draft"},"connected":{"type":"boolean","title":"Connected","default":false}},"type":"object","required":["bot_id","name"],"title":"KbConnectionOut"},"KbCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"KbCreate"},"KbHit":{"properties":{"chunk_id":{"type":"string","title":"Chunk Id"},"source_id":{"type":"string","title":"Source Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"text":{"type":"string","title":"Text"},"distance":{"type":"number","title":"Distance"}},"type":"object","required":["chunk_id","source_id","text","distance"],"title":"KbHit"},"KbOut":{"properties":{"kb_id":{"type":"string","title":"Kb Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"chunks":{"type":"integer","title":"Chunks","default":0},"sources":{"type":"integer","title":"Sources","default":0},"dynamic":{"type":"boolean","title":"Dynamic","default":false},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["kb_id","tenant_id","name"],"title":"KbOut"},"KbQuery":{"properties":{"q":{"type":"string","maxLength":1000,"minLength":1,"title":"Q"},"k":{"type":"integer","maximum":20,"minimum":1,"title":"K","default":6}},"type":"object","required":["q"],"title":"KbQuery"},"KbUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","title":"KbUpdate"},"LeadCapture":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"timing":{"type":"string","enum":["before_chat","after_first_reply"],"title":"Timing","default":"before_chat"},"headline":{"type":"string","maxLength":80,"title":"Headline","default":"Before we start"},"description":{"type":"string","maxLength":240,"title":"Description","default":"Tell us how to reach you and we'll pick up right where you left off."},"consent_text":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Consent Text"},"name":{"$ref":"#/components/schemas/LeadField"},"email":{"$ref":"#/components/schemas/LeadField"},"phone":{"$ref":"#/components/schemas/LeadField"}},"type":"object","title":"LeadCapture","description":"Ask a web visitor who they are, in the widget rather than the transcript.\n\nUntil now the only way a web conversation acquired a name, email, or phone\nwas the model asking mid-chat on the way to a ticket â€” so a visitor who\nnever needed support stayed anonymous, and the WhatsApp tool had no number\nto send to. This is the deliberate, consented alternative.\n\n`timing` is the whole UX decision. `before_chat` qualifies every visitor and\ncosts some of them; `after_first_reply` lets the assistant prove itself\nfirst and asks once the visitor is engaged, which converts better on a\nmarketing site. Both are legitimate, so both ship."},"LeadField":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"required":{"type":"boolean","title":"Required","default":false}},"type":"object","title":"LeadField"},"McpOut":{"properties":{"server_url":{"type":"string","title":"Server Url"},"header_names":{"items":{"type":"string"},"type":"array","title":"Header Names"},"capability":{"type":"string","enum":["read","action"],"title":"Capability","default":"read"},"allowed_tools":{"items":{"type":"string"},"type":"array","title":"Allowed Tools"},"tools":{"items":{"$ref":"#/components/schemas/McpToolOut"},"type":"array","title":"Tools"},"credentials_vaulted":{"type":"boolean","title":"Credentials Vaulted","default":false}},"type":"object","required":["server_url"],"title":"McpOut"},"McpSpec":{"properties":{"server_url":{"type":"string","maxLength":500,"title":"Server Url"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"capability":{"type":"string","enum":["read","action"],"title":"Capability","default":"read"},"allowed_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Allowed Tools"}},"type":"object","required":["server_url"],"title":"McpSpec","description":"An MCP server source â€” its tools become answer-time tools.\n\n`capability` is per server, not per tool: MCP doesn't tell us which of its\ntools mutate, so the admin classifies the server once and every tool it\nexposes inherits that. Keeps the console to one control and never guesses a\nmutating tool is safe."},"McpToolOut":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"McpToolOut"},"Media":{"properties":{"gcs_uri":{"type":"string","title":"Gcs Uri"},"mime":{"type":"string","title":"Mime"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["gcs_uri","mime"],"title":"Media"},"MessageCreate":{"properties":{"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":240,"minLength":8},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["content"],"title":"MessageCreate"},"MessageOptions":{"properties":{"stream":{"type":"boolean","title":"Stream","default":false},"locale":{"type":"string","title":"Locale","default":"en"},"hints":{"additionalProperties":true,"type":"object","title":"Hints"}},"type":"object","title":"MessageOptions"},"MessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatMessageOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"MessagePage"},"MessagePayload":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["text","audio","image","document","location","interactive_reply"],"title":"Type","default":"text"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"media":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id"],"title":"MessagePayload"},"NormalizedMessage":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"conversation_ref":{"$ref":"#/components/schemas/ConversationRef"},"customer":{"$ref":"#/components/schemas/Customer"},"message":{"$ref":"#/components/schemas/MessagePayload"},"options":{"$ref":"#/components/schemas/MessageOptions"}},"type":"object","required":["tenant_id","conversation_ref","customer","message"],"title":"NormalizedMessage"},"NumberAttachRequest":{"properties":{"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"}},"type":"object","title":"NumberAttachRequest"},"NumberBuyRequest":{"properties":{"number":{"type":"string","maxLength":20,"minLength":6,"pattern":"^\\d+$","title":"Number"}},"type":"object","required":["number"],"title":"NumberBuyRequest"},"NumberPurchaseRequest":{"properties":{"number":{"type":"string","maxLength":20,"minLength":6,"pattern":"^\\d+$","title":"Number"},"country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Iso"},"city":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Region"}},"type":"object","required":["number"],"title":"NumberPurchaseRequest","description":"Select an available number and submit it for operator review."},"NumberRequestReviewRequest":{"properties":{"action":{"type":"string","enum":["approve","reject"],"title":"Action"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["action"],"title":"NumberRequestReviewRequest","description":"Operator verdict on a pending purchase or release request."},"NumberSearchRequest":{"properties":{"country_iso":{"type":"string","maxLength":2,"minLength":2,"title":"Country Iso","default":"IN"},"pattern":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Pattern"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"NumberSearchRequest"},"OutboundMessage":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"to":{"type":"string","maxLength":20,"minLength":6,"pattern":"^\\+?\\d+$","title":"To"},"text":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Text"},"template":{"anyOf":[{"$ref":"#/components/schemas/TemplateMessage"},{"type":"null"}]}},"type":"object","required":["tenant_id","to"],"title":"OutboundMessage","description":"Transactional/notification send (spec F11) â€” service-to-service."},"Page":{"properties":{"items":{"items":{},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"Page"},"PauseIn":{"properties":{"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"PauseIn"},"PlaceCallIn":{"properties":{"to":{"type":"string","maxLength":20,"minLength":6,"pattern":"^\\+?\\d+$","title":"To"},"agent_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Agent Id"},"from_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"From Number"},"purpose":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Purpose"},"ring_seconds":{"type":"integer","maximum":90,"minimum":10,"title":"Ring Seconds","default":30},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["to"],"title":"PlaceCallIn"},"PreviewTTSRequest":{"properties":{"text":{"type":"string","maxLength":300,"minLength":1,"title":"Text"},"voice_id":{"type":"string","maxLength":64,"minLength":1,"title":"Voice Id"}},"type":"object","required":["text","voice_id"],"title":"PreviewTTSRequest"},"ProfileUpdate":{"properties":{"about":{"anyOf":[{"type":"string","maxLength":139},{"type":"null"}],"title":"About"},"address":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"},"email":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Email"},"vertical":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Vertical"},"websites":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":2},{"type":"null"}],"title":"Websites"}},"type":"object","title":"ProfileUpdate","description":"The writable half of a sender's WhatsApp Business profile (program 30).\n\nMeta's own limits; `verified_name` is deliberately absent â€” a display-name\nchange only happens through a review in WhatsApp Manager, so the console shows\nit read-only rather than offering an edit that would silently do nothing."},"ProviderAccountCreate":{"properties":{"provider":{"type":"string","maxLength":50,"minLength":1,"title":"Provider"},"label":{"type":"string","maxLength":100,"minLength":1,"title":"Label"},"credential_ref":{"type":"string","maxLength":300,"minLength":1,"title":"Credential Ref"},"external_account_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Account Id"},"capabilities":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Capabilities"}},"type":"object","required":["provider","label","credential_ref"],"title":"ProviderAccountCreate"},"ProviderAccountOut":{"properties":{"provider_account_id":{"type":"string","title":"Provider Account Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"external_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Account Id"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"admin_state":{"type":"string","enum":["enabled","disabled"],"title":"Admin State","default":"enabled"},"authorization_health":{"type":"string","enum":["healthy","reauthorization_required","error","unknown"],"title":"Authorization Health","default":"unknown"},"version":{"type":"integer","title":"Version","default":1},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["provider_account_id","tenant_id","provider","label"],"title":"ProviderAccountOut"},"ProviderAccountUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Label"},"admin_state":{"anyOf":[{"type":"string","enum":["enabled","disabled"]},{"type":"null"}],"title":"Admin State"},"authorization_health":{"anyOf":[{"type":"string","enum":["healthy","reauthorization_required","error","unknown"]},{"type":"null"}],"title":"Authorization Health"},"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"ProviderAccountUpdate"},"PublicConversationOut":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"channel":{"type":"string","title":"Channel"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"status":{"type":"string","title":"Status","default":"open"},"customer":{"additionalProperties":true,"type":"object","title":"Customer"},"message_count":{"type":"integer","title":"Message Count","default":0},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["conversation_id","channel"],"title":"PublicConversationOut"},"PublicTemplate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Language"},"variables":{"title":"Variables"},"header_variables":{"title":"Header Variables"},"button_variables":{"title":"Button Variables"}},"type":"object","required":["name"],"title":"PublicTemplate"},"PublishIn":{"properties":{"change_summary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Change Summary"},"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"PublishIn"},"ReadinessIssue":{"properties":{"code":{"type":"string","title":"Code"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"type":"string","title":"Resource Id"},"message":{"type":"string","title":"Message"},"recommended_action":{"type":"string","title":"Recommended Action"}},"type":"object","required":["code","resource_type","resource_id","message","recommended_action"],"title":"ReadinessIssue"},"ReadinessOut":{"properties":{"ready":{"type":"boolean","title":"Ready"},"fingerprint":{"type":"string","title":"Fingerprint"},"blockers":{"items":{"$ref":"#/components/schemas/ReadinessIssue"},"type":"array","title":"Blockers"},"warnings":{"items":{"$ref":"#/components/schemas/ReadinessIssue"},"type":"array","title":"Warnings"},"checks":{"additionalProperties":{"type":"string","enum":["pass","fail","warning"]},"type":"object","title":"Checks"}},"type":"object","required":["ready","fingerprint","checks"],"title":"ReadinessOut"},"RequestLogOut":{"properties":{"request_id":{"type":"string","title":"Request Id"},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"},"key_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Name"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"status":{"type":"integer","title":"Status"},"duration_ms":{"type":"integer","title":"Duration Ms"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["request_id","method","path","status","duration_ms"],"title":"RequestLogOut"},"RollbackIn":{"properties":{"expected_connection_version":{"type":"integer","minimum":1,"title":"Expected Connection Version"}},"type":"object","required":["expected_connection_version"],"title":"RollbackIn"},"SendMessageIn":{"properties":{"channel":{"type":"string","const":"whatsapp","title":"Channel","default":"whatsapp"},"to":{"type":"string","maxLength":20,"minLength":6,"pattern":"^\\+?\\d+$","title":"To"},"text":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Text"},"template":{"anyOf":[{"$ref":"#/components/schemas/PublicTemplate"},{"type":"null"}]},"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["to"],"title":"SendMessageIn"},"SendMessageOut":{"properties":{"message_id":{"type":"string","title":"Message Id"},"channel":{"type":"string","title":"Channel"},"to":{"type":"string","title":"To"},"status":{"type":"string","title":"Status","default":"sent"}},"type":"object","required":["message_id","channel","to"],"title":"SendMessageOut"},"SourceCreate":{"properties":{"type":{"type":"string","enum":["website","file","text","endpoint","mcp"],"title":"Type"},"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Url"},"max_pages":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Max Pages"},"auto_setup":{"type":"boolean","title":"Auto Setup","default":false},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"text":{"anyOf":[{"type":"string","maxLength":200000},{"type":"null"}],"title":"Text"},"refresh":{"type":"string","enum":["manual","daily","weekly","monthly"],"title":"Refresh","default":"manual"},"endpoint":{"anyOf":[{"$ref":"#/components/schemas/EndpointSpec"},{"type":"null"}]},"mcp":{"anyOf":[{"$ref":"#/components/schemas/McpSpec"},{"type":"null"}]}},"type":"object","required":["type"],"title":"SourceCreate"},"SourceOut":{"properties":{"source_id":{"type":"string","title":"Source Id"},"kb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kb Id"},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"},"type":{"type":"string","enum":["website","file","text","endpoint","mcp"],"title":"Type"},"status":{"type":"string","enum":["pending","crawling","processing","ready","error"],"title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"refresh":{"type":"string","enum":["manual","daily","weekly","monthly"],"title":"Refresh","default":"manual"},"next_refresh_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Refresh At"},"endpoint":{"anyOf":[{"$ref":"#/components/schemas/EndpointOut"},{"type":"null"}]},"mcp":{"anyOf":[{"$ref":"#/components/schemas/McpOut"},{"type":"null"}]},"pages_found":{"type":"integer","title":"Pages Found","default":0},"pages_done":{"type":"integer","title":"Pages Done","default":0},"chunks":{"type":"integer","title":"Chunks","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["source_id","type","status"],"title":"SourceOut"},"SourceResolve":{"properties":{"tenant_id":{"type":"string","maxLength":120,"minLength":3,"pattern":"^[A-Za-z0-9_-]+$","title":"Tenant Id"},"channel":{"type":"string","enum":["web","whatsapp","voice","email","api"],"title":"Channel"},"thread_id":{"type":"string","maxLength":240,"minLength":1,"title":"Thread Id"}},"type":"object","required":["tenant_id","channel","thread_id"],"title":"SourceResolve"},"TemplateGenerate":{"properties":{"prompt":{"type":"string","maxLength":1000,"minLength":3,"title":"Prompt"},"language":{"type":"string","maxLength":16,"title":"Language","default":"en"},"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"category_hint":{"anyOf":[{"type":"string","enum":["MARKETING","UTILITY","AUTHENTICATION"]},{"type":"null"}],"title":"Category Hint"}},"type":"object","required":["prompt"],"title":"TemplateGenerate","description":"Describe a message in plain words and have the model write the template.\n\n`prompt` is user input that reaches an LLM, so it is bounded here rather\nthan trusted â€” and whatever comes back still passes the console's own\nvalidation before it can be submitted to Meta."},"TemplateMessage":{"properties":{"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language","default":"en"},"components":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Components"}},"type":"object","required":["name"],"title":"TemplateMessage"},"TemplateSubmit":{"properties":{"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"name":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[a-z0-9_]+$","title":"Name"},"language":{"type":"string","maxLength":16,"title":"Language","default":"en"},"category":{"type":"string","enum":["MARKETING","UTILITY","AUTHENTICATION"],"title":"Category","default":"UTILITY"},"components":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Components"}},"type":"object","required":["name"],"title":"TemplateSubmit"},"TestRunCreate":{"properties":{"passed":{"type":"boolean","title":"Passed"},"summary":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Summary"},"deployment_config":{"additionalProperties":true,"type":"object","title":"Deployment Config"}},"type":"object","required":["passed"],"title":"TestRunCreate"},"TestRunOut":{"properties":{"test_run_id":{"type":"string","title":"Test Run Id"},"agent_id":{"type":"string","title":"Agent Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"fingerprint":{"type":"string","title":"Fingerprint"},"passed":{"type":"boolean","title":"Passed"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["test_run_id","agent_id","tenant_id","fingerprint","passed"],"title":"TestRunOut"},"TestSend":{"properties":{"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"to":{"type":"string","maxLength":20,"minLength":6,"pattern":"^\\+?\\d+$","title":"To"},"text":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Text"},"template_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Template Name"},"template_language":{"type":"string","title":"Template Language","default":"en_US"}},"type":"object","required":["to"],"title":"TestSend"},"Ticket":{"properties":{"ticket_id":{"type":"string","title":"Ticket Id"},"public_ref":{"type":"string","title":"Public Ref"},"tenant_id":{"type":"string","title":"Tenant Id"},"subject":{"type":"string","title":"Subject"},"status":{"type":"string","enum":["new","open","pending","waiting_customer","resolved","closed"],"title":"Status"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"title":"Priority"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"source":{"$ref":"#/components/schemas/TicketSource"},"requester":{"$ref":"#/components/schemas/TicketRequester"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id"},"assignee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Name"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"version":{"type":"integer","title":"Version"},"message_count":{"type":"integer","title":"Message Count"},"last_message_preview":{"type":"string","title":"Last Message Preview"},"ai":{"anyOf":[{"$ref":"#/components/schemas/TicketAIInsight"},{"type":"null"}]},"sla_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sla Due At"},"first_response_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Response At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"pending_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pending At"},"waiting_customer_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Waiting Customer At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"status_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Status Changed At"},"status_changed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Changed By"},"escalation_state":{"anyOf":[{"type":"string","enum":["due","acknowledged","resolved"]},{"type":"null"}],"title":"Escalation State"},"escalation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Reason"},"escalated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Escalated At"},"escalated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalated By Id"},"escalated_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalated By Name"},"escalation_acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Escalation Acknowledged At"},"escalation_acknowledged_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Acknowledged By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["ticket_id","public_ref","tenant_id","subject","status","priority","source","requester","version","message_count","last_message_preview"],"title":"Ticket"},"TicketAIInsight":{"properties":{"summary":{"type":"string","title":"Summary"},"intent":{"type":"string","title":"Intent"},"sentiment":{"type":"string","enum":["positive","neutral","negative","frustrated"],"title":"Sentiment","default":"neutral"},"risk":{"type":"string","enum":["low","medium","high"],"title":"Risk","default":"low"},"confidence":{"type":"number","maximum":1,"minimum":0,"title":"Confidence"},"missing_information":{"items":{"type":"string"},"type":"array","title":"Missing Information"},"suggested_reply":{"type":"string","title":"Suggested Reply"},"recommended_tags":{"items":{"type":"string"},"type":"array","maxItems":8,"title":"Recommended Tags"},"model":{"type":"string","title":"Model"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["summary","intent","confidence","suggested_reply","model","generated_at"],"title":"TicketAIInsight"},"TicketAnalytics":{"properties":{"total":{"type":"integer","title":"Total"},"open":{"type":"integer","title":"Open"},"unassigned":{"type":"integer","title":"Unassigned"},"sla_risk":{"type":"integer","title":"Sla Risk"},"resolved":{"type":"integer","title":"Resolved"},"by_channel":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Channel"},"by_priority":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Priority"},"ai_coverage":{"type":"number","title":"Ai Coverage"}},"type":"object","required":["total","open","unassigned","sla_risk","resolved","by_channel","by_priority","ai_coverage"],"title":"TicketAnalytics"},"TicketAssignmentConfig":{"properties":{"mode":{"type":"string","enum":["manual","auto"],"title":"Mode","default":"manual"},"audience":{"type":"string","enum":["all_team","admins","selected"],"title":"Audience","default":"all_team"},"strategy":{"type":"string","enum":["round_robin","least_open"],"title":"Strategy","default":"least_open"},"selected_member_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Selected Member Ids"}},"type":"object","title":"TicketAssignmentConfig"},"TicketConfig":{"properties":{"assignment":{"$ref":"#/components/schemas/TicketAssignmentConfig"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"TicketConfig"},"TicketCreate":{"properties":{"subject":{"type":"string","maxLength":240,"minLength":1,"title":"Subject"},"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"},"source":{"$ref":"#/components/schemas/TicketSource"},"requester":{"$ref":"#/components/schemas/TicketRequester"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":240,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"title":"Priority","default":"normal"},"category":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"}},"type":"object","required":["subject","content","source","requester"],"title":"TicketCreate"},"TicketDetail":{"properties":{"ticket_id":{"type":"string","title":"Ticket Id"},"public_ref":{"type":"string","title":"Public Ref"},"tenant_id":{"type":"string","title":"Tenant Id"},"subject":{"type":"string","title":"Subject"},"status":{"type":"string","enum":["new","open","pending","waiting_customer","resolved","closed"],"title":"Status"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"title":"Priority"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"source":{"$ref":"#/components/schemas/TicketSource"},"requester":{"$ref":"#/components/schemas/TicketRequester"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id"},"assignee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Name"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"version":{"type":"integer","title":"Version"},"message_count":{"type":"integer","title":"Message Count"},"last_message_preview":{"type":"string","title":"Last Message Preview"},"ai":{"anyOf":[{"$ref":"#/components/schemas/TicketAIInsight"},{"type":"null"}]},"sla_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sla Due At"},"first_response_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Response At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"pending_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pending At"},"waiting_customer_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Waiting Customer At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"status_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Status Changed At"},"status_changed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Changed By"},"escalation_state":{"anyOf":[{"type":"string","enum":["due","acknowledged","resolved"]},{"type":"null"}],"title":"Escalation State"},"escalation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Reason"},"escalated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Escalated At"},"escalated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalated By Id"},"escalated_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalated By Name"},"escalation_acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Escalation Acknowledged At"},"escalation_acknowledged_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Acknowledged By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"messages":{"items":{"$ref":"#/components/schemas/TicketMessage"},"type":"array","title":"Messages"}},"type":"object","required":["ticket_id","public_ref","tenant_id","subject","status","priority","source","requester","version","message_count","last_message_preview"],"title":"TicketDetail"},"TicketEscalate":{"properties":{"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"},"reason":{"type":"string","maxLength":1000,"minLength":3,"title":"Reason"}},"type":"object","required":["expected_version","reason"],"title":"TicketEscalate"},"TicketEscalationAck":{"properties":{"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"TicketEscalationAck"},"TicketList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Ticket"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"reconciled_at":{"type":"string","format":"date-time","title":"Reconciled At"}},"type":"object","required":["items","total","counts","reconciled_at"],"title":"TicketList"},"TicketMember":{"properties":{"uid":{"type":"string","title":"Uid"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["uid","role"],"title":"TicketMember"},"TicketMemberList":{"properties":{"members":{"items":{"$ref":"#/components/schemas/TicketMember"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"TicketMemberList"},"TicketMessage":{"properties":{"message_id":{"type":"string","title":"Message Id"},"ticket_id":{"type":"string","title":"Ticket Id"},"kind":{"type":"string","enum":["customer","staff","internal_note","ai","system"],"title":"Kind"},"content":{"type":"string","title":"Content"},"channel":{"type":"string","title":"Channel"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"delivery_state":{"type":"string","enum":["received","queued","sent","failed","not_applicable"],"title":"Delivery State"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["message_id","ticket_id","kind","content","channel","delivery_state"],"title":"TicketMessage"},"TicketOpsAI":{"properties":{"summary":{"type":"string","title":"Summary"},"model":{"type":"string","title":"Model"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["summary","model","generated_at"],"title":"TicketOpsAI"},"TicketRequester":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"external_id":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"External Id"}},"type":"object","title":"TicketRequester"},"TicketSource":{"properties":{"channel":{"type":"string","enum":["web","whatsapp","voice","email","api"],"title":"Channel"},"thread_id":{"type":"string","maxLength":240,"minLength":1,"title":"Thread Id"},"message_id":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Message Id"},"connection_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Connection Id"},"external_ref":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"External Ref"}},"type":"object","required":["channel","thread_id"],"title":"TicketSource"},"TicketTracker":{"properties":{"total_created":{"type":"integer","title":"Total Created"},"open":{"type":"integer","title":"Open"},"pending":{"type":"integer","title":"Pending"},"waiting_customer":{"type":"integer","title":"Waiting Customer"},"resolved":{"type":"integer","title":"Resolved"},"closed":{"type":"integer","title":"Closed"},"unassigned":{"type":"integer","title":"Unassigned"},"escalated_due":{"type":"integer","title":"Escalated Due"},"sla_risk":{"type":"integer","title":"Sla Risk"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"by_channel":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Channel"},"by_assignee":{"items":{"$ref":"#/components/schemas/AssigneeStats"},"type":"array","title":"By Assignee"},"reconciled_at":{"type":"string","format":"date-time","title":"Reconciled At"}},"type":"object","required":["total_created","open","pending","waiting_customer","resolved","closed","unassigned","escalated_due","sla_risk","by_status","by_channel","by_assignee","reconciled_at"],"title":"TicketTracker"},"TicketUpdate":{"properties":{"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"},"status":{"anyOf":[{"type":"string","enum":["new","open","pending","waiting_customer","resolved","closed"]},{"type":"null"}],"title":"Status"},"priority":{"anyOf":[{"type":"string","enum":["low","normal","high","urgent"]},{"type":"null"}],"title":"Priority"},"category":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Category"},"assignee_id":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Assignee Id"},"assignee_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Assignee Name"},"team_id":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Team Id"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Tags"}},"type":"object","required":["expected_version"],"title":"TicketUpdate"},"TicketingToolPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","title":"TicketingToolPolicy"},"UpsertContactIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},"type":"object","title":"UpsertContactIn"},"UsageUnits":{"properties":{"conversations":{"type":"integer","title":"Conversations","default":0},"messages":{"type":"integer","title":"Messages","default":0},"unique_visitors":{"type":"integer","title":"Unique Visitors","default":0},"calls":{"type":"integer","title":"Calls","default":0},"minutes":{"type":"number","title":"Minutes","default":0}},"type":"object","title":"UsageUnits","description":"The units a touchpoint reports (program 27). Chat channels populate\nconversations/messages/unique_visitors; voice adds calls/minutes."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyConnectionIn":{"properties":{"verified":{"type":"boolean","title":"Verified","default":true},"expected_version":{"type":"integer","minimum":1,"title":"Expected Version"}},"type":"object","required":["expected_version"],"title":"VerifyConnectionIn"},"VoiceConfigUpdate":{"properties":{"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"},"greeting_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Greeting Text"},"greeting_language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Greeting Language"},"voice_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Voice Id"},"language":{"anyOf":[{"type":"string","enum":["en","multi","indic"]},{"type":"null"}],"title":"Language"},"recording_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recording Enabled"},"max_call_seconds":{"anyOf":[{"type":"integer","maximum":3600,"minimum":60},{"type":"null"}],"title":"Max Call Seconds"}},"type":"object","title":"VoiceConfigUpdate"},"VolumePoint":{"properties":{"date":{"type":"string","title":"Date"},"web":{"type":"integer","title":"Web","default":0},"voice":{"type":"integer","title":"Voice","default":0},"whatsapp":{"type":"integer","title":"Whatsapp","default":0},"email":{"type":"integer","title":"Email","default":0}},"type":"object","required":["date"],"title":"VolumePoint","description":"One time bucket; every channel key present so voice/whatsapp/email\nmerge in later without a client change."},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":500,"minLength":8,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","maxItems":9,"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"}},"type":"object","required":["url"],"title":"WebhookCreate"},"WebhookCreated":{"properties":{"endpoint_id":{"type":"string","title":"Endpoint Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled","default":true},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery At"},"last_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"signing_secret":{"type":"string","title":"Signing Secret"},"warning":{"type":"string","title":"Warning","default":"Copy this signing secret now. It cannot be shown again."}},"type":"object","required":["endpoint_id","tenant_id","url","signing_secret"],"title":"WebhookCreated"},"WebhookOut":{"properties":{"endpoint_id":{"type":"string","title":"Endpoint Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled","default":true},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery At"},"last_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["endpoint_id","tenant_id","url"],"title":"WebhookOut"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":500,"minLength":8},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookUpdate"},"WhatsAppToolPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"sender_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sender Id"},"allowed_templates":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Allowed Templates"},"allow_any_recipient":{"type":"boolean","title":"Allow Any Recipient","default":false}},"type":"object","title":"WhatsAppToolPolicy","description":"Lets the agent send a WhatsApp message during any conversation.\n\nOff by default, unlike ticketing: a send reaches a real person's phone and\nis billed, so it must be a deliberate choice rather than something a legacy\nagent inherits on upgrade.\n\n`allowed_templates` is the whole safety story outside Meta's 24-hour session\nwindow. The tool declaration is built from this list, so the model is only\never shown template names the workspace approved â€” it cannot name another\none. Empty means the tool can only reply inside an open window.\n\n`allow_any_recipient` opts out of the \"message the person you are talking\nto\" default. It exists for order-desk agents that legitimately notify a\nthird party, and it is the one setting that makes prompt injection able to\npick the destination â€” hence off, and surfaced with a warning in the console."},"WidgetConfigOut":{"properties":{"public_id":{"type":"string","title":"Public Id"},"name":{"type":"string","title":"Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"welcome_message":{"type":"string","title":"Welcome Message"},"suggested_questions":{"items":{"type":"string"},"type":"array","title":"Suggested Questions"},"theme":{"$ref":"#/components/schemas/BotTheme"},"launcher":{"$ref":"#/components/schemas/BotLauncher"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"image_upload":{"type":"boolean","title":"Image Upload","default":false},"lead_capture":{"$ref":"#/components/schemas/LeadCapture"}},"type":"object","required":["public_id","name","welcome_message","theme","launcher"],"title":"WidgetConfigOut","description":"Everything widget.js needs to render â€” public, no tenant internals."},"WidgetLeadIn":{"properties":{"visitor_id":{"type":"string","maxLength":64,"minLength":8,"title":"Visitor Id"},"conversation_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Conversation Id"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"consent":{"type":"boolean","title":"Consent","default":false}},"type":"object","required":["visitor_id"],"title":"WidgetLeadIn","description":"What the visitor typed into the lead form.\n\nEverything is optional here and validated against the bot's own configured\nrequirements in the route: which fields exist is the workspace's decision,\nand a schema that hard-codes them would disagree with the form the visitor\nactually saw."},"WidgetLeadOut":{"properties":{"accepted":{"type":"boolean","title":"Accepted","default":true},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","title":"WidgetLeadOut"},"WidgetMessageIn":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"visitor_id":{"type":"string","maxLength":64,"minLength":8,"title":"Visitor Id"},"conversation_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["text","visitor_id"],"title":"WidgetMessageIn"}},"securitySchemes":{"ApiKeyBearer":{"type":"http","scheme":"bearer"},"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key"}}},"security":[{"ApiKeyBearer":[]},{"ApiKeyHeader":[]}]}