{"openapi":"3.1.0","info":{"title":"DISKA API","version":"1.4.0","description":"API REST pública da DISKA, autenticada com chaves API da organização ou com tokens OAuth de aplicações parceiras (Authorization: Bearer …). Documentação: https://docs.diska.ai/pt/api/getting-started. Referência por endpoint: https://docs.diska.ai/pt/api/reference"},"servers":[{"url":"https://api.diska.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"paths":{"/v1/me":{"get":{"tags":["public-api"],"summary":"Whoami","description":"Identify the organization and key (or OAuth app) behind a credential.","operationId":"whoami_v1_me_get","security":[{"HTTPBearer":[]}],"parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiIdentity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents":{"get":{"tags":["public-api"],"summary":"List Agents","operationId":"list_agents_v1_agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(inbound|outbound|voice_widget|chat)$"},{"type":"null"}],"title":"Agent Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(draft|active|inactive|archived)$"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgentList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public-api"],"summary":"Create Agent","description":"Create an agent — from a template when template_id is given, blank\notherwise. The agent starts as a draft; publish it to make it callable.","operationId":"create_agent_v1_agents_post","security":[{"HTTPBearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"tags":["public-api"],"summary":"Get Agent","operationId":"get_agent_v1_agents__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["public-api"],"summary":"Update Agent","description":"Edit the agent's draft. Only the fields sent change; publish to put them live.","operationId":"update_agent_v1_agents__agent_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls":{"get":{"tags":["public-api"],"summary":"List Calls","operationId":"list_calls_v1_calls_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiCallList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}":{"get":{"tags":["public-api"],"summary":"Get Call","operationId":"get_call_v1_calls__call_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSessionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}/recording":{"get":{"tags":["public-api"],"summary":"Get Call Recording","description":"The call's recording: a 302 to a signed link valid for 5 minutes, or\nthe link as JSON with ?format=json. Ask again whenever you need the audio.","operationId":"get_call_recording_v1_calls__call_id__recording_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["redirect","json"],"type":"string","default":"redirect","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiRecording"}}}},"302":{"description":"Redirect to a signed download link (5 minutes)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/overview":{"get":{"tags":["public-api"],"summary":"Analytics Overview","operationId":"analytics_overview_v1_analytics_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["daily","weekly","monthly"],"type":"string","default":"weekly","title":"Period"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"agent_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(all|inbound|outbound)$","default":"all","title":"Agent Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone-numbers":{"get":{"tags":["public-api"],"summary":"List Phone Numbers","operationId":"list_phone_numbers_v1_phone_numbers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"number_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-bases":{"get":{"tags":["public-api"],"summary":"List Knowledge Bases","operationId":"list_knowledge_bases_v1_knowledge_bases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiKnowledgeBaseList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public-api"],"summary":"Create Knowledge Base","operationId":"create_knowledge_base_v1_knowledge_bases_post","security":[{"HTTPBearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/publish":{"post":{"tags":["public-api"],"summary":"Publish Agent","description":"Publish the agent's draft as the live version.","operationId":"publish_agent_v1_agents__agent_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicApiPublishRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiAgent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-bases/{knowledge_base_id}/documents":{"post":{"tags":["public-api"],"summary":"Create Knowledge Document","description":"Add a manual text document; indexing starts automatically.","operationId":"create_knowledge_document_v1_knowledge_bases__knowledge_base_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Base Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualDocumentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeDocument"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-bases/{knowledge_base_id}/documents/url":{"post":{"tags":["public-api"],"summary":"Import Knowledge Url","description":"Import a public web page (SSRF-guarded) as a document.","operationId":"import_knowledge_url_v1_knowledge_bases__knowledge_base_id__documents_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Base Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlDocumentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeDocument"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-bases/{knowledge_base_id}/documents/pdf":{"post":{"tags":["public-api"],"summary":"Upload Knowledge Pdf","operationId":"upload_knowledge_pdf_v1_knowledge_bases__knowledge_base_id__documents_pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Base Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_knowledge_pdf_v1_knowledge_bases__knowledge_base_id__documents_pdf_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeDocument"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints":{"get":{"tags":["public-api"],"summary":"List Webhook Endpoints","operationId":"list_webhook_endpoints_v1_webhook_endpoints_get","security":[{"HTTPBearer":[]}],"parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointView"},"title":"Response List Webhook Endpoints V1 Webhook Endpoints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public-api"],"summary":"Create Webhook Endpoint","description":"Register an https endpoint; the signing secret is returned once.","operationId":"create_webhook_endpoint_v1_webhook_endpoints_post","security":[{"HTTPBearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints/{endpoint_id}":{"patch":{"tags":["public-api"],"summary":"Update Webhook Endpoint","operationId":"update_webhook_endpoint_v1_webhook_endpoints__endpoint_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["public-api"],"summary":"Delete Webhook Endpoint","operationId":"delete_webhook_endpoint_v1_webhook_endpoints__endpoint_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-endpoints/{endpoint_id}/test":{"post":{"tags":["public-api"],"summary":"Test Webhook Endpoint","description":"Send a signed ping so the integrator can verify their receiver.\n\nWorks on inactive endpoints (that is when you need it) and never advances\nthe auto-disable counter.","operationId":"test_webhook_endpoint_v1_webhook_endpoints__endpoint_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Webhook Endpoint V1 Webhook Endpoints  Endpoint Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/outbound-calls":{"post":{"tags":["public-api"],"summary":"Create Outbound Call","description":"The agent calls one person now, from its DISKA number.","operationId":"create_outbound_call_v1_outbound_calls_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":8,"maxLength":120},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiOutboundCallCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiOutboundCall"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/outbound-calls/{outbound_call_id}":{"get":{"tags":["public-api"],"summary":"Get Outbound Call","description":"How the call is going. Kept for 24 hours; after that, use call_id.","operationId":"get_outbound_call_v1_outbound_calls__outbound_call_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"outbound_call_id","in":"path","required":true,"schema":{"type":"string","title":"Outbound Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiOutboundCall"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/outbound-calls/{outbound_call_id}/hangup":{"post":{"tags":["public-api"],"summary":"Hang Up Outbound Call","description":"Cancel a call that is still ringing, or end one in progress.","operationId":"hang_up_outbound_call_v1_outbound_calls__outbound_call_id__hangup_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"outbound_call_id","in":"path","required":true,"schema":{"type":"string","title":"Outbound Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiOutboundCall"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns":{"get":{"tags":["public-api"],"summary":"List Campaigns","operationId":"list_campaigns_v1_campaigns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public-api"],"summary":"Create Campaign","description":"A draft campaign. Add recipients, then start it.","operationId":"create_campaign_v1_campaigns_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":8,"maxLength":120},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}":{"get":{"tags":["public-api"],"summary":"Get Campaign","operationId":"get_campaign_v1_campaigns__campaign_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}/recipients":{"post":{"tags":["public-api"],"summary":"Add Campaign Recipients","description":"Up to 1000 per request. Repeated numbers and external_id values are skipped.","operationId":"add_campaign_recipients_v1_campaigns__campaign_id__recipients_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientsAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientsAddResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["public-api"],"summary":"List Campaign Recipients","operationId":"list_campaign_recipients_v1_campaigns__campaign_id__recipients_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}/start":{"post":{"tags":["public-api"],"summary":"Start Campaign","operationId":"start_campaign_v1_campaigns__campaign_id__start_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}/pause":{"post":{"tags":["public-api"],"summary":"Pause Campaign","operationId":"pause_campaign_v1_campaigns__campaign_id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}/resume":{"post":{"tags":["public-api"],"summary":"Resume Campaign","operationId":"resume_campaign_v1_campaigns__campaign_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}/cancel":{"post":{"tags":["public-api"],"summary":"Cancel Campaign","operationId":"cancel_campaign_v1_campaigns__campaign_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats":{"post":{"tags":["public-api"],"summary":"Create Chat","description":"Open a text chat with a published prompt agent. With an opening line\n(and the agent speaking first), the chat starts with it.","operationId":"create_chat_v1_chats_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":8,"maxLength":120},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["public-api"],"summary":"List Chats","description":"Newest first, without messages.","operationId":"list_chats_v1_chats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Agent Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","ended"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}":{"get":{"tags":["public-api"],"summary":"Get Chat","description":"The chat with all its messages, in order.","operationId":"get_chat_v1_chats__chat_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}/messages":{"post":{"tags":["public-api"],"summary":"Send Chat Message","description":"Send the person's message; the agent's reply comes in the response.\nOne message at a time per chat.","operationId":"send_chat_message_v1_chats__chat_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatMessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatReply"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}/end":{"post":{"tags":["public-api"],"summary":"End Chat","description":"End the chat (repeating it is harmless). Its result arrives like a\ncall's: the call.completed webhook, with the transcript.","operationId":"end_chat_v1_chats__chat_id__end_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiChatDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/token-info":{"get":{"tags":["oauth","public-api"],"summary":"Token Info","description":"The app, organization and scopes behind the access token in use.","operationId":"token_info_v1_oauth_token_info_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"KnowledgeDocument":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"knowledge_base_id":{"type":"string","title":"Knowledge Base Id"},"name":{"type":"string","title":"Name"},"source_type":{"type":"string","enum":["manual","pdf","url"],"title":"Source Type"},"status":{"type":"string","enum":["pending","uploading","processing","ready","failed","indexing_pending"],"title":"Status","default":"pending"},"extraction_status":{"type":"string","enum":["pending","extracted","skipped","failed"],"title":"Extraction Status","default":"pending"},"indexing_status":{"type":"string","enum":["pending","indexing_pending","indexed","skipped","failed"],"title":"Indexing Status","default":"indexing_pending"},"content_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Text"},"original_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Url"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"has_file":{"type":"boolean","title":"Has File","default":false}},"type":"object","required":["id","organization_id","knowledge_base_id","name","source_type"],"title":"KnowledgeDocument"},"CreateWebhookEndpointResult":{"properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpointView"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["endpoint","secret"],"title":"CreateWebhookEndpointResult"},"PublicApiIdentity":{"properties":{"organization":{"$ref":"#/components/schemas/PublicApiOrganization"},"key":{"anyOf":[{"$ref":"#/components/schemas/PublicApiKeyInfo"},{"type":"null"}]},"app":{"anyOf":[{"$ref":"#/components/schemas/PublicApiOAuthAppInfo"},{"type":"null"}]}},"type":"object","required":["organization"],"title":"PublicApiIdentity","description":"Response of GET /v1/me — lets an integrator confirm which org and key\na credential resolves to before wiring anything else. An OAuth token\nanswers with ``app`` instead of ``key``."},"PublicApiAgentCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"agent_type":{"anyOf":[{"type":"string","enum":["inbound","outbound","voice_widget","chat"]},{"type":"null"}],"title":"Agent Type"},"editing_mode":{"anyOf":[{"type":"string","enum":["prompt","flow"]},{"type":"null"}],"title":"Editing Mode"},"template_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Template Id"}},"type":"object","title":"PublicApiAgentCreate","description":"POST /v1/agents. With template_id the agent is installed from that\ntemplate; without it a blank agent is created."},"PublicApiOutboundCallCreate":{"properties":{"agent_id":{"type":"string","maxLength":64,"minLength":1,"title":"Agent Id"},"to":{"type":"string","maxLength":20,"minLength":9,"title":"To"},"contact_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Contact Name"},"purpose":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Purpose"},"variables":{"additionalProperties":true,"type":"object","maxProperties":20,"title":"Variables"}},"additionalProperties":false,"type":"object","required":["agent_id","to"],"title":"PublicApiOutboundCallCreate","description":"POST /v1/outbound-calls: the agent calls one person now."},"PublicApiOutboundCall":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["queued","ringing","in_progress","ended","failed","cancelled"],"title":"Status"},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"failure_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Message"},"agent_id":{"type":"string","title":"Agent Id"},"to":{"type":"string","title":"To"},"from_number":{"type":"string","title":"From Number"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"created_at":{"type":"string","title":"Created At"},"answered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["id","status","agent_id","to","from_number","created_at"],"title":"PublicApiOutboundCall","description":"An outbound call request and how it went. ``call_id`` (the call in\nGET /v1/calls and in webhooks) appears once the agent's session starts."},"CampaignList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CampaignView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"CampaignList"},"CallSessionDetail":{"properties":{"id":{"type":"string","title":"Id"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"channel":{"type":"string","enum":["browser_demo","phone","whatsapp","web_chat"],"title":"Channel","default":"browser_demo"},"direction":{"anyOf":[{"type":"string","enum":["inbound","outbound"]},{"type":"null"}],"title":"Direction"},"status":{"type":"string","enum":["created","active","completed","failed","cancelled","abandoned"],"title":"Status","default":"created"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"caller_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Contact"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"is_simulation":{"type":"boolean","title":"Is Simulation","default":true},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"has_post_call":{"type":"boolean","title":"Has Post Call","default":false},"executed_actions_count":{"type":"integer","title":"Executed Actions Count","default":0},"organization_id":{"type":"string","title":"Organization Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"messages":{"items":{"$ref":"#/components/schemas/CallMessageItem"},"type":"array","title":"Messages"},"tool_calls":{"items":{"$ref":"#/components/schemas/CallToolCallItem"},"type":"array","title":"Tool Calls"},"post_call":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Post Call"},"has_recording":{"type":"boolean","title":"Has Recording","default":false},"recording_state":{"$ref":"#/components/schemas/RecordingState","default":"disabled"}},"type":"object","required":["id","organization_id"],"title":"CallSessionDetail"},"PhoneNumberListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhoneNumber"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"PhoneNumberListResponse"},"PublicApiChatList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicApiChat"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["total","limit","offset"],"title":"PublicApiChatList"},"PublicApiChat":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"status":{"type":"string","enum":["active","ended"],"title":"Status"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"created_at":{"type":"string","title":"Created At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"}},"type":"object","required":["id","agent_id","status","created_at"],"title":"PublicApiChat","description":"A text chat with an agent. Its id is also a call id: the chat appears\nin GET /v1/calls and its end sends the call.completed webhook."},"KnowledgeBase":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"name":{"type":"string","title":"Name"},"instruction":{"type":"string","title":"Instruction","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"document_count":{"type":"integer","title":"Document Count","default":0},"assigned_agent_count":{"type":"integer","title":"Assigned Agent Count","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":["id","organization_id","name"],"title":"KnowledgeBase"},"CreateWebhookEndpointRequest":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":12,"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"events":{"items":{"type":"string"},"type":"array","maxItems":8,"title":"Events"}},"type":"object","required":["url"],"title":"CreateWebhookEndpointRequest"},"CallToolCallItem":{"properties":{"id":{"type":"string","title":"Id"},"tool_name":{"type":"string","title":"Tool Name"},"status":{"type":"string","title":"Status","default":"pending"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Output"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"called_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Called At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","tool_name"],"title":"CallToolCallItem"},"RecipientsAdd":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/RecipientInput"},"type":"array","maxItems":1000,"minItems":1,"title":"Recipients"}},"type":"object","required":["recipients"],"title":"RecipientsAdd"},"PublicApiPublishRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"}},"type":"object","title":"PublicApiPublishRequest"},"RecordingState":{"type":"string","enum":["disabled","recording","uploading","available","failed","expired","deleted"],"title":"RecordingState","description":"Every state a recording can be in, for one caller-visible vocabulary.\n\nHistóricos used to infer everything from ``has_recording``, which collapses\n\"the agent never recorded\", \"the upload died\" and \"we deleted it on\nschedule\" into one indistinguishable empty box. These are the states; which\nof them live in the database is the next constant down."},"PublicApiChatMessageCreate":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"}},"additionalProperties":false,"type":"object","required":["message"],"title":"PublicApiChatMessageCreate","description":"POST /v1/chats/{id}/messages."},"RecipientList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RecipientView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"RecipientList"},"PublicApiAgentUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"prompt":{"anyOf":[{"type":"string","maxLength":60000,"minLength":1},{"type":"null"}],"title":"Prompt"},"greeting":{"anyOf":[{"$ref":"#/components/schemas/PublicApiGreetingUpdate"},{"type":"null"}]},"language":{"anyOf":[{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$"},{"type":"null"}],"title":"Language"},"personality":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Personality"},"objections":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Objections"},"knowledge_notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Knowledge Notes"},"knowledge_base_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Knowledge Base Ids"}},"additionalProperties":false,"type":"object","title":"PublicApiAgentUpdate","description":"PATCH /v1/agents/{id}. Only the fields sent change; ``null`` clears the\noptional texts. Edits land in the draft: publish to put them live."},"WebhookEndpointView":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"active":{"type":"boolean","title":"Active","default":true},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"failure_count":{"type":"integer","title":"Failure Count","default":0},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery At"},"last_delivery_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery Status"},"secret_preview":{"type":"string","title":"Secret Preview"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","url","secret_preview"],"title":"WebhookEndpointView"},"PublicApiKnowledgeBaseList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KnowledgeBase"},"type":"array","title":"Items"}},"type":"object","title":"PublicApiKnowledgeBaseList"},"PublicApiChatReply":{"properties":{"chat":{"$ref":"#/components/schemas/PublicApiChat"},"reply":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply"},"messages":{"items":{"$ref":"#/components/schemas/PublicApiChatMessage"},"type":"array","title":"Messages"}},"type":"object","required":["chat"],"title":"PublicApiChatReply","description":"The answer to one message: the chat's state, the agent's reply and the\nmessages this exchange added (the person's, then the agent's)."},"RecipientView":{"properties":{"id":{"type":"string","title":"Id"},"phone_e164":{"type":"string","title":"Phone E164"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"variables":{"additionalProperties":{"type":"string"},"type":"object","title":"Variables"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"status":{"type":"string","enum":["pending","reserved","calling","in_call","completed","failed","cancelled","excluded"],"title":"Status"},"outcome":{"anyOf":[{"type":"string","enum":["answered","no_answer","unavailable"]},{"type":"null"}],"title":"Outcome"},"attempts":{"type":"integer","title":"Attempts","default":0},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"call_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Session Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"next_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Attempt At"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"answered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"has_recording":{"type":"boolean","title":"Has Recording","default":false}},"type":"object","required":["id","phone_e164","status"],"title":"RecipientView"},"RecipientInput":{"properties":{"phone":{"type":"string","maxLength":40,"minLength":3,"title":"Phone"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"variables":{"additionalProperties":true,"type":"object","title":"Variables"},"external_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"External Id"}},"type":"object","required":["phone"],"title":"RecipientInput"},"PublicApiChatCreate":{"properties":{"agent_id":{"type":"string","maxLength":64,"minLength":1,"title":"Agent Id"},"variables":{"additionalProperties":true,"type":"object","maxProperties":20,"title":"Variables"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":20,"title":"Metadata"},"contact":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Contact"}},"additionalProperties":false,"type":"object","required":["agent_id"],"title":"PublicApiChatCreate","description":"POST /v1/chats: open a text conversation with a published agent."},"UrlDocumentCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"url":{"type":"string","maxLength":2000,"minLength":8,"title":"Url"}},"type":"object","required":["name","url"],"title":"UrlDocumentCreate"},"PublicApiKeyInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_preview":{"type":"string","title":"Key Preview"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","key_preview"],"title":"PublicApiKeyInfo"},"PublicApiAgent":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","enum":["draft","active","inactive","archived"],"title":"Status"},"agent_type":{"type":"string","enum":["inbound","outbound","voice_widget","chat"],"title":"Agent Type"},"editing_mode":{"type":"string","title":"Editing Mode","default":"prompt"},"version":{"type":"integer","title":"Version","default":1},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"public_channel_enabled":{"type":"boolean","title":"Public Channel Enabled","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","slug","status","agent_type","created_at","updated_at"],"title":"PublicApiAgent"},"PhoneNumber":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"e164":{"type":"string","title":"E164"},"friendly_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly Name"},"number_type":{"type":"string","enum":["purchased","imported"],"title":"Number Type","default":"purchased"},"status":{"type":"string","enum":["active","inactive"],"title":"Status","default":"active"},"country_code":{"type":"string","title":"Country Code","default":"AO"},"capabilities":{"$ref":"#/components/schemas/PhoneCapabilities"},"monthly_price_kz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Price Kz"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"provider_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Sid"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agents":{"items":{"$ref":"#/components/schemas/PhoneNumberAgentRef"},"type":"array","title":"Agents"},"sip_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Domain"},"sip_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Username"},"sip_password_configured":{"type":"boolean","title":"Sip Password Configured","default":false},"sip_outbound_proxy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Outbound Proxy"},"sip_auth_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Auth Username"},"sip_outbound_register":{"type":"boolean","title":"Sip Outbound Register","default":false},"origination_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origination Uri"},"sip_status":{"anyOf":[{"type":"string","enum":["pending_credentials","pending_provisioning","ready","error"]},{"type":"null"}],"title":"Sip Status"},"sip_status_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Status Detail"},"sip_transport":{"type":"string","enum":["udp","tcp"],"title":"Sip Transport","default":"udp"},"sip_allowed_ips":{"items":{"type":"string"},"type":"array","title":"Sip Allowed Ips"},"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":["id","organization_id","e164"],"title":"PhoneNumber"},"PublicApiChatDetail":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"status":{"type":"string","enum":["active","ended"],"title":"Status"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"created_at":{"type":"string","title":"Created At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"messages":{"items":{"$ref":"#/components/schemas/PublicApiChatMessage"},"type":"array","title":"Messages"}},"type":"object","required":["id","agent_id","status","created_at"],"title":"PublicApiChatDetail","description":"The chat with every message, in order."},"PublicApiAgentList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicApiAgent"},"type":"array","title":"Items"}},"type":"object","title":"PublicApiAgentList"},"ManualDocumentCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"content":{"type":"string","maxLength":200000,"minLength":1,"title":"Content"}},"type":"object","required":["name","content"],"title":"ManualDocumentCreate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"CampaignCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"agent_id":{"type":"string","title":"Agent Id"},"phone_number_id":{"type":"string","title":"Phone Number Id"},"schedule":{"$ref":"#/components/schemas/CampaignSchedule"},"limits":{"$ref":"#/components/schemas/CampaignLimits"}},"type":"object","required":["name","agent_id","phone_number_id"],"title":"CampaignCreate"},"CampaignView":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","cancelled"],"title":"Status"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"phone_number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"schedule":{"$ref":"#/components/schemas/CampaignSchedule"},"limits":{"$ref":"#/components/schemas/CampaignLimits"},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","budget_exhausted","quota_exhausted","emergency_stop"]},{"type":"null"}],"title":"Pause Reason"},"waiting_reason":{"anyOf":[{"type":"string","enum":["outside_window","not_started","no_capacity","capacity_not_configured","line_unavailable","outbound_disabled","agent_unavailable","number_unavailable","halted","organization_suspended"]},{"type":"null"}],"title":"Waiting Reason"},"next_window_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Window At"},"deadline_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"cancelled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled At"},"stats":{"$ref":"#/components/schemas/CampaignStats"}},"type":"object","required":["id","name","status","schedule","limits"],"title":"CampaignView"},"RecipientsAddResult":{"properties":{"added":{"type":"integer","title":"Added"},"duplicates":{"type":"integer","title":"Duplicates"},"excluded":{"type":"integer","title":"Excluded"},"invalid":{"items":{"$ref":"#/components/schemas/RecipientIssue"},"type":"array","title":"Invalid"},"warnings":{"items":{"$ref":"#/components/schemas/RecipientIssue"},"type":"array","title":"Warnings"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["added","duplicates","excluded","invalid","total"],"title":"RecipientsAddResult"},"PublicApiOAuthAppInfo":{"properties":{"client_id":{"type":"string","title":"Client Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["client_id","name"],"title":"PublicApiOAuthAppInfo","description":"The partner app behind an OAuth access token."},"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"},"PublicApiGreetingUpdate":{"properties":{"mode":{"anyOf":[{"type":"string","enum":["agent_first","human_first"]},{"type":"null"}],"title":"Mode"},"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","title":"PublicApiGreetingUpdate"},"PublicApiChatMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","role","content"],"title":"PublicApiChatMessage"},"KnowledgeBaseCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"instruction":{"type":"string","maxLength":4000,"minLength":1,"title":"Instruction"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","instruction"],"title":"KnowledgeBaseCreate"},"TokenInfo":{"properties":{"active":{"type":"boolean","title":"Active","default":true},"client_id":{"type":"string","title":"Client Id"},"app_name":{"type":"string","title":"App Name"},"scope":{"type":"string","title":"Scope"},"organization":{"$ref":"#/components/schemas/TokenOrganization"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["client_id","app_name","scope","organization","expires_at"],"title":"TokenInfo"},"TokenOrganization":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"nif":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nif"}},"type":"object","required":["id","name"],"title":"TokenOrganization"},"PublicApiOrganization":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["id","name","slug"],"title":"PublicApiOrganization"},"UpdateWebhookEndpointRequest":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2000,"minLength":12},{"type":"null"}],"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":8},{"type":"null"}],"title":"Events"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"UpdateWebhookEndpointRequest"},"PublicApiRecording":{"properties":{"call_id":{"type":"string","title":"Call Id"},"url":{"type":"string","title":"Url"},"expires_in":{"type":"integer","title":"Expires In"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"}},"type":"object","required":["call_id","url","expires_in"],"title":"PublicApiRecording","description":"GET /v1/calls/{id}/recording?format=json — a short-lived download link."},"CallMessageItem":{"properties":{"id":{"type":"string","title":"Id"},"sequence":{"type":"integer","title":"Sequence","default":0},"role":{"type":"string","title":"Role","default":"user"},"content":{"type":"string","title":"Content","default":""},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id"],"title":"CallMessageItem"},"PublicApiCallList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallSessionListItem"},"type":"array","title":"Items"},"limit":{"type":"integer","title":"Limit"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["limit"],"title":"PublicApiCallList","description":"GET /v1/calls envelope, serving both pagination styles.\n\nOffset mode fills ``total``/``offset`` (and no cursor); cursor mode fills\n``next_cursor`` (null when exhausted) and leaves ``total`` null — an exact\ncount would cost the same full scan that cursors exist to avoid."},"PublicApiAgentDetail":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","enum":["draft","active","inactive","archived"],"title":"Status"},"agent_type":{"type":"string","enum":["inbound","outbound","voice_widget","chat"],"title":"Agent Type"},"editing_mode":{"type":"string","title":"Editing Mode","default":"prompt"},"version":{"type":"integer","title":"Version","default":1},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"public_channel_enabled":{"type":"boolean","title":"Public Channel Enabled","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"configuration":{"$ref":"#/components/schemas/PublicApiAgentConfiguration"},"has_unpublished_changes":{"type":"boolean","title":"Has Unpublished Changes","default":false}},"type":"object","required":["id","name","slug","status","agent_type","created_at","updated_at","configuration"],"title":"PublicApiAgentDetail","description":"GET/PATCH /v1/agents/{id}: the agent plus its editable configuration."},"Body_upload_knowledge_pdf_v1_knowledge_bases__knowledge_base_id__documents_pdf_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_knowledge_pdf_v1_knowledge_bases__knowledge_base_id__documents_pdf_post"},"AnalyticsOverview":{"properties":{"period":{"type":"string","enum":["daily","weekly","monthly"],"title":"Period","default":"weekly"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"totals":{"$ref":"#/components/schemas/CallTotals"},"daily":{"items":{"$ref":"#/components/schemas/DailyPoint"},"type":"array","title":"Daily"},"by_status":{"items":{"$ref":"#/components/schemas/BreakdownItem"},"type":"array","title":"By Status"},"by_end_reason":{"items":{"$ref":"#/components/schemas/BreakdownItem"},"type":"array","title":"By End Reason"},"sentiment":{"$ref":"#/components/schemas/SentimentSummary"},"agents":{"items":{"$ref":"#/components/schemas/AgentPerformanceItem"},"type":"array","title":"Agents"},"actions":{"items":{"$ref":"#/components/schemas/ExecutedActionItem"},"type":"array","title":"Actions"},"failed_calls":{"items":{"$ref":"#/components/schemas/FailedCallItem"},"type":"array","title":"Failed Calls"}},"type":"object","required":["start","end"],"title":"AnalyticsOverview"},"PhoneNumberAgentRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["id","name"],"title":"PhoneNumberAgentRef"},"BreakdownItem":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count","default":0},"pct":{"type":"number","title":"Pct","default":0.0}},"type":"object","required":["key","label"],"title":"BreakdownItem","description":"A share-of-total row (Call Status, End Call Reason)."},"PhoneCapabilities":{"properties":{"calls":{"type":"boolean","title":"Calls","default":true},"sms":{"type":"boolean","title":"Sms","default":true}},"type":"object","title":"PhoneCapabilities"},"DailyPoint":{"properties":{"date":{"type":"string","title":"Date"},"calls":{"type":"integer","title":"Calls","default":0},"minutes":{"type":"number","title":"Minutes","default":0.0},"completed":{"type":"integer","title":"Completed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"cancelled":{"type":"integer","title":"Cancelled","default":0}},"type":"object","required":["date"],"title":"DailyPoint","description":"One bucket of the trend charts. `date` is an ISO date (UTC)."},"CampaignLimits":{"properties":{"max_concurrency":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Max Concurrency","default":2},"reserved_capacity":{"type":"integer","maximum":50.0,"minimum":0.0,"title":"Reserved Capacity","default":1},"max_attempts":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Max Attempts","default":1},"retry_delay_minutes":{"type":"integer","maximum":1440.0,"minimum":15.0,"title":"Retry Delay Minutes","default":60},"budget_minutes":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Budget Minutes"}},"type":"object","title":"CampaignLimits"},"CallTotals":{"properties":{"calls":{"$ref":"#/components/schemas/MetricDelta"},"minutes":{"$ref":"#/components/schemas/MetricDelta"},"avg_duration_seconds":{"$ref":"#/components/schemas/MetricDelta"}},"type":"object","title":"CallTotals"},"FailedCallItem":{"properties":{"id":{"type":"string","title":"Id"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"}},"type":"object","required":["id"],"title":"FailedCallItem"},"CampaignStats":{"properties":{"total":{"type":"integer","title":"Total","default":0},"pending":{"type":"integer","title":"Pending","default":0},"in_flight":{"type":"integer","title":"In Flight","default":0},"completed":{"type":"integer","title":"Completed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"cancelled":{"type":"integer","title":"Cancelled","default":0},"excluded":{"type":"integer","title":"Excluded","default":0},"calls_started":{"type":"integer","title":"Calls Started","default":0},"answered":{"type":"integer","title":"Answered","default":0},"no_answer":{"type":"integer","title":"No Answer","default":0},"unavailable":{"type":"integer","title":"Unavailable","default":0},"answer_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Answer Rate"},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds","default":0},"progress":{"type":"number","title":"Progress","default":0.0},"cost_kz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Kz"},"with_post_call":{"type":"integer","title":"With Post Call","default":0}},"type":"object","title":"CampaignStats","description":"Counts with documented denominators (see the docs page \"Campanhas\")."},"SentimentSummary":{"properties":{"positive_pct":{"$ref":"#/components/schemas/MetricDelta"},"classified":{"type":"integer","title":"Classified","default":0},"total":{"type":"integer","title":"Total","default":0},"breakdown":{"items":{"$ref":"#/components/schemas/BreakdownItem"},"type":"array","title":"Breakdown"},"daily":{"items":{"$ref":"#/components/schemas/DailySentimentPoint"},"type":"array","title":"Daily"}},"type":"object","title":"SentimentSummary","description":"Share of classified calls that read as positive.\n\n`classified` is exposed so the UI can say how much of the window the\nfigure covers: calls that ended before sentiment shipped, or whose\nclassification failed, are excluded rather than counted as neutral."},"RecipientIssue":{"properties":{"row":{"type":"integer","title":"Row"},"phone":{"type":"string","title":"Phone"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["row","phone","reason"],"title":"RecipientIssue"},"PublicApiAgentConfiguration":{"properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"greeting":{"$ref":"#/components/schemas/PublicApiGreeting"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"personality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personality"},"objections":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objections"},"knowledge_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knowledge Notes"},"knowledge_base_ids":{"items":{"type":"string"},"type":"array","title":"Knowledge Base Ids"}},"type":"object","title":"PublicApiAgentConfiguration","description":"What an integrator may read and edit: the words, never the engine.\n\nIt is the DRAFT (what the next publish will freeze). Live calls keep using\nthe published version until POST /v1/agents/{id}/publish."},"CallSessionListItem":{"properties":{"id":{"type":"string","title":"Id"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"channel":{"type":"string","enum":["browser_demo","phone","whatsapp","web_chat"],"title":"Channel","default":"browser_demo"},"direction":{"anyOf":[{"type":"string","enum":["inbound","outbound"]},{"type":"null"}],"title":"Direction"},"status":{"type":"string","enum":["created","active","completed","failed","cancelled","abandoned"],"title":"Status","default":"created"},"caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Name"},"caller_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Contact"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"is_simulation":{"type":"boolean","title":"Is Simulation","default":true},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"has_post_call":{"type":"boolean","title":"Has Post Call","default":false},"executed_actions_count":{"type":"integer","title":"Executed Actions Count","default":0}},"type":"object","required":["id"],"title":"CallSessionListItem"},"AgentPerformanceItem":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"name":{"type":"string","title":"Name","default":"—"},"calls":{"type":"integer","title":"Calls","default":0},"minutes":{"type":"number","title":"Minutes","default":0.0},"completed":{"type":"integer","title":"Completed","default":0},"completion_pct":{"type":"number","title":"Completion Pct","default":0.0},"completion_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completion Change Pct"},"goal_achieved_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goal Achieved Pct"},"calls_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calls Change Pct"},"minutes_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minutes Change Pct"},"goal_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goal Change Pct"}},"type":"object","title":"AgentPerformanceItem"},"CampaignSchedule":{"properties":{"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"timezone":{"type":"string","title":"Timezone","default":"Africa/Luanda"},"windows":{"items":{"$ref":"#/components/schemas/CallWindow"},"type":"array","maxItems":21,"title":"Windows"},"max_duration_days":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Max Duration Days","default":7}},"type":"object","title":"CampaignSchedule","description":"When a campaign may dial. start_at None = as soon as it is started."},"PublicApiGreeting":{"properties":{"mode":{"type":"string","enum":["agent_first","human_first"],"title":"Mode","default":"agent_first"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"PublicApiGreeting","description":"Who speaks first, and the opening line the agent uses."},"ExecutedActionItem":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"label":{"type":"string","title":"Label"},"usage":{"$ref":"#/components/schemas/MetricDelta"},"daily":{"items":{"$ref":"#/components/schemas/DailyActionPoint"},"type":"array","title":"Daily"}},"type":"object","required":["tool_name","label"],"title":"ExecutedActionItem"},"MetricDelta":{"properties":{"value":{"type":"number","title":"Value","default":0.0},"previous":{"type":"number","title":"Previous","default":0.0},"change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Pct"}},"type":"object","title":"MetricDelta","description":"A value plus how it moved against the immediately preceding window."},"CallWindow":{"properties":{"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"title":"Day"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["day","start","end"],"title":"CallWindow"},"DailySentimentPoint":{"properties":{"date":{"type":"string","title":"Date"},"positive":{"type":"integer","title":"Positive","default":0},"neutral":{"type":"integer","title":"Neutral","default":0},"negative":{"type":"integer","title":"Negative","default":0}},"type":"object","required":["date"],"title":"DailySentimentPoint"},"DailyActionPoint":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["date"],"title":"DailyActionPoint"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Chave API da organização (dsk_…) ou token OAuth de uma app (dsk_oat_…), em Authorization: Bearer."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"A mesma chave no cabeçalho X-API-Key."}}}}