{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/user":{"get":{"operationId":"get-user-details","summary":"Get user details","tags":["user"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User_getUserDetails_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/organization":{"get":{"operationId":"get-organization-details","summary":"Get organization details","tags":["organization"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization_getOrganizationDetails_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/template":{"get":{"operationId":"list-agent-templates","summary":"Get agent templates","tags":["agentTemplates"],"parameters":[{"name":"region","in":"query","description":"Filter templates by region. Omit to return all templates.","required":false,"schema":{"$ref":"#/components/schemas/AgentTemplateGetParametersRegion"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_templates_list_agent_templates_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/from-template":{"post":{"operationId":"create-agent-from-template","summary":"Create agent from template","description":"We have created templates for some common use cases. You can use these templates to create an agent. For getting list of templates, you can use the /agent/template endpoint. It will give you the list of templates with their description and id. You can pass the id of the template in the request body to create an agent from the template.","tags":["agentTemplates"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Templates_createAgentFromTemplate_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentFromTemplateRequest"}}}}}},"/agent":{"get":{"operationId":"list-agents","summary":"Get all agents","description":"Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent. This API will give you the list of agents created by organization you are a part of.","tags":["Agents"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter agents by workflow type","required":false,"schema":{"$ref":"#/components/schemas/AgentGetParametersType"}},{"name":"sortField","in":"query","description":"Field to sort results by","required":false,"schema":{"$ref":"#/components/schemas/AgentGetParametersSortField","default":"createdAt"}},{"name":"sortOrder","in":"query","description":"Sort direction","required":false,"schema":{"$ref":"#/components/schemas/AgentGetParametersSortOrder","default":"desc"}},{"name":"archived","in":"query","description":"When true, returns only archived agents. Omit or set to false to return active agents.","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_list_agents_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create-agent","summary":"Create a new agent","description":"Create a new agent by passing the agent name in the request body.\n\nNew agents have versioning enabled by default. To set the prompt,\n`firstMessage`, tools, or any runtime config, fork a draft from the\nauto-created initial version, edit it, publish, and activate — see\nthe [Versioning Lifecycle](/atoms/developer-guide/build/agents/versioning-lifecycle)\nguide for the full flow.\n\nThe legacy `PATCH /workflow/{workflowId}` endpoint writes directly to\nthe underlying workflow document and bypasses the version lifecycle;\nedits made that way are not captured as a version and may not\npropagate to live calls. Use the drafts flow above.\n","tags":["Agents"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Agent created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_create_agent_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}}}},"/agent/with-ai":{"post":{"operationId":"create-agent-with-ai","summary":"Create agent with AI","description":"Creates a new agent using AI generation. Accepts either a guided questionnaire (array of Q&A pairs) or a free-text description. The AI generates the agent's prompt and configuration. A security check is run on the generated prompt before the agent is persisted. Deducts credits on success.\n\n**Rules:**\n- Either `questions` (non-empty array) or `description` must be provided — not both.\n- `emotiveToggle`, `voiceId`, and `voiceModel` must either all be present or all be absent.\n- When `emotiveToggle=true`, `voiceModel` must be `GPT_REALTIME`.\n- When `emotiveToggle=false`, `voiceModel` cannot be `GPT_REALTIME`.\n","tags":["Agents"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Agent created — returns the new agent's ObjectId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_createAgentWithAi_Response_201"}}}},"400":{"description":"Invalid request body, or the generated prompt failed the security check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Organization lacks access to the requested workflow type or model (WORKFLOW_GRAPH, GPT 5.2, Electron Kogta)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}},"503":{"description":"Security check service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Agent name. Auto-generated if omitted."},"description":{"type":"string","description":"Free-text description. Required if `questions` not given."},"questions":{"type":"array","items":{"$ref":"#/components/schemas/AgentWithAiPostRequestBodyContentApplicationJsonSchemaQuestionsItems"},"description":"Guided Q&A pairs. Required if `description` not given."},"type":{"$ref":"#/components/schemas/AgentWithAiPostRequestBodyContentApplicationJsonSchemaType","description":"Workflow type. Only `single_prompt` is supported."},"emotiveToggle":{"type":"boolean","description":"Enable emotive (GPT Realtime) mode. Must be given with `voiceId` and `voiceModel`."},"voiceId":{"type":"string","description":"Voice ID. Must be given together with `emotiveToggle` and `voiceModel`."},"voiceModel":{"type":"string","description":"Voice model. Must be given together with `emotiveToggle` and `voiceId`."},"knowledgeBaseId":{"type":"string","description":"Knowledge base to attach (must belong to the organization)."}}}}}}}},"/agent/{id}/duplicate":{"post":{"operationId":"duplicate-agent","summary":"Duplicate agent to another organization","description":"Duplicates a SINGLE_PROMPT agent's live active version into a target organization\n(can also be the same organization). Copies all versioned configuration but strips\norganization-specific resources: knowledge base tools are removed, default variable\nvalues are blanked, and a new avatar is generated. The duplicate starts with a\npublished V1 as its active version.\n\n**400 is returned when:**\n- The source agent is archived (`\"Cannot duplicate an archived agent\"`)\n- The agent has no `activeVersionId` (`\"This agent has no active version and cannot be duplicated\"`)\n- The active version exists but is not published/active (`\"This agent has no active published version and cannot be duplicated\"`)\n- The agent is not `SINGLE_PROMPT` workflow type\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"The ID of the source agent to duplicate","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Agent duplicated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_duplicate_agent_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden — authenticated user is not a member of the target organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"404":{"description":"Not found. Possible messages:\n- `\"Agent not found\"` — source agent doesn't exist or doesn't belong to the caller's org\n- `\"Target organization not found\"` — the `targetOrganizationId` doesn't exist\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetOrganizationId":{"type":"string","description":"MongoDB ObjectId of the target organization. Must be a 24-character hex string.\nThe authenticated user must be a member of this organization.\n"}},"required":["targetOrganizationId"]}}}}}},"/agent/{id}":{"get":{"operationId":"get-agent","summary":"Get agent by ID","description":"Returns the agent document merged with the resolved config of the active version\nunder `_resolvedConfig`. Non-versioned fields (name, telephonyProductId, allowInboundCall,\netc.) sit at the top level; versioned fields (prompt, tools, language, synthesizer,\npost-call analytics, …) are resolved from the target version and exposed under `_resolvedConfig`.\n\n**Previewing a draft or specific version**\n\nPass `?draftId=<id>` to resolve config from a specific draft instead of the active version.\nPass `?versionId=<id>` to resolve config from a specific published version.\nWhen either param is used, the response includes `_configSource: \"draft\" | \"version\" | \"active\"`\nindicating which config was resolved.\n\nNotable resolved fields in `_resolvedConfig`:\n\n- `prompt` — active version's single-prompt text\n- `tools` — configured tools on the resolved version\n- `postCallAnalyticsConfig` — disposition metrics + analytics model flags\n- `modelName` — LLM model name on the resolved version\n- `defaultLanguage`, `supportedLanguages` — active language config\n- `firstMessage`, `globalPrompt` — active messaging config\n- `workflowGraph` — full node graph for `workflow_graph` agents\n\nTo read prompt + tools alone, use `GET /agent/{id}/workflow` (deprecated for\nnew integrations but still live). To inspect a specific non-active version,\nuse `GET /agent/{id}/versions/{versionId}`.\n\n**400 — also used for \"not found\":** if the agent ID does not exist in the\norganization, the API returns 400 with `errors: [\"No agent found\"]` rather than 404.\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"query","description":"Resolve `_resolvedConfig` from this draft instead of the active version. Sets `_configSource` to `\"draft\"` in the response.","required":false,"schema":{"type":"string"}},{"name":"versionId","in":"query","description":"Resolve `_resolvedConfig` from this published version instead of the active version. Sets `_configSource` to `\"version\"` in the response.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_get_agent_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"operationId":"update-agent","summary":"Update agent metadata","description":"Update agent fields. Behavior depends on whether the agent has versioning enabled:\n\n**Versioned agents** (have an active published version): only metadata fields are accepted —\n`name`, `description`, `avatarUrl`, `telephonyProductId`, `allowInboundCall`, `visibleToEveryone`.\nSubmitting any config-level field returns 400 with\n`\"Agent has versioning enabled. Config changes must be made through drafts.\"`.\nUse `PATCH /agent/{id}/drafts/{draftId}/config` instead.\n\n**Non-versioned agents** (no active version): all configuration fields are accepted,\nthe same full set as `POST /agent`.\n\n**400 is also returned when:**\n- The agent is locked (`\"Agent is locked, please unlock it to update\"`)\n- Cross-field constraint violated (e.g. `north_indic` language requires `transcriberType: pulse`)\n\n**403** is returned when selecting a gated model (`gpt-5.2`, `electron-kogta`, `electron-kogta-v2`)\nwithout org-level access.\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_update_agent_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}}}},"/agent/prompt-config":{"get":{"operationId":"get-agent-prompt-config","summary":"Get AI creation questionnaire config","description":"Returns the questionnaire configuration used by the \"Create with AI\" flow — the list of guided questions, their types, available options, and pre-filled example answers per label. Only a user token is required; no organization auth needed.\n","tags":["Agents"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Questionnaire configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_getAgentPromptConfig_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/widget-config":{"get":{"operationId":"get-agent-widget-config","summary":"Get widget configuration","description":"Returns the current web widget configuration for the agent. Also includes `assistantId` (same as the agent ID) as a convenience field for the widget embed code.","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"Agent ObjectId","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Widget configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_getAgentWidgetConfig_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"operationId":"update-agent-widget-config","summary":"Update widget configuration","description":"Updates the web widget configuration for the agent. Only provided fields are updated (partial update). When `avatarUrl` is changed, the old CDN avatar is automatically deleted from S3. The `avatarUrl` must be a URL from the platform's CDN domain — use `POST /agent/{id}/avatar/presigned-url` to upload first.\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"Agent ObjectId","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated widget configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_updateAgentWidgetConfig_Response_200"}}}},"400":{"description":"Invalid agent ID or `avatarUrl` is not a valid CDN URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"widgetConfig":{"$ref":"#/components/schemas/AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfig","description":"All fields are optional — only provided fields are updated"}}}}}}}},"/agent/{id}/avatar/presigned-url":{"post":{"operationId":"get-agent-avatar-presigned-url","summary":"Get avatar upload URL","description":"Generates a pre-signed S3 upload URL for the agent's widget avatar image. Upload the image directly to S3 using the returned `presignedUrl`, then save `cdnUrl` as the agent's avatar via `PATCH /agent/{id}/widget-config`.\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"Agent ObjectId","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pre-signed upload URL and CDN URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_getAgentAvatarPresignedUrl_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","description":"Original file name (used to construct the S3 key)"},"contentType":{"type":"string","description":"MIME type — must start with `image/`"},"fileSize":{"type":"number","format":"double","description":"File size in bytes — must be > 0 and ≤ 2 MB (2,097,152 bytes)"}},"required":["fileName","contentType","fileSize"]}}}}}},"/agent/{id}/workflow":{"get":{"operationId":"get-agent-workflow","summary":"Get agent workflow","description":"**Deprecated** — prefer `GET /agent/{id}` (config is resolved into `_resolvedConfig`\nincluding prompt, tools, and post-call analytics).\n\nReturns the active version's prompt and tools for single-prompt agents, or the\nworkflow graph data for workflow_graph agents. Customers still rely on this to\nfetch their current prompt + tools — endpoint is kept live for now.\n\n**Caveat:** the `versionId` query param (if passed) is silently ignored.\nThe response always reflects the currently-active version. To inspect a\nnon-active version, use `GET /agent/{id}/versions/{versionId}`.\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"The ID of the agent","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_getAgentWorkflow_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflow/{id}":{"patch":{"operationId":"update-workflow-configuration","summary":"Update workflow configuration","description":"**Deprecated** — use `PATCH /agent/{id}/drafts/{draftId}/config` instead.\n\nDirectly mutates the legacy workflow document for an agent. This write path\nbypasses the versioning system entirely: the change is not captured as a\nnew version, and future version activations may overwrite the legacy doc\nback to whatever the version snapshot contains.\n\n⚠ **Writing here on a versioned agent can silently wipe tools, prompt, or\nother fields that were missing from the PATCH payload.** Only use this if\nyou know the agent is not using versioning, or if you are intentionally\nhot-patching the legacy doc.\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"The workflow ID (found at `agent.workflowId` on the agent document).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workflow updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_update_workflow_configuration_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Workflow not found.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/WorkflowType"},"workflowGraph":{"$ref":"#/components/schemas/WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraph","description":"Required when `type = workflow_graph`. Exactly one of `workflowGraph` or `singlePromptConfig` must be provided."},"singlePromptConfig":{"$ref":"#/components/schemas/SinglePromptConfig"}},"required":["type"]}}}}}},"/agent/{id}/call-logs":{"get":{"operationId":"get-agent-call-logs","summary":"Get agent call logs","description":"Returns paginated call logs for a specific agent.","tags":["Agents"],"parameters":[{"name":"id","in":"path","description":"Agent ObjectId","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default 1)","required":false,"schema":{"type":"integer","default":1}},{"name":"offset","in":"query","description":"Records per page (default 10)","required":false,"schema":{"type":"integer","default":10}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated call logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents_getAgentCallLogs_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/archive":{"delete":{"operationId":"archive-agent","summary":"Archive or unarchive an agent","description":"Soft-archives the agent — it is excluded from listings and stops accepting calls,\nbut all data is preserved and the operation is fully reversible.\n\nPass `?on=false` to unarchive (restore) a previously archived agent.\n\n**409 is returned when:**\n- The agent is already in the requested state (`\"Agent is already archived\"` / `\"Agent is already active\"`)\n- The agent is linked to an active campaign (`\"Agent is associated with the [status] campaign \"[name]\". Complete or remove the campaign before archiving.\"`)\n","tags":["Agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"on","in":"query","description":"`true` (default) — archive the agent.\n`false` — unarchive (restore) a previously archived agent.\n","required":false,"schema":{"type":"boolean","default":true}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent archived or unarchived successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_archive_agent_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"409":{"description":"Conflict — agent is already in the requested state, or is linked to an active campaign.\n","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/prompt-scoring/score":{"post":{"operationId":"score-a-prompt","summary":"Score a prompt","description":"Scores an agent's prompt across 11 quality dimensions using Gemini-based analysis. Requires the prompt to have changed since the last scoring.\n\n**Input:** Provide exactly one of `versionId` (published agent version) or `draftId` (agent draft). Providing both or neither returns a 400.\n\n**Credit usage:** 1 credit is deducted per successful call.\n\n**Idempotency:** Re-submitting the same prompt without changes returns a 400 — retrieve the cached score via the GET agent endpoint instead.\n\n**Supported agent types:** Only `single_prompt` agents are supported. Workflow-graph agents return a 400.\n\n**Scoring model:** Two sequential Gemini calls — a Platform Analyst pass followed by a Rubric Judge pass.\n\n### Scored Dimensions\n\n| Tier | Dimension | Notes |\n|------|-----------|-------|\n| 1 | Role & Objective | |\n| 1 | Personality & Voice | |\n| 1 | Conversation Structure | |\n| 1 | Tool Integration | |\n| 1 | Constraints & Safety | |\n| 2 | Conversational Naturalness | |\n| 2 | Failure-Mode Coverage | |\n| 3 | Information Integrity | Gating — if Weak/Missing, score capped at 70 |\n| 3 | Variable & Tool Hygiene | Gating — if Weak/Missing, score capped at 50 |\n| 3 | Internal Consistency | |\n| 3 | Density | Computed from token analysis |\n","tags":["promptScoring"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Prompt scored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompt Scoring_scoreAPrompt_Response_200"}}}},"400":{"description":"Bad request. Possible reasons:\n- Neither or both of `versionId`/`draftId` provided\n- Organization has no credits available\n- Agent is a conversational/workflow-graph type (not supported)\n- Prompt unchanged since last scoring — retrieve the existing score via GET agent\n- No prompt found on the version or draft\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAPromptRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Not a member of the organization or insufficient role (minimum Member required).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAPromptRequestForbiddenError"}}}},"404":{"description":"Version or draft not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAPromptRequestNotFoundError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAPromptRequestTooManyRequestsError"}}}},"500":{"description":"Gemini scoring failed after retries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAPromptRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompt Scoring_scoreAPrompt_Request"}}}}}},"/conversation":{"get":{"operationId":"list","summary":"Get all conversation logs","description":"Retrieve paginated conversation logs with support for various filters. Returns call logs for agents belonging to the authenticated user's organization.","tags":["calls"],"parameters":[{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","default":1}},{"name":"limit","in":"query","description":"Number of items per page. Server-side cap is 500 — values above 500 are silently clamped.","required":false,"schema":{"type":"integer","default":5}},{"name":"agentIds","in":"query","description":"Comma-separated list of agent IDs to filter by","required":false,"schema":{"type":"string"}},{"name":"campaignIds","in":"query","description":"Comma-separated list of campaign IDs to filter by","required":false,"schema":{"type":"string"}},{"name":"callTypes","in":"query","description":"Comma-separated list of call types to filter by","required":false,"schema":{"$ref":"#/components/schemas/ConversationGetParametersCallTypes"}},{"name":"search","in":"query","description":"Search query to filter by callId, fromNumber, or toNumber","required":false,"schema":{"type":"string"}},{"name":"statusFilter","in":"query","description":"Comma-separated list of call statuses to filter by.\nAvailable statuses: pending, in_progress, in_queue, processing, active, completed, failed, no_answer, cancelled\n","required":false,"schema":{"type":"string"}},{"name":"disconnectReasonFilter","in":"query","description":"Comma-separated list of disconnect reasons to filter by.\nAvailable reasons: user_hangup, agent_hangup, connection_error, timeout, system_error, transfer_complete\n","required":false,"schema":{"type":"string"}},{"name":"callAttemptFilter","in":"query","description":"Comma-separated list of call attempt types to filter by.\nAvailable filters: initial (first attempt calls), retry (retry attempt calls), all (all calls)\n","required":false,"schema":{"type":"string"}},{"name":"durationFilter","in":"query","description":"Comma-separated list of duration ranges to filter by.\nAvailable ranges: 0-30 (0-30 seconds), 30-60 (30-60 seconds), 1-5 (1-5 minutes), 5+ (more than 5 minutes)\n","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Field to sort results by","required":false,"schema":{"$ref":"#/components/schemas/ConversationGetParametersSortBy"}},{"name":"sortOrder","in":"query","description":"Sort direction","required":false,"schema":{"$ref":"#/components/schemas/ConversationGetParametersSortOrder"}},{"name":"dateFrom","in":"query","description":"ISO date — return calls created on or after this date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"ISO date — return calls created on or before this date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"versionFilter","in":"query","description":"Comma-separated version IDs to filter calls by the agent version that handled them","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calls_list_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/conversation/search":{"post":{"operationId":"search","summary":"Search conversation logs by call IDs","description":"Fetch specific conversation logs by their callIds. This endpoint allows you to retrieve up to 100 specific calls at once.\nOnly returns calls that belong to agents in your organization (security check enforced).\nUnlike the GET /conversation endpoint, this endpoint can also return retry calls (non-root calls).\n\n**Differences from GET /conversation response:** each log item has the same base structure but\nthe following three fields are **not** included here:\n- `dispositionMetrics` — not enriched\n- `agentDispositionConfig` — not enriched\n- `versionNumber` — not enriched\n","tags":["calls"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calls_search_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callIds":{"type":"array","items":{"type":"string"},"description":"Array of callIds to fetch. Format: `CALL-{13-digit-timestamp}-{6-char-hex}`\n(e.g. `CALL-1737000000000-abc123`). Minimum 1, maximum 100 per request.\n"}},"required":["callIds"]}}}}}},"/conversation/{id}":{"get":{"operationId":"get","summary":"Get conversation log by ID","description":"Retrieve detailed information about a specific conversation including transcript, events, and latency metrics.","tags":["calls"],"parameters":[{"name":"id","in":"path","description":"The callId of the conversation (format `CALL-{13-digit-timestamp}-{6-char-hex}`). You can get the callId from the conversation logs endpoint.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calls_get_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Conversation log not found — the callId does not exist or does not belong to the caller's organization","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/conversation/outbound":{"post":{"operationId":"start-outbound-call","summary":"Start an outbound call","description":"Initiates an outbound telephony call with a specified agent and phone number.\n\n## Caller-ID resolution\n\nWhen `fromProductId` is omitted **and** the agent has no telephony\nproduct attached, the call dispatches from a Smallest-managed Plivo\ntrunk using a default caller-ID number (chosen by destination\ncountry). The call still places and the response is still\n`200 + conversationId`, but the recipient sees the default Smallest\nnumber rather than your own. For production traffic, either:\n\n- pass `fromProductId` explicitly (look up your owned numbers via\n  `GET /product/phone-numbers`), or\n- attach a phone-number product to the agent.\n\n## Resolved-config check\n\nThe call uses the agent's currently-active version. If your most\nrecent prompt change went through `PATCH /workflow/{workflowId}` and\nthe agent has versioning enabled, that change may not have\npropagated to the active version — and the call will play the\nplatform-default greeting instead of your prompt. Before placing a\nproduction call, fetch `GET /agent/{agentId}` and confirm\n`_resolvedConfig.firstMessage` (and related fields) match what you\nintended. The\n[Versioning Lifecycle](/atoms/developer-guide/build/agents/versioning-lifecycle)\nguide covers the correct edit flow.\n\n**400 is returned for:**\n- Invalid `agentId` format (`\"Invalid agent id\"`)\n- Invalid `phoneNumber` format (`\"Invalid phone number\"`)\n- Invalid `fromProductId` format (`\"Invalid product id\"`)\n- Agent not found or not in the caller's org (`\"Agent not found\"`)\n- Agent is archived (`\"Agent is archived and cannot initiate calls\"`)\n- `workflow_graph` agent has no workflow configured (`\"Workflow not found\"`)\n- Workflow has validation errors (`\"Invalid workflow, please fix the errors...\"`)\n\n**403** is returned for `workflow_graph` agents when the org lacks conversational agents access.\n\n**Test calls:** set the `x-test-call: true` header to mark the resulting call log as a test call\n(`isTest: true`). Test calls are subject to concurrent slot limits.\n","tags":["calls"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}},{"name":"x-test-call","in":"header","description":"Set to \"true\" to mark this as a test call. The call log will have isTest=true and counts against concurrent test-call slot limits.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationOutboundPostParametersXTestCall"}}],"responses":{"200":{"description":"Successfully started the outbound conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calls_start_outbound_call_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","description":"MongoDB ObjectId of the agent initiating the conversation"},"phoneNumber":{"type":"string","description":"The E.164 phone number to call"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ConversationOutboundPostRequestBodyContentApplicationJsonSchemaVariables"},"description":"Variables to inject into the agent's prompt at call time.\nValues must be string, number, or boolean — nested objects are not supported.\n"},"fromProductId":{"type":"string","description":"ID of the telephony product (phone number) to call from. Get this from `GET /product/phone-numbers`."},"versionId":{"type":"string","description":"ID of a specific published agent version to use for this call.\nUseful for test calls — attributes the call log to that version so you can track\nwhich version was tested.\n"},"operatorId":{"type":"string","description":"Integration operator identifier. Pass `\"webengage\"` to trigger the WebEngage\nintegration flow.\n"},"operatorData":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Arbitrary data passed to the operator (e.g. `userId`, `journeyId` for WebEngage)."}},"required":["agentId","phoneNumber"]}}}}}},"/call-actions":{"get":{"operationId":"list-call-actions","summary":"List call actions","description":"Returns a paginated list of call actions for the organization, filtered by agent. Optionally filter by category or provider.","tags":["callActions"],"parameters":[{"name":"agentId","in":"query","description":"Filter by agent (ObjectId)","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default 1)","required":false,"schema":{"type":"integer","default":1}},{"name":"limit","in":"query","description":"Records per page (default 10)","required":false,"schema":{"type":"integer","default":10}},{"name":"category","in":"query","description":"Filter by category","required":false,"schema":{"$ref":"#/components/schemas/CallActionsGetParametersCategory"}},{"name":"provider","in":"query","description":"Filter by provider name","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of call actions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call Actions_listCallActions_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create-call-action","summary":"Create a call action","description":"Creates a new call action for an agent. Call actions define automated behaviors that fire at specific points in a call lifecycle.\n\n- **`trigger`** actions fire to initiate an outbound call and require `config.phoneNumberFieldName`.\n- **`post-call`** actions fire after a call ends (e.g. to update a CRM record).\n","tags":["callActions"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Call action created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call Actions_createCallAction_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","description":"Agent this action belongs to (ObjectId)"},"category":{"$ref":"#/components/schemas/CallActionsPostRequestBodyContentApplicationJsonSchemaCategory","description":"When the action fires"},"provider":{"type":"string","description":"Integration provider (e.g. `hubspot`, `salesforce`)"},"action_type":{"$ref":"#/components/schemas/CallActionsPostRequestBodyContentApplicationJsonSchemaActionType","description":"The operation to perform on the provider object"},"object":{"type":"string","description":"Provider object type to act on (e.g. `contact`, `deal`)"},"config":{"$ref":"#/components/schemas/CallActionsPostRequestBodyContentApplicationJsonSchemaConfig"}},"required":["agentId","category","provider","config"]}}}}}},"/call-actions/{id}":{"get":{"operationId":"get-call-action","summary":"Get a call action","description":"Returns a single call action by ID. Scoped to the authenticated organization.","tags":["callActions"],"parameters":[{"name":"id","in":"path","description":"Call action ObjectId","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call Actions_getCallAction_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Call action not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"put":{"operationId":"update-call-action","summary":"Update a call action","description":"Updates an existing call action. All body fields are optional — only provided fields are updated.","tags":["callActions"],"parameters":[{"name":"id","in":"path","description":"Call action ObjectId","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated call action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call Actions_updateCallAction_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Call action not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"$ref":"#/components/schemas/CallActionsIdPutRequestBodyContentApplicationJsonSchemaCategory","description":"Change when the action fires"},"provider":{"type":"string","description":"Change the integration provider"},"action_type":{"$ref":"#/components/schemas/CallActionsIdPutRequestBodyContentApplicationJsonSchemaActionType","description":"Change the operation type"},"object":{"type":"string","description":"Change the provider object type"},"config":{"$ref":"#/components/schemas/CallActionsIdPutRequestBodyContentApplicationJsonSchemaConfig"}}}}}}},"delete":{"operationId":"delete-call-action","summary":"Delete a call action","description":"Permanently deletes a call action. Scoped to the authenticated organization.","tags":["callActions"],"parameters":[{"name":"id","in":"path","description":"Call action ObjectId","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call action deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call Actions_deleteCallAction_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Call action not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/concurrency":{"get":{"operationId":"get-concurrency","summary":"Get concurrency limits","description":"Returns the organization's overall concurrency limit, how much is reserved across all agents, the remaining unreserved pool, and the per-agent reservation breakdown per call channel.\n","tags":["concurrency"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Concurrency overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concurrency_getConcurrency_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/concurrency/reservations":{"put":{"operationId":"update-concurrency-reservations","summary":"Update concurrency reservations","description":"Updates concurrency reservations for one or more agents in a single request. Replaces the existing reservation values for each specified agent. **Admin role required.**\n","tags":["concurrency"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reservations updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Concurrency_updateConcurrencyReservations_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Admin role required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reservations":{"type":"array","items":{"$ref":"#/components/schemas/ConcurrencyReservationsPutRequestBodyContentApplicationJsonSchemaReservationsItems"},"description":"Array of agent reservations to update"}},"required":["reservations"]}}}}}},"/campaign":{"get":{"operationId":"list","summary":"Retrieve all campaigns","description":"Get all campaigns for the authenticated organization.","tags":["Campaigns"],"parameters":[{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","default":1}},{"name":"offset","in":"query","description":"Number of campaigns per page","required":false,"schema":{"type":"integer","default":5}},{"name":"status","in":"query","description":"Filter campaigns by status","required":false,"schema":{"$ref":"#/components/schemas/CampaignGetParametersStatus"}},{"name":"search","in":"query","description":"Search campaigns by name","required":false,"schema":{"type":"string"}},{"name":"sortField","in":"query","description":"Field to sort by","required":false,"schema":{"$ref":"#/components/schemas/CampaignGetParametersSortField","default":"createdAt"}},{"name":"sortOrder","in":"query","description":"Sort direction","required":false,"schema":{"$ref":"#/components/schemas/CampaignGetParametersSortOrder","default":"desc"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of campaigns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/campaigns_list_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create a campaign","description":"Create a campaign","tags":["Campaigns"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Campaign created successfully. Note: the response is the raw Mongoose document — `agentId`\nand `audienceId` are plain ObjectId strings here, not nested objects as returned by GET endpoints.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/campaigns_create_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the campaign"},"description":{"type":"string","description":"The description of the campaign"},"audienceId":{"type":"string","description":"The ID of the audience"},"agentId":{"type":"string","description":"The ID of the agent"},"phoneNumberIds":{"type":"array","items":{"type":"string"},"description":"Optional list of caller-ID phone number IDs to rotate across\nwhen placing outbound calls for this campaign. If omitted,\nthe agent's default phone number is used.\n"},"scheduledAt":{"type":"string","format":"date-time","description":"Optional ISO-8601 timestamp for when the campaign should\nstart dialing. Must be in the future. If provided, the\ncampaign is created in `scheduled` status; otherwise it\nstarts in `draft` status and must be started manually.\n"},"maxRetries":{"type":"integer","default":3,"description":"Maximum number of times a failed call is retried before the\nparticipant is marked as failed. `0` disables retries.\n"},"retryDelay":{"type":"integer","default":15,"description":"Delay in minutes between retry attempts for a failed call.\n"}},"required":["name","audienceId","agentId"]}}}}}},"/campaign/{id}":{"get":{"operationId":"get","summary":"Get a campaign","description":"Get a campaign with detailed metrics","tags":["Campaigns"],"parameters":[{"name":"id","in":"path","description":"The ID of the campaign","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaign details with metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/campaigns_get_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"delete","summary":"Delete a campaign","description":"Delete a campaign","tags":["Campaigns"],"parameters":[{"name":"id","in":"path","description":"The ID of the campaign","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaign deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/campaigns_delete_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/campaign/{id}/start":{"post":{"operationId":"start-or-resume","summary":"Start or resume a campaign","description":"Queues the campaign for processing and returns immediately — the campaign is **not** yet\nrunning when the 202 is returned. Poll `GET /campaign/{id}` and watch for `status: \"running\"`.\n\nThis endpoint also acts as a **resume** endpoint: if the campaign is currently paused,\ncalling this endpoint resumes it (`status` transitions from `paused` → `running`).\n","tags":["Campaigns"],"parameters":[{"name":"id","in":"path","description":"The ID of the campaign","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Campaign queued for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/campaigns_start_or_resume_Response_202"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Campaign not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/campaign/{id}/pause":{"post":{"operationId":"pause","summary":"Pause a campaign","description":"Queues a pause task and returns immediately — the campaign is **not** immediately paused.\nPoll `GET /campaign/{id}` and watch for `status: \"paused\"`.\n","tags":["Campaigns"],"parameters":[{"name":"id","in":"path","description":"The ID of the campaign","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pause task queued successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/campaigns_pause_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledgebase":{"get":{"operationId":"list","summary":"Get all knowledge bases","description":"Get all knowledge bases","tags":["knowledgeBase"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of knowledge bases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_base_list_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create a knowledge base","description":"Create a knowledge base","tags":["knowledgeBase"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Knowledge base created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_base_create_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the knowledge base (1–40 characters, trimmed)"},"description":{"type":"string"}},"required":["name"]}}}}}},"/knowledgebase/{id}":{"get":{"operationId":"get","summary":"Get a knowledge base","description":"Get a knowledge base","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"The ID of the knowledge base","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A knowledge base","content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_base_get_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Knowledge base not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"update-a-knowledge-base-name-description","summary":"Update a knowledge base (name + description)","description":"Updates the metadata of a knowledge base. **Note**: the platform uses `POST` (not `PATCH`) on this path — preserved here as-is.\n\nOnly `name` and `description` are mutable through this endpoint. To add or remove content (files, URLs, text snippets), use the items endpoints.\n","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"24-char hex ObjectId of the knowledge base.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Knowledge base updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_updateAKnowledgeBaseNameDescription_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Knowledge base not found in your organization.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name. 1–40 characters; trimmed server-side."},"description":{"type":"string","description":"Optional free-text description shown in the dashboard."}},"required":["name"]}}}}},"delete":{"operationId":"delete","summary":"Delete a knowledge base","description":"Delete a knowledge base.\n\n**400 is returned when the knowledge base is still linked to an agent:**\n`\"This knowledge base is connected to an agent. Please detach it from the agent before deleting.\"`\nDetach the KB from all agents (via agent config) before attempting deletion.\n","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"The ID of the knowledge base","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Knowledge base deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_base_delete_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Knowledge base not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledgebase/{id}/items":{"get":{"operationId":"get-all-knowledge-base-items","summary":"Get all knowledge base items","description":"Get all knowledge base items","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"The ID of the knowledge base","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of knowledge base items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_getAllKnowledgeBaseItems_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledgebase/{knowledgeBaseId}/items/{knowledgeBaseItemId}":{"delete":{"operationId":"delete-a-knowledge-base-item","summary":"Delete a knowledge base item","description":"Delete a knowledge base item","tags":["knowledgeBase"],"parameters":[{"name":"knowledgeBaseId","in":"path","description":"The ID of the knowledge base","required":true,"schema":{"type":"string"}},{"name":"knowledgeBaseItemId","in":"path","description":"The ID of the knowledge base item","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Knowledge base item deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_deleteAKnowledgeBaseItem_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledgebase/{id}/items/upload-media":{"post":{"operationId":"upload-a-pdf-file-to-a-knowledge-base","summary":"Upload a PDF file to a knowledge base","description":"Upload a PDF file to a knowledge base. Only PDF files are accepted (validated by MIME type and extension).\n\n**400 is returned for billing/entitlement failures before the file is processed:**\n- `\"Insufficient credits for KB storage upload.\"` — account lacks upload credits\n- `\"KB storage access is not enabled for your account.\"` — plan doesn't include KB storage\n\nNo application-level file size limit is enforced — any proxy or infrastructure limits (e.g. nginx) apply instead.\n","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"The ID of the knowledge base","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Knowledge base item created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_uploadAPdfFileToAKnowledgeBase_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"media":{"type":"string","format":"binary"}},"required":["media"]}}}}}},"/knowledgebase/get-presigned-url":{"post":{"operationId":"get-a-presigned-s-3-url-for-direct-file-upload","summary":"Get a presigned S3 URL for direct file upload","description":"Two-step file upload flow that bypasses Atoms' API for the file bytes themselves — useful when files exceed the multipart upload limit on `POST /knowledgebase/{id}/items/upload-media` or when you want to upload from the browser without round-tripping through your backend.\n\n**Step 1**: Call this endpoint with file metadata. Atoms returns a presigned URL + a storage `key`.\n**Step 2**: `PUT` the file bytes directly to the presigned URL (set `Content-Type` to the same value you sent here).\n**Step 3**: Call [`POST /knowledgebase/compelete-file-upload`](#operation/completeKnowledgeBaseFileUpload) with the same `key` to commit the upload and start processing.\n\nSame end result as `POST /knowledgebase/{id}/items/upload-media`, just without the multipart-through-our-API hop.\n","tags":["knowledgeBase"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Presigned URL ready — upload directly to it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_getAPresignedS3UrlForDirectFileUpload_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","description":"Original filename — used for display in the Atoms dashboard. Doesn't have to match the S3 key."},"fileSize":{"type":"integer","description":"Size in bytes. Atoms uses this to enforce per-file limits before issuing the URL."},"contentType":{"type":"string","description":"MIME type. You must send this EXACT value as `Content-Type` on the subsequent PUT to the presigned URL."},"knowledgeBaseId":{"type":"string","description":"24-char hex ObjectId of the target knowledge base (from `GET /knowledgebase`)."}},"required":["fileName","fileSize","contentType","knowledgeBaseId"]}}}}}},"/knowledgebase/compelete-file-upload":{"post":{"operationId":"complete-a-presigned-url-upload-and-start-processing","summary":"Complete a presigned-URL upload and start processing","description":"Step 3 of the presigned-URL upload flow. Commits a file that was uploaded directly to S3 via `POST /knowledgebase/get-presigned-url`, registers it as a knowledge-base item, and triggers async processing.\n\n**Note**: The path includes `compelete` (sic) — that's the actual route name on the platform. Don't fix the spelling in your client; it's a stable URL.\n","tags":["knowledgeBase"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File registered as a knowledge-base item. Processing runs async — poll `GET /knowledgebase/{id}/items` for the item to surface with the desired processing status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_completeAPresignedUrlUploadAndStartProcessing_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","description":"Filename — pass the same value used in `get-presigned-url`."},"contentType":{"type":"string"},"knowledgeBaseId":{"type":"string","description":"Target knowledge base ID."},"key":{"type":"string","description":"S3 storage key returned by `get-presigned-url`."},"fileSize":{"type":"integer"}},"required":["fileName","contentType","knowledgeBaseId","key","fileSize"]}}}}}},"/knowledgebase/get-sitemap-urls":{"post":{"operationId":"extract-sitemap-urls","summary":"Extract URLs from a sitemap.xml","description":"Fetches a website's `sitemap.xml`, parses it, and returns the list of URLs inside. Use this before calling `POST /knowledgebase/{id}/scrape-urls` to let the customer pick which URLs they actually want indexed.\n\nReturns `422` if the URL doesn't return a fetchable sitemap or if the XML is malformed.\n","tags":["knowledgeBase"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Extracted URLs, ready to be filtered + passed to `/scrape-urls`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_base_extract_sitemap_urls_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Knowledge base not found in your organization.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Could not fetch sitemap, or the sitemap XML is malformed.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteUrl":{"type":"string","format":"uri","description":"URL of the sitemap.xml file (or a homepage that links to one)."},"knowledgeBaseId":{"type":"string","description":"Target knowledge base ID — used for ownership validation only. The endpoint doesn't write any URLs at this stage."}},"required":["siteUrl","knowledgeBaseId"]}}}}}},"/knowledgebase/{id}/scrape-urls":{"post":{"operationId":"scrape-urls","summary":"Scrape a list of URLs into a knowledge base","description":"Adds one or more URLs to a knowledge base by scraping each page's content, chunking it, and indexing for retrieval. Typical flow:\n\n1. Discover candidate URLs (`POST /knowledgebase/get-sitemap-urls` or paste your own list).\n2. Call this endpoint with the curated list — scraping runs async.\n3. Poll `GET /knowledgebase/{id}/scraped-urls` for the per-URL status.\n\nReturns `400` if your account's KB billing precheck fails (quota or plan limits). Returns `404` if the KB doesn't belong to your organization.\n","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"24-char hex ObjectId of the target knowledge base.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Scrape job(s) queued. Poll `/scraped-urls` for per-URL status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_base_scrape_urls_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Knowledge base not found in your organization.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"}}},"required":["urls"]}}}}}},"/knowledgebase/{id}/scraped-urls":{"get":{"operationId":"list-scraped-ur-ls-in-a-knowledge-base-their-status","summary":"List scraped URLs in a knowledge base + their status","description":"Returns every URL added to the knowledge base via `POST /knowledgebase/{id}/scrape-urls`, with its current scrape/index status. Poll this after kicking off a scrape job to track progress.\n","tags":["knowledgeBase"],"parameters":[{"name":"id","in":"path","description":"24-char hex ObjectId of the knowledge base.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_listScrapedUrLsInAKnowledgeBaseTheirStatus_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledgebase/{knowledgeBaseId}/scraped-urls/{knowledgeBaseScrapedUrlsId}":{"delete":{"operationId":"delete-a-scraped-url-from-a-knowledge-base","summary":"Delete a scraped URL from a knowledge base","description":"Removes a previously-scraped URL (and its indexed content) from the knowledge base. Permanent — there is no undo.\n","tags":["knowledgeBase"],"parameters":[{"name":"knowledgeBaseId","in":"path","description":"24-char hex ObjectId of the knowledge base.","required":true,"schema":{"type":"string"}},{"name":"knowledgeBaseScrapedUrlsId","in":"path","description":"24-char hex ObjectId of the scraped-URL row to delete (from `GET /{id}/scraped-urls`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"URL removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Knowledge Base_deleteAScrapedUrlFromAKnowledgeBase_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/phone-numbers":{"get":{"operationId":"list","summary":"Get acquired phone numbers","description":"Retrieve all platform-purchased telephony numbers (Twilio/Plivo) for the organization.\n\n**Note:** Imported SIP numbers added via `POST /product/import-phone-number` are **not** included\nin this response — they are stored as a separate product type and returned by a different internal call.\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/phone_numbers_list_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/all-numbers":{"get":{"operationId":"list-all-phone-numbers-platform-sip","summary":"List all phone numbers (platform + SIP)","description":"Returns every phone number owned by the organization in one response:\n\n- `telephonyProducts` — numbers rented via the Atoms platform (Plivo / Twilio).\n- `customProducts` — numbers imported via [`POST /product/import-phone-number`](#operation/importSipPhoneNumber) with your own SIP trunks.\n\nUse this when you need a single combined view (e.g. a \"Pick a number\" dropdown). To list only platform-rented numbers, use [`GET /product/phone-numbers`](#operation/getAcquiredPhoneNumbers).\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone Numbers_listAllPhoneNumbersPlatformSip_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/get-available-numbers":{"get":{"operationId":"search-rentable","summary":"Search rentable phone numbers in inventory","description":"Searches the telephony provider's inventory for available numbers matching the requested country (and optional area code). Returns up to 5 candidates per call.\n\nUse the returned `phoneNumber` value in [`POST /product/rent-number`](#operation/rentPhoneNumber) to actually rent it.\n","tags":["phoneNumbers"],"parameters":[{"name":"countryCode","in":"query","description":"ISO 3166-1 alpha-2 country code (e.g. `US`, `IN`, `GB`).","required":true,"schema":{"type":"string"}},{"name":"provider","in":"query","description":"Telephony provider to search.","required":true,"schema":{"$ref":"#/components/schemas/ProductGetAvailableNumbersGetParametersProvider"}},{"name":"areaCode","in":"query","description":"Optional area-code / region filter — provider-dependent (US area codes for plivo/twilio, etc.).","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/phone_numbers_search_rentable_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/proration-amount":{"get":{"operationId":"preview-prorated-rental-cost-for-renting-a-phone-number-today","summary":"Preview prorated rental cost for renting a phone number today","description":"Returns the immediate prorated charge for renting one phone number from today through the end of the current billing cycle, plus the recurring monthly rate. Use this to show a \"you'll be charged $X today\" preview before calling [`POST /product/rent-number`](#operation/rentPhoneNumber).\n\nReturns `400` if the organization doesn't have the phone-numbers feature configured (contact support) or if the org is currently locked (e.g. unpaid invoices — call [`GET /product/unpaid-invoices`](#operation/getUnpaidInvoices) first to check).\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone Numbers_previewProratedRentalCostForRentingAPhoneNumberToday_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/rent-number":{"post":{"operationId":"rent","summary":"Rent a phone number from the telephony inventory","description":"Rents an available number returned by [`GET /product/get-available-numbers`](#operation/searchAvailablePhoneNumbers). Charges the organization the prorated amount returned by [`GET /product/proration-amount`](#operation/getProrationAmount) immediately, then the monthly rate on each billing cycle.\n\nAlways call `GET /product/proration-amount` first to surface the immediate charge to your customer. The endpoint may return `200` with a body containing `requiresAction: true` when payment requires customer interaction (3-D Secure, etc.) — handle that branch in your client.\n\nReleased later via [`POST /product/release-number`](#operation/releasePhoneNumber).\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rental processed. Inspect `data.requiresAction` to determine whether the customer needs to complete a payment-method action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/phone_numbers_rent_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"The number to rent — exactly as returned by `GET /product/get-available-numbers` (no leading `+`)."},"provider":{"$ref":"#/components/schemas/ProductRentNumberPostRequestBodyContentApplicationJsonSchemaProvider"}},"required":["phoneNumber","provider"]}}}}}},"/product/release-number":{"post":{"operationId":"release","summary":"Release a rented phone number","description":"Releases a phone number previously rented via `POST /product/rent-number`. The number goes back into provider inventory and recurring charges stop.\n\nReturns `400` if the number is still assigned to an agent — detach it from the agent first (`PATCH /agent/{agentId}` with `productId: null`).\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Number released","content":{"application/json":{"schema":{"$ref":"#/components/schemas/phone_numbers_release_Response_200"}}}},"400":{"description":"Number is still assigned to an agent (detach it first), or invalid product ID format.\n","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","description":"24-char hex MongoDB ObjectId of the phone-number product to release (the `_id` value returned by `GET /product/phone-numbers`)."}},"required":["productId"]}}}}}},"/product/manage-subscription":{"get":{"operationId":"get-stripe-customer-portal-url","summary":"Get Stripe Customer Portal URL","description":"Returns a time-limited Stripe Customer Portal URL the user can open to manage their subscription (update payment method, view invoices, etc.). Returns an empty object if the organization isn't on a Stripe-backed plan.\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone Numbers_getStripeCustomerPortalUrl_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/unpaid-invoices":{"get":{"operationId":"check-whether-the-organization-has-unpaid-invoices","summary":"Check whether the organization has unpaid invoices","description":"Returns whether the org has unpaid invoices that would block destructive actions (renting numbers, etc.). Call this before any billable mutation to surface the \"Pay outstanding balance\" flow.\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone Numbers_checkWhetherTheOrganizationHasUnpaidInvoices_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/product/import-phone-number":{"post":{"operationId":"import-sip","summary":"Import a SIP phone number","description":"Bring your own SIP trunk by importing an existing phone number with its SIP termination URL.\nAtoms creates both inbound and outbound SIP trunks so your number works for making and receiving calls through the platform.\n\nIf `name` is omitted, a name is auto-generated from the phone number and user ID.\n","tags":["phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Phone number imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/phone_numbers_import_sip_Response_200"}}}},"400":{"description":"Bad request — missing required fields or phone number already imported.\nExact error when a duplicate number is submitted: `\"Number already present\"`\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportASipPhoneNumberRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"Your existing phone number. E.164 format is recommended but not enforced server-side — any non-empty string is accepted."},"sipTerminationUrl":{"type":"string","description":"The SIP URI where calls should be routed to your infrastructure"},"name":{"type":"string","description":"A friendly display name for this number"},"sipUsername":{"type":"string","description":"Username for SIP authentication (if your trunk requires it)"},"sipPassword":{"type":"string","description":"Password for SIP authentication (if your trunk requires it)"}},"required":["phoneNumber","sipTerminationUrl"]}}}}}},"/webhook":{"get":{"operationId":"get-webhooks","summary":"Get webhooks","description":"Retrieve all webhooks for the organization or a specific webhook by ID","tags":["webhooks"],"parameters":[{"name":"webhookId","in":"query","description":"Optional MongoDB ObjectId (24-char hex) of a specific webhook to retrieve. If omitted, returns all webhooks for the organization.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_getWebhooks_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create a webhook","description":"Create a new webhook with subscriptions for specific agents and events.\n\n**400 is also returned when the endpoint URL is already registered:**\n`\"A webhook with this URL has already been registered\"`\n","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Webhook created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_create_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","description":"The webhook endpoint URL"},"description":{"type":"string","description":"The description of the webhook"},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookPostRequestBodyContentApplicationJsonSchemaEventsItems"},"description":"Array of events to subscribe to"}},"required":["endpoint","description","events"]}}}}}},"/webhook/{id}":{"delete":{"operationId":"delete","summary":"Delete a webhook","description":"Delete a webhook by its ID.\n\n**400 is returned when the webhook still has active agent subscriptions:**\n`\"Cannot delete webhook: It is currently assigned to one or more agents. Please remove all agent assignments first.\"`\nCall `DELETE /agent/{agentId}/webhook-subscriptions` for each assigned agent before deleting.\n\n**400 is also returned for an invalid webhook ID format:**\n`\"The provided Webhook ID is invalid.\"`\n","tags":["webhooks"],"parameters":[{"name":"id","in":"path","description":"The ID of the webhook to delete","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_delete_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAWebhookRequestNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{agentId}/webhook-subscriptions":{"get":{"operationId":"get-webhook-subscriptions-for-an-agent","summary":"Get webhook subscriptions for an agent","description":"Retrieve webhook subscriptions for a given agent ID","tags":["webhooks"],"parameters":[{"name":"agentId","in":"path","description":"The ID of the agent","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_getWebhookSubscriptionsForAnAgent_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookSubscriptionsForAnAgentRequestNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"replace-webhook-subscriptions-for-an-agent","summary":"Replace webhook subscriptions for an agent","description":"**Replaces** all existing webhook subscriptions for the agent with the provided event types.\nAny previously configured subscriptions for this agent are deleted before the new ones are created.\nTo add subscriptions without removing existing ones, retrieve current subscriptions first and include them in the request.\n","tags":["webhooks"],"parameters":[{"name":"agentId","in":"path","description":"The ID of the agent to create subscriptions for","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Subscriptions created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_replaceWebhookSubscriptionsForAnAgent_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceWebhookSubscriptionsForAnAgentRequestNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"$ref":"#/components/schemas/AgentAgentIdWebhookSubscriptionsPostRequestBodyContentApplicationJsonSchemaEventTypesItems"},"description":"Array of event types to subscribe to"},"webhookId":{"type":"string","description":"The ID of the webhook to subscribe to"}},"required":["eventTypes","webhookId"]}}}}},"delete":{"operationId":"delete-webhook-subscriptions-for-an-agent","summary":"Delete webhook subscriptions for an agent","description":"Deletes **all** webhook subscriptions for the agent, regardless of which webhook they belong to.\nIf the agent has subscriptions across multiple webhooks, all of them are removed in a single call.\n","tags":["webhooks"],"parameters":[{"name":"agentId","in":"path","description":"The ID of the agent to filter subscriptions by","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Subscriptions deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_deleteWebhookSubscriptionsForAnAgent_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWebhookSubscriptionsForAnAgentRequestNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/integration/modify-webengage-integration":{"post":{"operationId":"modify-web-engage-integration","summary":"Create or update WebEngage integration","description":"Creates or updates the WebEngage integration for the organization. Replaces the existing integration configuration with the provided credential set(s).\n\n**Note:** This endpoint returns a direct JSON response — not the standard `{ success, data }` wrapper used by other endpoints.\n","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Integration created or updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_modifyWebEngageIntegration_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"integrationSets":{"type":"array","items":{"$ref":"#/components/schemas/WebEngageIntegrationSet"},"description":"One or more WebEngage credential sets"}},"required":["integrationSets"]}}}}}},"/integration/get-webengage-details":{"get":{"operationId":"get-web-engage-details","summary":"Get WebEngage integration details","description":"Returns the current WebEngage integration configuration for the organization.\n\n**Note:** This endpoint returns a direct JSON response — not the standard `{ success, data }` wrapper used by other endpoints.\n","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"WebEngage integration details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_getWebEngageDetails_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/audience":{"get":{"operationId":"list","summary":"Get all audiences","description":"Retrieve all audiences created by the authenticated user. Users can only access audiences they have created.","tags":["Audience"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved audiences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audience_list_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create-audience-with-csv-upload","summary":"Create audience with CSV upload","description":"Create a new audience by uploading a CSV file containing phone numbers.\nOnly CSV text files are accepted — binary files will produce malformed data.\n\n**Additional 400 cases:**\n- Duplicate phone numbers in the CSV: `\"Some phone numbers in your CSV already exist in this audience. Please remove duplicate entries and try again.\"`\n- Member limit exceeded: `\"Audience cannot exceed X members\"`\n","tags":["Audience"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Audience created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience_createAudienceWithCsvUpload_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAudienceWithCsvUploadRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"Optional description of the audience"},"phoneNumberColumnName":{"type":"string","description":"The name of the column in the CSV that contains phone numbers"},"identifierColumnName":{"type":"string","description":"The name of the column in the CSV that contains identifiers (e.g., names)"},"file":{"type":"string","format":"binary","description":"CSV file containing phone numbers and identifiers (max 5MB)"}},"required":["name","phoneNumberColumnName","file"]}}}}}},"/audience/{id}":{"get":{"operationId":"get","summary":"Get audience by ID","description":"Retrieve a specific audience by its ID.\nNote: if the audience belongs to a different organization, the API returns 404 (not 403) — ownership is deliberately obscured.\n","tags":["Audience"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the audience","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved audience","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audience_get_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAudienceByIdRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Audience not found (also returned when audience belongs to a different organization)","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"delete-audience","summary":"Delete audience","description":"Delete a specific audience by its ID. Users can only delete audiences they created.\n\n**400 is returned if the audience is used by an active campaign:**\n`\"can't delete audience, campaign with this audience <id> exists\"`\nRemove the campaign first, then retry deletion.\n\nOn success, `data` is always an empty array `[]`.\n","tags":["Audience"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the audience to delete","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Audience deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience_deleteAudience_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAudienceRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Audience not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/audience/{id}/members":{"get":{"operationId":"get-audience-members","summary":"Get audience members","description":"Retrieve members of a specific audience with pagination support. Users can only access members of audiences they created.","tags":["Audience"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the audience","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number for pagination (default is 1)","required":false,"schema":{"type":"integer","default":1}},{"name":"offset","in":"query","description":"Number of items per page (default is 5).\nNote: this parameter is named \"offset\", not \"limit\" — sending ?limit=N is silently ignored.\n","required":false,"schema":{"type":"integer","default":5}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved audience members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience_getAudienceMembers_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAudienceMembersRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden — audience belongs to a different organization","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"Audience not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAudienceMembersRequestInternalServerError"}}}}}},"post":{"operationId":"add-audience-members","summary":"Add audience members","description":"Add new members to an existing audience.\n\nEach member object must include a key matching the audience's `phoneNumberColumnName`.\nIf it's missing, the API returns 400: `\"Each member must have a <phoneNumberColumnName> field\"`.\nAdding members that would exceed the audience limit also returns 400.\n\nNote: if the audience belongs to a different organization, the API returns 404 (not 403).\n","tags":["Audience"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the audience","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Members added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience_addAudienceMembers_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAudienceMembersRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Audience not found (also returned when audience belongs to a different organization)","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AudienceIdMembersPostRequestBodyContentApplicationJsonSchemaMembersItems"},"description":"Array of member objects with dynamic structure based on audience configuration"}},"required":["members"]}}}}},"delete":{"operationId":"delete-audience-members","summary":"Delete audience members","description":"Remove specific members from an audience by their member IDs. Users can only delete members from audiences they created.","tags":["Audience"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the audience","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Members deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience_deleteAudienceMembers_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAudienceMembersRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Audience not found (also returned when audience belongs to a different organization)","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"memberIds":{"type":"array","items":{"type":"string"},"description":"Array of member IDs to delete"}},"required":["memberIds"]}}}}}},"/audience/{id}/members/search":{"get":{"operationId":"search-audience-members","summary":"Search audience members","description":"Search for members within a specific audience using flexible search parameters. Users can only search members of audiences they created.\n\n**Search Types:**\n- **General Search** (`query`): Searches across all fields in the audience member data\n- **Field-Specific Search**: Use any field name as a parameter (e.g., `firstName=john`, `phoneNumber=123456`, `email=test@example.com`)\n\n**Examples:**\n- `?query=john` - General search across all fields\n- `?firstName=john` - Search specifically in firstName field\n- `?phoneNumber=555-1234` - Search specifically in phoneNumber field\n- `?firstName=john&lastName=doe` - Search for members matching both criteria\n\n**Note:** When using phoneNumber field, do not use quotes around the phone number. You can use either a general search OR field-specific searches, but not both simultaneously.\n","tags":["Audience"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the audience","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","description":"General search term that searches across all fields in audience member data","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Search results returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience_searchAudienceMembers_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAudienceMembersRequestBadRequestError"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Audience not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAudienceMembersRequestInternalServerError"}}}}}}},"/analytics/call-counts-log":{"get":{"operationId":"get-call-counts-log","summary":"List call records","description":"Paginated listing of call records for the organization, with optional filtering by agent, campaign, call type, and date range.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"page","in":"query","description":"Page number (default 1)","required":false,"schema":{"type":"integer","default":1}},{"name":"limit","in":"query","description":"Records per page (default 10)","required":false,"schema":{"type":"integer","default":10}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated call records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getCallCountsLog_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/call-counts-by-day":{"get":{"operationId":"get-call-counts-by-day","summary":"Call counts by day","description":"Returns call counts aggregated per calendar day, suitable for bar chart visualizations.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Daily call counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getCallCountsByDay_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/conversation-details/{callId}":{"get":{"operationId":"get-conversation-details","summary":"Get conversation details","description":"Returns the full transcript and event stream for a specific call, reconstructed from ClickHouse event data.","tags":["analytics"],"parameters":[{"name":"callId","in":"path","description":"Unique identifier for the call","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call transcript and events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getConversationDetails_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Call log not found or does not belong to the organization","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/usage/timeseries":{"get":{"operationId":"get-usage-timeseries","summary":"Credit usage timeseries","description":"Returns daily credit usage over a date range.","tags":["analytics"],"parameters":[{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Daily credit usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getUsageTimeseries_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/dashboard":{"get":{"operationId":"get-dashboard","summary":"Full dashboard data","description":"Batched endpoint that fetches all dashboard panels in a single request by running six sub-queries in parallel. Equivalent to calling `summary`, `call-volume-timeseries`, `call-outcomes-timeseries`, `pickup-rate-by-number`, `hourly-performance`, and `duration-stats` individually. Each field may be absent if that sub-query failed; partial data is still returned.\n","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"All dashboard panel data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getDashboard_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/summary":{"get":{"operationId":"get-analytics-summary","summary":"Dashboard summary KPIs","description":"Returns high-level KPI metrics with current period value, previous period value, and percent change for trend comparison.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"KPI summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getAnalyticsSummary_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/call-volume-timeseries":{"get":{"operationId":"get-call-volume-timeseries","summary":"Call volume timeseries","description":"Returns daily call volume broken down by outcome (answered, no-answer, failed, cancelled) over the selected period.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Daily call volume by outcome","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getCallVolumeTimeseries_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/pickup-rate-by-number":{"get":{"operationId":"get-pickup-rate-by-number","summary":"Pickup rate by phone number","description":"Returns pickup rate and call volume broken down per originating phone number.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Per-number pickup rate and call volume","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getPickupRateByNumber_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/phone-number-trends":{"get":{"operationId":"get-phone-number-trends","summary":"Phone number trends","description":"Returns per-phone-number call volume and pickup rate as a daily timeseries, useful for spotting number-level degradation over time.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Per-number daily timeseries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getPhoneNumberTrends_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/hourly-performance":{"get":{"operationId":"get-hourly-performance","summary":"Hourly performance","description":"Returns call volume and performance metrics broken down by hour of day (0–23), aggregated across the selected date range.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Hourly performance breakdown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getHourlyPerformance_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/call-outcomes-timeseries":{"get":{"operationId":"get-call-outcomes-timeseries","summary":"Call outcomes timeseries","description":"Returns a daily breakdown of call outcomes (answered, no-answer, failed, cancelled) over time, plus totals for the entire period.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Daily call outcomes and period totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getCallOutcomesTimeseries_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/duration-stats":{"get":{"operationId":"get-duration-stats","summary":"Call duration statistics","description":"Returns call duration statistics including average, median, p90, p95 percentiles, and the proportion of short vs. long calls.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Duration statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getDurationStats_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/weekly-trends":{"get":{"operationId":"get-weekly-trends","summary":"Weekly call trends","description":"Returns per-week call performance metrics including volume, pickup rate, and duration percentiles (p50, p90). Each week starts on Monday.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Weekly performance metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getWeeklyTrends_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/agent-performance":{"get":{"operationId":"get-agent-performance","summary":"Agent performance","description":"Returns per-agent call performance metrics. Supports sorting and limiting results.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"sortBy","in":"query","description":"Field to sort by (e.g. `totalCalls`, `pickupRate`, `avgDuration`)","required":false,"schema":{"type":"string"}},{"name":"sortOrder","in":"query","description":"Sort direction","required":false,"schema":{"$ref":"#/components/schemas/AnalyticsAgentPerformanceGetParametersSortOrder"}},{"name":"limit","in":"query","description":"Maximum number of agents to return","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Per-agent performance metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getAgentPerformance_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/concurrency":{"get":{"operationId":"get-analytics-concurrency","summary":"Concurrent call counts","description":"Returns minute-by-minute concurrent call counts for a specific day. Optionally broken down per agent.","tags":["analytics"],"parameters":[{"name":"date","in":"query","description":"Date to query (YYYY-MM-DD)","required":true,"schema":{"type":"string","format":"date"}},{"name":"agentId","in":"query","description":"Filter to a specific agent","required":false,"schema":{"type":"string"}},{"name":"includeAgents","in":"query","description":"Pass `true` to include a per-agent breakdown in the response","required":false,"schema":{"$ref":"#/components/schemas/AnalyticsConcurrencyGetParametersIncludeAgents"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Minute-level concurrency data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getAnalyticsConcurrency_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/call-start-distribution":{"get":{"operationId":"get-call-start-distribution","summary":"Call start distribution","description":"Returns the distribution of call start times as minute-level buckets for a specific day, showing when calls were initiated throughout the day.","tags":["analytics"],"parameters":[{"name":"date","in":"query","description":"Date to query (YYYY-MM-DD)","required":true,"schema":{"type":"string","format":"date"}},{"name":"agentId","in":"query","description":"Filter to a specific agent","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Minute-level call start distribution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getCallStartDistribution_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/daily-call-summary":{"get":{"operationId":"get-daily-call-summary","summary":"Daily call summary","description":"Returns an aggregate call summary for a specific day. Live in-progress and in-queue counts are merged from real-time data on top of the historical data.","tags":["analytics"],"parameters":[{"name":"date","in":"query","description":"Date to query (YYYY-MM-DD)","required":true,"schema":{"type":"string","format":"date"}},{"name":"agentId","in":"query","description":"Filter to a specific agent","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Daily call summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getDailyCallSummary_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/analytics/attempt-cohort":{"get":{"operationId":"get-attempt-cohort","summary":"Attempt cohort analysis","description":"Returns cohort analysis of call attempt numbers, showing how pickup rate changes across the 1st, 2nd, 3rd (etc.) attempts to reach the same number, including cumulative rates and marginal gain per additional attempt.","tags":["analytics"],"parameters":[{"name":"agentId","in":"query","description":"Comma-separated agent IDs to filter results","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID to filter results","required":false,"schema":{"type":"string"}},{"name":"callType","in":"query","description":"Type of call to filter (e.g. `inbound`, `outbound`)","required":false,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","description":"End of date range (ISO 8601)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Attempt cohort data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics_getAttemptCohort_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/disposition-metric-templates":{"get":{"operationId":"list-disposition-metric-templates","summary":"List disposition metric templates","description":"Returns all available disposition metric templates. These reusable definitions are used to populate the post-call analytics metric picker when configuring an agent's `postCallAnalyticsConfig`. Only a user token is required — no organization context needed.\n","tags":["dispositionMetricTemplates"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Array of disposition metric templates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Disposition Metric Templates_listDispositionMetricTemplates_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/conversation/register-call":{"post":{"operationId":"register-call","summary":"Register a realtime agent call","description":"Mint a **short-lived, single-use access token** for opening a realtime\n[Agent WebSocket](/atoms/api-reference/api-reference/realtime-agent/realtime-agent)\nconnection. This is the **recommended** way to start a session from a\nbrowser or other client-side app: your API key stays server-side, and\nthe browser only ever sees the short-lived token. (Server-side or\ntrusted clients may instead connect to the WebSocket with a raw API key\ndirectly.)\n\nFlow:\n1. Call this endpoint with your API key and the `agent_id` (plus optional\n   `mode` and per-call `variables`). All session configuration is fixed\n   here — it is baked into the returned token.\n2. Open a WebSocket to `wss://api.smallest.ai/atoms/v1/agent/connect?token=<access_token>`.\n   No `agent_id`, `mode`, or `variables` query params are needed on the\n   WebSocket — they come from the token.\n\nThe token is valid for `expires_in` seconds (30) and can be used for a\nsingle connection. Request a fresh token for each connection.\n","tags":["realtime"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Access token created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime_register_call_Response_201"}}}},"400":{"description":"Validation failed (e.g. missing `agent_id`), or the organization has\nno remaining credits.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Resource not found — the referenced ID does not exist or does not belong to the caller's organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterARealtimeAgentCallRequestNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"The Atoms agent to connect to."},"mode":{"$ref":"#/components/schemas/ConversationRegisterCallPostRequestBodyContentApplicationJsonSchemaMode","default":"webcall","description":"Session mode. `webcall` = full voice pipeline (audio in +\naudio out). `chat` = text-only pipeline. Defaults to `webcall`.\n"},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ConversationRegisterCallPostRequestBodyContentApplicationJsonSchemaVariables"},"description":"Per-call prompt variables that override the agent's\n`defaultVariables` for this session only. Values must be\n`string`, `number`, or `boolean`. Reserved system-variable\nkeys (`call_id`, `conversation_type`, `agent_number`,\n`user_number`, `current_date`, `current_time`, `current_day`,\n`agent_gender`, `default_language`, `supported_languages`,\n`timezone`) are populated by the server and stripped if\nsupplied.\n"}},"required":["agent_id"]}}}}}},"/conversation/{callId}/recording/download-url":{"get":{"operationId":"get-a-time-limited-recording-download-url","summary":"Get a time-limited recording download URL","description":"Returns a presigned S3 URL for the call's recording. Hand the URL straight to the customer or pull bytes server-side. The presigned URL is **time-limited** — typically usable for a few minutes — so don't cache it; request a fresh one each time you need the recording.\n\nReturns `404` if the call has no recording (call hasn't started, was cancelled before audio captured, or was deleted by the platform's retention policy). Returns `400 Invalid call ID format` if you pass a Mongo `_id` instead of the `callId` string.\n","tags":["conversations"],"parameters":[{"name":"callId","in":"path","description":"The `callId` string for the conversation (e.g. `CALL-1778226705739-7e4c17`). This is the `callId` field returned by `GET /conversation`, **not** the Mongo `_id` — passing `_id` returns `400 Invalid call ID format`.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response — presigned URL ready to fetch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversations_getATimeLimitedRecordingDownloadUrl_Response_200"}}}},"400":{"description":"Invalid call ID format.","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"No recording found for this call.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/conversation/{callId}/retries":{"get":{"operationId":"list-retry-attempts","summary":"List retry attempts for a call","description":"Returns the **parent call** plus every retry attempt that branched from it, ordered by attempt index. Use this when a customer asks \"did the platform retry this call?\" — typically driven by an outbound agent's auto-retry configuration (`maxRetries`, `retryDelay`).\n\n- If the `callId` you pass is the original (parent), the response contains that parent plus all child retries.\n- If the `callId` you pass is itself a retry, the response still includes the parent and every sibling retry — the API resolves to the family root automatically.\n\nReturns `404` if no call exists with that ID in your organization.\n","tags":["conversations"],"parameters":[{"name":"callId","in":"path","description":"Any `callId` in the retry family (parent or any retry).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response — full retry family.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_list_retry_attempts_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Access denied — the call belongs to a different organization.","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"No call exists with that ID.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/conversation/cancel":{"post":{"operationId":"cancel","summary":"Cancel an in-flight call","description":"Cancels an outbound call that has been queued or is in progress. Use the body form to look the call up by `callId`; the path-param form (`POST /conversation/{callId}/cancel`) is the equivalent for REST conventions, but only handles `IN_QUEUE` calls.\n\nReturns `404` if no call with that ID exists in your organization. Returns `400` if the call is already in a terminal state (completed / failed / cancelled).\n","tags":["conversations"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_cancel_Response_200"}}}},"400":{"description":"Call is already in a terminal state and cannot be cancelled.","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"No call found with that callId in your organization.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string","description":"The `callId` returned by `POST /conversation/outbound` or visible in `GET /conversation`."},"reason":{"type":"string","description":"Optional free-text reason for cancellation. Logged for support / audit."}},"required":["callId"]}}}}}},"/conversation/{callId}/cancel":{"post":{"operationId":"cancel-queued","summary":"Cancel a queued call (path-param form)","description":"REST-conventional path-param variant of [`POST /conversation/cancel`](#operation/cancelCallByBody).\n\n**Behavior differs from the body form.** This path-param endpoint only cancels calls that are still in the `IN_QUEUE` state — calls that have already started dialing or are in progress return `400 Bad Request` with `errors: [\"Conversation with ID ... is not in queue and cannot be cancelled\"]`. Use the body form (`POST /conversation/cancel`) if you need to cancel an in-progress call.\n\nThe path param is the `callId` string (e.g. `CALL-1778226705739-7e4c17`), **not** the Mongo `_id`. Passing `_id` returns `404 No conversation found`.\n","tags":["conversations"],"parameters":[{"name":"callId","in":"path","description":"The `callId` string for the conversation to cancel.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Call cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_cancel_queued_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"No call found with that callId in your organization.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/events":{"get":{"operationId":"subscribe-to-live-events","summary":"Subscribe to live call events (SSE)","description":"Real-time streaming of user speech (STT) and agent speech (TTS) events for an active call via Server-Sent Events.\n\nThe connection is real-time — events stream directly from the call runtime as they are produced. The SSE connection auto-closes when the call ends (`sse_close` event). Only active calls can be subscribed to; completed calls return a 400 error.\n\n**Transcript event types:**\n\n- `user_interim_transcription` — Partial, in-progress transcription as the user speaks. Use for live preview only; will be superseded by `user_transcription`.\n- `user_transcription` — Final transcription for a completed user speech turn.\n- `tts_completed` — Fired when the agent finishes speaking a TTS segment. Includes the spoken text and optionally TTS latency.\n\n**Lifecycle events:**\n\n- `sse_init` — Sent immediately when the SSE connection is established.\n- `sse_close` — Sent when the call ends, right before the server closes the connection.\n\nOther event types (e.g. `tool_call_start`, `pre_call_api`, `agent_log`, metrics) are also sent on this stream.\n\n- `call_start`\n- `call_end`\n- `turn_latency`\n- `metrics`\n- `agent_node_state`\n- `hopping`\n- `knowledgebase`\n- `variable_extraction`\n- `pre_call_api`\n- `post_call_api`\n- `agent_error`\n- `agent_log`\n- `tool_call_start`\n- `tool_call_end`\n- `tool_call_error`\n- `call_cancelled`\n- `call_recording`\n","tags":["liveTranscripts"],"parameters":[{"name":"callId","in":"query","description":"The call ID to subscribe events for. Missing or invalid values return 400.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}},{"name":"X-Organization-Id","in":"header","description":"Required when using session-cookie auth. API-token auth may infer the organization from the token.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"SSE event stream established successfully","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/live_transcripts_subscribe_to_live_events_Response_200"}}}},"400":{"description":"Missing or invalid `callId`, missing or invalid organization header, or call is already completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token or session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"User is not a member of the organization or does not have member access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"404":{"description":"Organization not found, call log not found, or agent not found/org mismatch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/compliance/status":{"get":{"operationId":"get-compliance-status","summary":"Get compliance status","description":"Returns the current compliance status for a given country, number type, and user type.\nThis is the single endpoint the frontend uses to determine which step to render\n(form, submitted, accepted, rejected, expired, or suspended).\n","tags":["compliance"],"parameters":[{"name":"countryIso","in":"query","description":"ISO 3166-1 alpha-2 country code. Must be exactly 2 characters (e.g. \"IN\", \"US\"). Sending 3+ characters returns 400.\n","required":true,"schema":{"type":"string"}},{"name":"numberType","in":"query","description":"The type of phone number","required":true,"schema":{"$ref":"#/components/schemas/ComplianceStatusGetParametersNumberType"}},{"name":"userType","in":"query","description":"The type of end user","required":true,"schema":{"$ref":"#/components/schemas/ComplianceStatusGetParametersUserType"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Compliance status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compliance_getComplianceStatus_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}},"502":{"description":"Bad gateway — Plivo's compliance API returned an error or is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}}}}},"/compliance/requirements":{"get":{"operationId":"get-compliance-requirements","summary":"Get compliance requirements","description":"Discover what documents are required for a given country, number type, and user type.\nResults are cached for 1 hour. Returns an empty `documentTypes` array if no compliance\nis needed for the given combination.\n","tags":["compliance"],"parameters":[{"name":"countryIso","in":"query","description":"ISO 3166-1 alpha-2 country code. Must be exactly 2 characters (e.g. \"IN\", \"US\"). Sending 3+ characters returns 400.\n","required":true,"schema":{"type":"string"}},{"name":"numberType","in":"query","description":"The type of phone number","required":true,"schema":{"$ref":"#/components/schemas/ComplianceRequirementsGetParametersNumberType"}},{"name":"userType","in":"query","description":"The type of end user","required":true,"schema":{"$ref":"#/components/schemas/ComplianceRequirementsGetParametersUserType"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Requirements retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compliance_getComplianceRequirements_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}},"502":{"description":"Bad gateway — Plivo's compliance API returned an error or is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}}}}},"/compliance/applications":{"post":{"operationId":"submit","summary":"Submit a compliance application","description":"Submit a new compliance application with end-user details and supporting documents.\nOne application is allowed per organization per country per number type per user type.\n\nThe request uses `multipart/form-data` because documents are uploaded inline.\nThe `endUser` and `documents` fields are JSON strings embedded in the form data.\n","tags":["compliance"],"parameters":[{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Application submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/compliance_submit_Response_201"}}}},"400":{"description":"Validation error — invalid JSON, unsupported file type, or file count mismatch (`\"Expected X files, got Y\"`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"409":{"description":"A compliance application already exists for this country/numberType combination.\nExact message: `\"A compliance application already exists for {countryIso}/{numberType}. Status: {status}\"`\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}},"502":{"description":"Bad gateway — Plivo's compliance API returned an error or is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"countryIso":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"numberType":{"$ref":"#/components/schemas/ComplianceApplicationsPostRequestBodyContentMultipartFormDataSchemaNumberType","description":"The type of phone number"},"userType":{"$ref":"#/components/schemas/ComplianceApplicationsPostRequestBodyContentMultipartFormDataSchemaUserType","description":"The type of end user"},"endUser":{"type":"string","description":"JSON-stringified end-user details. `name` is required; all other fields are optional\nbut may be required by Plivo depending on country/numberType. Accepted fields:\n\n- `name` (required) — full name or business name\n- `lastName` — last name\n- `email` — email address\n- `addressLine1` — street address line 1\n- `addressLine2` — street address line 2\n- `city` — city\n- `state` — state or province\n- `postalCode` — postal/ZIP code\n- `country` — ISO country code; defaults to `countryIso` if omitted\n- `registrationNumber` — business registration number (required for some business applications)\n"},"documents":{"type":"string","description":"JSON string containing an array of document metadata. Each entry must have a\n`documentTypeId` (from the requirements endpoint) and optional `dataFields`.\nExample:\n```json\n[{\"documentTypeId\": \"dt_123\", \"dataFields\": {\"business_name\": \"Acme Corp\"}}]\n```\n"},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Document files in the same order as the `documents` metadata array.\nAccepted formats: PDF, JPEG, PNG. Maximum 5 MB per file, up to 10 files.\n"}},"required":["countryIso","numberType","userType","endUser","documents","files"]}}}}}},"/compliance/applications/{id}":{"patch":{"operationId":"resubmit","summary":"Resubmit a rejected compliance application","description":"Resubmit a previously rejected compliance application with corrected documents.\nOnly applications in `rejected` status can be resubmitted. All documents must be\nre-uploaded — partial updates are not supported.\n\nFile/document count must match exactly. Mismatch returns 400 with message `\"Expected X files, got Y\"`.\n","tags":["compliance"],"parameters":[{"name":"id","in":"path","description":"The compliance application ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Application resubmitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/compliance_resubmit_Response_200"}}}},"400":{"description":"Application is not in rejected status, file count mismatch, or other validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Application not found or does not belong to this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}},"502":{"description":"Bad gateway — Plivo's compliance API returned an error or is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"documents":{"type":"string","description":"JSON string containing an array of document metadata. Same format as\nthe create endpoint.\n"},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Replacement document files. Must match the length of the `documents` array.\nAccepted formats: PDF, JPEG, PNG. Maximum 5 MB per file.\n"}},"required":["documents","files"]}}}}}},"/compliance/applications/{id}/refresh":{"post":{"operationId":"refresh-compliance-application-status","summary":"Refresh compliance application status","description":"Manually poll Plivo for the latest status of a compliance application.\nUse this as a fallback when webhooks are delayed. The frontend enforces a\n60-second cooldown between refreshes.\n","tags":["compliance"],"parameters":[{"name":"id","in":"path","description":"The compliance application ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Application status refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compliance_refreshComplianceApplicationStatus_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Application not found or does not belong to this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}},"502":{"description":"Bad gateway — Plivo's compliance API returned an error or is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}}}}},"/agent/{id}/drafts":{"get":{"operationId":"list-active-drafts","summary":"List active drafts","description":"List all active (non-discarded) drafts for an agent.","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Drafts_listActiveDrafts_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"create-draft","summary":"Create a draft","description":"Create a new draft from an existing published version or another draft. At least one of sourceVersionId or sourceDraftId is required (both may be sent simultaneously).","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Draft created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_drafts_create_draft_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftRequest"}}}}}},"/agent/{id}/drafts/{draftId}":{"get":{"operationId":"get-draft-detail","summary":"Get draft detail","description":"Returns the latest revision of a draft along with its edit history.","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max number of edit history entries to return (1-100)","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Drafts_getDraftDetail_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"discard-draft","summary":"Discard a draft","description":"Discard (soft-delete) a draft. Only the draft creator or an admin can discard.","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Draft discarded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_drafts_discard_draft_Response_200"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned in two cases:\n- The caller is not the draft creator or an org admin\n- The agent uses workflow_graph and the org lacks conversational agents access\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"operationId":"rename-draft","summary":"Rename a draft","description":"Rename a draft. For config changes, use PATCH /agent/{id}/drafts/{draftId}/config instead.\n","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Draft renamed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_drafts_rename_draft_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"draftName":{"type":"string","description":"New name for the draft (1–100 characters)"}},"required":["draftName"]}}}}}},"/agent/{id}/drafts/{draftId}/diff":{"get":{"operationId":"get-draft-diff","summary":"Get draft diff","description":"Compare a draft against its source version or another specified version.","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"compareTo","in":"query","description":"Version ID to compare against. If omitted, compares against the source version.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Diff returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Drafts_getDraftDiff_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/drafts/{draftId}/publish":{"post":{"operationId":"publish-draft","summary":"Publish a draft","description":"Publish a draft as a new versioned release. Optionally activate it immediately.","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Draft published as a new version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_drafts_publish_draft_Response_201"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDraftRequest"}}}}}},"/agent/{id}/drafts/{draftId}/test-call":{"post":{"operationId":"test-call-with-draft-config","summary":"Test call with draft config","description":"Initiate a test call using the draft's resolved configuration.","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Test call initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Drafts_testCallWithDraftConfig_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallRequest"}}}}}},"/agent/{id}/drafts/{draftId}/config":{"patch":{"operationId":"update-draft-config","summary":"Edit draft config (prompt, tools, post-call metrics, voice, etc.)","description":"Update the configuration of a draft. This single endpoint is how every\nagent-level config field is changed: prompt, tools, voice, language,\n**post-call analytics (disposition metrics)**, and more. There is no\nstandalone post-call-analytics endpoint — it lives here as the\n`postCallAnalyticsConfig` body field.\n\n## Post-Call Analytics\n\nPass a `postCallAnalyticsConfig` object to configure disposition\nmetrics (STRING, BOOLEAN, INTEGER, ENUM, DATETIME) that are\nautomatically extracted from each completed call, along with the\n`useInternalAnalyticsModel` and `useReasoningModel` flags. See the\n[Post-Call Metrics guide](/atoms/atoms-platform/features/post-call-metrics) for a\nfull Python walkthrough and disposition metric schema reference.\n\n## Full payload\n\nAccepts the full agent-shaped config payload (language, synthesizer,\nslmModel, defaultVariables, preCallAPI, etc.) plus two draft-specific\nfields:\n\n- `singlePromptConfig` — prompt and tools (end_call, transfer_call,\n  api_call, extract_dynamic_variables, knowledge_base_search).\n- `postCallAnalyticsConfig` — disposition metrics + analytics/\n  reasoning model flags.\n\nEach PATCH increments the draft's revision counter. Config is not\nlive until the draft is published and activated (see\n`/drafts/{draftId}/publish` and `/versions/{versionId}/activate`).\n","tags":["agentVersioningDrafts"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"draftId","in":"path","description":"The draft ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Draft config updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_drafts_update_draft_config_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or draft not found","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftConfigRequest"}}}}}},"/agent/{id}/versions":{"get":{"operationId":"list-published-versions","summary":"List published versions","description":"List published versions for an agent with pagination and optional pin filter.\nThe `total` value currently represents the total number of published versions\nfor the agent, not necessarily the filtered count when `isPinned` is used.\n","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of versions to return (1-100, default 20)","required":false,"schema":{"type":"integer","default":20}},{"name":"skip","in":"query","description":"Number of versions to skip (default 0)","required":false,"schema":{"type":"integer","default":0}},{"name":"isPinned","in":"query","description":"Filter by pinned status","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Versions_listPublishedVersions_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/versions/diff":{"get":{"operationId":"diff-two-versions","summary":"Diff two versions","description":"Compare two version or draft revision records side-by-side by their IDs. The implementation tries published versions first and can fall back to the latest draft revision.","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"versionA","in":"query","description":"ID of the first version","required":true,"schema":{"type":"string"}},{"name":"versionB","in":"query","description":"ID of the second version","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Diff returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Versions_diffTwoVersions_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/versions/compare-metrics":{"get":{"operationId":"compare-version-metrics","summary":"Compare metrics between two versions","description":"Compare analytics/call metrics between two published versions over an optional date range.","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"versionA","in":"query","description":"ID of the first version","required":true,"schema":{"type":"string"}},{"name":"versionB","in":"query","description":"ID of the second version","required":true,"schema":{"type":"string"}},{"name":"dateFrom","in":"query","description":"Start date for the comparison range in YYYY-MM-DD format.","required":false,"schema":{"type":"string","format":"date"}},{"name":"dateTo","in":"query","description":"End date for the comparison range in YYYY-MM-DD format.","required":false,"schema":{"type":"string","format":"date"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Metrics comparison returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_versions_compare_version_metrics_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/versions/{versionId}":{"get":{"operationId":"get-version-detail","summary":"Get version detail","description":"Returns the full detail of a specific published version (read-only).\nPublished versions are config-immutable — to modify config, create a draft from\nthis version and publish it as a new version.\n","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","description":"The published version ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Versions_getVersionDetail_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"operationId":"update-version-metadata","summary":"Update version metadata (label, description, pin only)","description":"Update a published version's label, description, or pinned status. At least one field is required.\nPublished versions (both active and inactive) are config-immutable — their agent\nconfiguration cannot be changed. To modify config, create a new draft from the version,\nedit the draft, and publish it as a new version.\n","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","description":"The published version ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Version metadata updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_versions_update_version_metadata_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVersionMetaRequest"}}}}}},"/agent/{id}/versions/{versionId}/activate":{"patch":{"operationId":"activate-version","summary":"Activate a version","description":"Set a published version as the active version for the agent. The previously\nactive version is deactivated. This does not modify the version's config — it\nonly changes which version serves live traffic. Activation is idempotent: if\nthe version is already active, the endpoint returns that version without\nchanging config.\n","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","description":"The published version ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Version activated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_versioning_versions_activate_version_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agent/{id}/versions/{versionId}/test-call":{"post":{"operationId":"test-call-with-version-config","summary":"Test call with version config","description":"Initiate a test call using a specific published version's configuration.\nThe response always includes `conversationId` and `callId`. For `webcall`\nand `chat`, it also includes `token`, `roomName`, and `host`. Those fields\nare omitted for `telephony`.\n","tags":["agentVersioningVersions"],"parameters":[{"name":"id","in":"path","description":"The agent ID","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","description":"The published version ID","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Test call initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent Versioning - Versions_testCallWithVersionConfig_Response_200"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Agent or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallRequest"}}}}}}},"servers":[{"url":"https://api.smallest.ai/atoms/v1","description":"Production server"}],"webhooks":{"webhook-event-pre-conversation":{"post":{"operationId":"webhook-event-pre-conversation","summary":"pre-conversation","description":"Fired **before** the agent begins speaking. Use this to enrich CRM\ndata, log call attempts, or gate outbound calls.\n\nDoes **not** contain `callData`, `transcript`, `variables`, `analytics`,\nor `recordingUrl`. `callData` is on `post-conversation` and\n`analytics-completed`; `transcript`, `variables`, and `recordingUrl`\nare only on `post-conversation`; `analytics` is only on\n`analytics-completed`.\n\nFor the full field-level reference, see the [Webhooks guide](/atoms/atoms-platform/features/webhooks).\n","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"description":"Event body delivered to your configured webhook URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventPreConversation"}}}}}},"webhook-event-post-conversation":{"post":{"operationId":"webhook-event-post-conversation","summary":"post-conversation","description":"Fired **after** the call ends. Contains the full transcript, call\nmetadata, recording URL, and all agent variables that were in scope\nduring the conversation.\n\nFor the full field-level reference, see the [Webhooks guide](/atoms/atoms-platform/features/webhooks).\n","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"description":"Event body delivered to your configured webhook URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventPostConversation"}}}}}},"webhook-event-analytics-completed":{"post":{"operationId":"webhook-event-analytics-completed","summary":"analytics-completed","description":"Fired **after** Atoms finishes running the configured disposition and\nsuccess metrics on the transcript. Arrives some time after\n`post-conversation`.\n\nFor the full field-level reference, see the [Webhooks guide](/atoms/atoms-platform/features/webhooks).\n","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"description":"Event body delivered to your configured webhook URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventAnalyticsCompleted"}}}}}}},"components":{"schemas":{"UserGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The ID of the user"},"firstName":{"type":"string","description":"The first name of the user"},"lastName":{"type":"string","description":"The last name of the user"},"userEmail":{"type":"string","description":"The email of the user"},"authProvider":{"type":"string","description":"The authentication provider of the user"},"isEmailVerified":{"type":"boolean","description":"Whether the user's email is verified"},"organizationId":{"type":"string","description":"The organization ID of the user"}},"title":"UserGetResponsesContentApplicationJsonSchemaData"},"User_getUserDetails_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/UserGetResponsesContentApplicationJsonSchemaData"}},"title":"User_getUserDetails_Response_200"},"UnauthorizedErrorResponse":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"UnauthorizedErrorResponse"},"InternalServerErrorResponse":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"InternalServerErrorResponse"},"OrganizationGetResponsesContentApplicationJsonSchemaDataMembersItems":{"type":"object","properties":{"_id":{"type":"string","description":"The member ID"},"userEmail":{"type":"string","description":"The member email"}},"title":"OrganizationGetResponsesContentApplicationJsonSchemaDataMembersItems"},"OrganizationGetResponsesContentApplicationJsonSchemaDataSubscription":{"type":"object","properties":{"planId":{"type":"string","description":"The subscription plan ID"}},"title":"OrganizationGetResponsesContentApplicationJsonSchemaDataSubscription"},"OrganizationGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The organization ID"},"name":{"type":"string","description":"The organization name"},"members":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationGetResponsesContentApplicationJsonSchemaDataMembersItems"}},"subscription":{"$ref":"#/components/schemas/OrganizationGetResponsesContentApplicationJsonSchemaDataSubscription"}},"title":"OrganizationGetResponsesContentApplicationJsonSchemaData"},"Organization_getOrganizationDetails_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/OrganizationGetResponsesContentApplicationJsonSchemaData"}},"title":"Organization_getOrganizationDetails_Response_200"},"AgentTemplateGetParametersRegion":{"type":"string","enum":["us","in"],"title":"AgentTemplateGetParametersRegion"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsCallType":{"type":"string","enum":["Inbound","Outbound","Both"],"description":"The type of calls the template handles","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsCallType"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsWorkflowType":{"type":"string","enum":["SINGLE_PROMPT","WORKFLOW_GRAPH"],"description":"The workflow architecture of the template","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsWorkflowType"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsRegion":{"type":"string","enum":["India","US"],"description":"Human-readable region the template is available in","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsRegion"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsDefaultLanguage":{"type":"string","enum":["English","Hindi","Marathi","Gujarati"],"description":"The default language configured in the template","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsDefaultLanguage"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItemsType":{"type":"string","enum":["end_call","transfer_call","api_call","extract_dynamic_variables","knowledge_base_search"],"description":"The tool type — drives runtime dispatch.","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItemsType"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItemsInputSchema":{"type":"object","properties":{},"description":"JSON Schema describing the tool's input parameters","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItemsInputSchema"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItems":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItemsType","description":"The tool type — drives runtime dispatch."},"name":{"type":"string","description":"The name of the tool"},"description":{"type":"string","description":"What the tool does"},"input_schema":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItemsInputSchema","description":"JSON Schema describing the tool's input parameters"}},"title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItems"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfig":{"type":"object","properties":{"_id":{"type":"string","description":"Auto-generated unique identifier for the embedded single-prompt config (24-character hex string). Always present when `singlePromptConfig` is set. Surfaced as `object_id` in the generated SDK."},"prompt":{"type":"string","description":"The system prompt used by the agent"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfigToolsItems"},"description":"Tools available to the agent"}},"description":"Configuration for single-prompt agents","title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfig"},"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string","description":"Stable unique identifier for the template (24-character hex string, e.g. `6942a64ac74fc65e7bc94e47`). Surfaced as `object_id` in the generated SDK to keep it distinct from the human-readable `id` slug."},"id":{"type":"string","description":"Human-readable slug for the agent template (e.g. `sp-medical-centre-receptionist-in`). Distinct from `_id`."},"name":{"type":"string","description":"The name of the agent template"},"description":{"type":"string","description":"The description of the agent template"},"avatarUrl":{"type":"string","description":"The avatar URL of the agent template"},"referenceUrl":{"type":"string","description":"The docs URL of the agent template"},"industry":{"type":"string","description":"The industry the template is designed for (e.g. \"Finance\", \"Healthcare\")"},"useCase":{"type":"string","description":"The use case the template addresses (e.g. \"Lead Generation\")"},"callType":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsCallType","description":"The type of calls the template handles"},"workflowType":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsWorkflowType","description":"The workflow architecture of the template"},"region":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsRegion","description":"Human-readable region the template is available in"},"trending":{"type":"boolean","description":"Whether the template is featured or trending"},"defaultLanguage":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsDefaultLanguage","description":"The default language configured in the template"},"singlePromptConfig":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItemsSinglePromptConfig","description":"Configuration for single-prompt agents"}},"title":"AgentTemplateGetResponsesContentApplicationJsonSchemaDataItems"},"agent_templates_list_agent_templates_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentTemplateGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"agent_templates_list_agent_templates_Response_200"},"BadRequestErrorResponse":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"BadRequestErrorResponse"},"CreateAgentFromTemplateRequest":{"type":"object","properties":{"agentName":{"type":"string","description":"Name of the agent"},"agentDescription":{"type":"string","description":"Description of the agent"},"templateId":{"type":"string","description":"ID of the template to use. You can get the list of templates with their description and id from the /agent/template endpoint."}},"required":["agentName","templateId"],"title":"CreateAgentFromTemplateRequest"},"Agent Templates_createAgentFromTemplate_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"The ID of the created agent"}},"title":"Agent Templates_createAgentFromTemplate_Response_200"},"AgentGetParametersType":{"type":"string","enum":["single_prompt","workflow_graph"],"title":"AgentGetParametersType"},"AgentGetParametersSortField":{"type":"string","enum":["createdAt","updatedAt","totalCalls","name","workflowType"],"default":"createdAt","title":"AgentGetParametersSortField"},"AgentGetParametersSortOrder":{"type":"string","enum":["asc","desc"],"default":"desc","title":"AgentGetParametersSortOrder"},"AgentDtoBackgroundSound":{"type":"string","enum":["","office","cafe","call_center","static"],"description":"Ambient background sound during calls. Options: '' (none), 'office', 'cafe', 'call_center', 'static'.","title":"AgentDtoBackgroundSound"},"WorkflowType":{"type":"string","enum":["workflow_graph","single_prompt"],"description":"The type of workflow configuration. workflow_graph uses a node-based visual workflow, single_prompt uses a simple prompt-based configuration.","title":"WorkflowType"},"AgentDtoLanguageDefault":{"type":"string","enum":["en","hi","mr","gu","ta","es","north_indic","bn","or"],"description":"The default language of the agent","title":"AgentDtoLanguageDefault"},"AgentDtoLanguageSwitching":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether language switching is enabled for the agent"},"minWordsForDetection":{"type":"number","format":"double","description":"Minimum number of words required for language detection"},"strongSignalThreshold":{"type":"number","format":"double","description":"Threshold for strong language signal detection"},"weakSignalThreshold":{"type":"number","format":"double","description":"Threshold for weak language signal detection"},"minConsecutiveForWeakThresholdSwitch":{"type":"number","format":"double","description":"Minimum consecutive detections required for weak threshold language switch"}},"description":"Language switching configuration for the agent","title":"AgentDtoLanguageSwitching"},"AgentDtoLanguage":{"type":"object","properties":{"default":{"$ref":"#/components/schemas/AgentDtoLanguageDefault","description":"The default language of the agent"},"switching":{"$ref":"#/components/schemas/AgentDtoLanguageSwitching","description":"Language switching configuration for the agent"},"supported":{"type":"array","items":{"type":"string"},"description":"The supported languages of the agent"}},"description":"The language configuration of the agent","title":"AgentDtoLanguage"},"AgentDtoSynthesizerVoiceConfigModel":{"type":"string","enum":["waves_lightning_v3_1","gpt-realtime","gpt-realtime-mini","waves","waves_lightning_large","waves_lightning_large_voice_clone","waves_lightning_v2","waves_lightning_v3"],"default":"waves_lightning_v3_1","description":"The TTS model of the synthesizer. Use `waves_lightning_v3_1`\nfor the recommended Waves voice path (default), or\n`gpt-realtime` / `gpt-realtime-mini` for OpenAI realtime models.\n\nThe other tokens (`waves`, `waves_lightning_large`,\n`waves_lightning_large_voice_clone`, `waves_lightning_v2`,\n`waves_lightning_v3`) are kept for backwards compatibility\nwith existing agents and should not be used for new agents.\n","title":"AgentDtoSynthesizerVoiceConfigModel"},"AgentDtoSynthesizerVoiceConfigGender":{"type":"string","enum":["male","female"],"default":"female","title":"AgentDtoSynthesizerVoiceConfigGender"},"AgentDtoSynthesizerVoiceConfig":{"type":"object","properties":{"model":{"$ref":"#/components/schemas/AgentDtoSynthesizerVoiceConfigModel","default":"waves_lightning_v3_1","description":"The TTS model of the synthesizer. Use `waves_lightning_v3_1`\nfor the recommended Waves voice path (default), or\n`gpt-realtime` / `gpt-realtime-mini` for OpenAI realtime models.\n\nThe other tokens (`waves`, `waves_lightning_large`,\n`waves_lightning_large_voice_clone`, `waves_lightning_v2`,\n`waves_lightning_v3`) are kept for backwards compatibility\nwith existing agents and should not be used for new agents.\n"},"voiceId":{"type":"string","default":"nyah","description":"The voice ID of the synthesizer."},"gender":{"$ref":"#/components/schemas/AgentDtoSynthesizerVoiceConfigGender","default":"female"}},"description":"The voice configuration of the synthesizer","title":"AgentDtoSynthesizerVoiceConfig"},"AgentDtoSynthesizer":{"type":"object","properties":{"voiceConfig":{"$ref":"#/components/schemas/AgentDtoSynthesizerVoiceConfig","description":"The voice configuration of the synthesizer"},"speed":{"type":"number","format":"double","default":1.2,"description":"The speed of the synthesizer"},"consistency":{"type":"number","format":"double","default":0.5,"description":"The consistency of the synthesizer"},"similarity":{"type":"number","format":"double","default":0,"description":"The similarity of the synthesizer"},"enhancement":{"type":"number","format":"double","default":1,"description":"The enhancement of the synthesizer"},"sampleRate":{"type":"number","format":"double","description":"The audio sample rate used by the synthesizer"}},"description":"The synthesizer (TTS) configuration of the agent","title":"AgentDtoSynthesizer"},"AgentDtoSlmModel":{"type":"string","enum":["electron","electron-kogta","electron-kogta-v2","gpt-4o","gpt-4.1","gpt-5.2","gpt-realtime","gpt-realtime-mini"],"description":"The LLM model to use for the agent. LLM model will be used to generate the response and take decisions based on the user's query.","title":"AgentDtoSlmModel"},"AgentDtoDefaultVariables":{"type":"object","properties":{},"description":"The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent.","title":"AgentDtoDefaultVariables"},"AgentDtoPreCallApiMethod":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"description":"The HTTP method to use for the API call.","title":"AgentDtoPreCallApiMethod"},"AgentDtoPreCallApiBody":{"type":"object","properties":{},"description":"Optional request body for POST/PUT/PATCH requests.","title":"AgentDtoPreCallApiBody"},"AgentDtoPreCallApiQueryParams":{"type":"object","properties":{},"description":"Optional query parameters to include in the request URL.","title":"AgentDtoPreCallApiQueryParams"},"AgentDtoPreCallApiResponseVariablesItems":{"type":"object","properties":{"variableName":{"type":"string","description":"The name of the variable to inject into the agent prompt."},"jsonPath":{"type":"string","description":"JSON path expression to extract the value from the API response."}},"required":["variableName","jsonPath"],"title":"AgentDtoPreCallApiResponseVariablesItems"},"AgentDtoPreCallApi":{"type":"object","properties":{"isEnabled":{"type":"boolean","default":false,"description":"Whether the pre-call API is enabled."},"url":{"type":"string","format":"uri","description":"The URL of the API endpoint to call."},"method":{"$ref":"#/components/schemas/AgentDtoPreCallApiMethod","description":"The HTTP method to use for the API call."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to include in the request."},"body":{"$ref":"#/components/schemas/AgentDtoPreCallApiBody","description":"Optional request body for POST/PUT/PATCH requests."},"timeout":{"type":"integer","default":5,"description":"Timeout in seconds for the API call."},"queryParams":{"$ref":"#/components/schemas/AgentDtoPreCallApiQueryParams","description":"Optional query parameters to include in the request URL."},"responseVariables":{"type":"array","items":{"$ref":"#/components/schemas/AgentDtoPreCallApiResponseVariablesItems"},"description":"List of variables to extract from the API response using JSON path expressions."}},"required":["url","method"],"description":"Configuration for an API call to be made before the call starts. The response variables can be injected into the agent's prompt.","title":"AgentDtoPreCallApi"},"AgentDtoVoiceMailDetectionConfig":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"endText":{"type":"string","default":"Terminating call, you can call us back anytime. Thank you for calling.","description":"Text spoken before the call is terminated when voicemail is detected."}},"description":"Voicemail detection settings.","title":"AgentDtoVoiceMailDetectionConfig"},"AgentDtoSmartTurnConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"waitTimeInSecs":{"type":"number","format":"double"}},"description":"Smart end-of-turn detection settings.","title":"AgentDtoSmartTurnConfig"},"AgentDtoVoiceDetectionConfig":{"type":"object","properties":{"confidence":{"type":"number","format":"double"},"minVolume":{"type":"number","format":"double"},"triggerTimeInSecs":{"type":"number","format":"double"},"releaseTimeInSecs":{"type":"number","format":"double"}},"description":"VAD (voice activity detection) tuning.","title":"AgentDtoVoiceDetectionConfig"},"AgentDtoDenoisingConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean"}},"description":"Audio denoising settings.","title":"AgentDtoDenoisingConfig"},"AgentDtoRedactionConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean"}},"description":"PII/PCI redaction settings applied to transcripts.","title":"AgentDtoRedactionConfig"},"AgentDtoPronunciationDictsItems":{"type":"object","properties":{"word":{"type":"string"},"pronunciation":{"type":"string"}},"required":["word","pronunciation"],"title":"AgentDtoPronunciationDictsItems"},"AgentDtoLlmIdleTimeoutConfig":{"type":"object","properties":{"chatTimeoutTimeInSecs":{"type":"number","format":"double"},"webcallTimeoutTimeInSecs":{"type":"number","format":"double"},"telephonyTimeoutTimeInSecs":{"type":"number","format":"double"},"maxRetries":{"type":"number","format":"double"}},"description":"Per-channel idle timeouts (seconds) after which the LLM is nudged when the user\nstops speaking. `maxRetries` bounds how many nudges before the call ends.\n","title":"AgentDtoLlmIdleTimeoutConfig"},"AgentDtoSessionTimeoutConfig":{"type":"object","properties":{"timeoutTimeInSecs":{"type":"number","format":"double"}},"description":"Maximum session duration before the call is automatically ended.","title":"AgentDtoSessionTimeoutConfig"},"AgentDtoTimezone":{"type":"object","properties":{"label":{"type":"string","default":"(GMT+0:00) UTC"},"offset":{"type":"number","format":"double","default":0}},"description":"Agent timezone — used for time-of-day-sensitive prompts and analytics bucketing.","title":"AgentDtoTimezone"},"DispositionMetricDispositionMetricType":{"type":"string","enum":["STRING","BOOLEAN","INTEGER","ENUM","DATETIME"],"description":"Data type returned by the metric.","title":"DispositionMetricDispositionMetricType"},"DispositionMetric":{"type":"object","properties":{"identifier":{"type":"string","description":"Stable machine identifier. Lowercase letters, digits, and underscores only."},"dispositionMetricPrompt":{"type":"string","description":"Natural-language question evaluated against the transcript after the call ends."},"dispositionMetricType":{"$ref":"#/components/schemas/DispositionMetricDispositionMetricType","description":"Data type returned by the metric."},"choices":{"type":"array","items":{"type":"string"},"description":"Required when `dispositionMetricType = ENUM`. Allowed values."}},"required":["identifier","dispositionMetricPrompt","dispositionMetricType"],"description":"A single disposition metric captured after each call. The metric prompt\nis evaluated against the call transcript post-call, and the result is\nreturned in the call log under `postCallAnalytics.dispositionMetrics`.\n","title":"DispositionMetric"},"PostCallAnalyticsConfigSuccessMetricsItemsSuccessMetricType":{"type":"string","enum":["NUMERIC_SCALE","PERCENTAGE_SCALE","PASS_FAIL","DESCRIPTIVE_SCALE"],"title":"PostCallAnalyticsConfigSuccessMetricsItemsSuccessMetricType"},"PostCallAnalyticsConfigSuccessMetricsItems":{"type":"object","properties":{"identifier":{"type":"string"},"successMetricPrompt":{"type":"string"},"successMetricType":{"$ref":"#/components/schemas/PostCallAnalyticsConfigSuccessMetricsItemsSuccessMetricType"}},"required":["identifier","successMetricPrompt","successMetricType"],"title":"PostCallAnalyticsConfigSuccessMetricsItems"},"PostCallAnalyticsConfig":{"type":"object","properties":{"dispositionMetrics":{"type":"array","items":{"$ref":"#/components/schemas/DispositionMetric"},"default":[],"description":"Structured metrics extracted from each completed call."},"successMetrics":{"type":"array","items":{"$ref":"#/components/schemas/PostCallAnalyticsConfigSuccessMetricsItems"},"default":[],"description":"**Deprecated** — will be removed in a future version. Use\n`dispositionMetrics` instead. Kept here because the backend still\naccepts it on writes and returns it on reads.\n"},"summaryPrompt":{"type":"string","default":"","description":"**Deprecated** — no longer used in post-call analysis and will be\nremoved in a future version. Kept here because the backend still\naccepts it on writes and returns it on reads.\n"},"useInternalAnalyticsModel":{"type":"boolean","default":true,"description":"Use the internal analytics model. When false, falls back to the agent's own LLM."},"useReasoningModel":{"type":"boolean","default":false,"description":"Route analytics evaluation through the reasoning model for higher-quality results at a latency/cost tradeoff."}},"description":"Per-agent post-call analytics configuration. Evaluated after each call ends\nand surfaced in call logs under the `postCallAnalytics` field.\n","title":"PostCallAnalyticsConfig"},"AgentDtoWidgetConfigPosition":{"type":"string","enum":["bottom-right","bottom-left","top-right","top-left"],"default":"bottom-right","title":"AgentDtoWidgetConfigPosition"},"AgentDtoWidgetConfigSize":{"type":"string","enum":["tiny","compact","full"],"default":"full","title":"AgentDtoWidgetConfigSize"},"AgentDtoWidgetConfigMode":{"type":"string","enum":["chat","voice"],"default":"chat","title":"AgentDtoWidgetConfigMode"},"AgentDtoWidgetConfigTheme":{"type":"string","enum":["light","dark"],"default":"light","title":"AgentDtoWidgetConfigTheme"},"AgentDtoWidgetConfig":{"type":"object","properties":{"position":{"$ref":"#/components/schemas/AgentDtoWidgetConfigPosition","default":"bottom-right"},"size":{"$ref":"#/components/schemas/AgentDtoWidgetConfigSize","default":"full"},"mode":{"$ref":"#/components/schemas/AgentDtoWidgetConfigMode","default":"chat"},"theme":{"$ref":"#/components/schemas/AgentDtoWidgetConfigTheme","default":"light"},"baseColor":{"type":"string","default":"#ffffff"},"accentColor":{"type":"string","default":"#2d9d9f"},"agentBubbleColor":{"type":"string","default":"#f3f4f6"},"textOnAccentColor":{"type":"string","default":"#FFFFFF"},"secondaryTextColor":{"type":"string","default":"#6b7280"},"primaryTextColor":{"type":"string","default":"#111827"},"startButtonText":{"type":"string","default":"Start"},"endButtonText":{"type":"string","default":"End"},"ctaName":{"type":"string","default":"Talk to Atoms"},"widgetName":{"type":"string","default":"Atoms"},"avatarUrl":{"type":["string","null"]},"chatPlaceholder":{"type":"string","default":"Type your message..."},"consentRequired":{"type":"boolean","default":false},"consentTitle":{"type":"string","default":"Privacy Agreement"},"consentContent":{"type":"string","description":"Long-form consent body shown before the user can interact."},"assistantId":{"type":["string","null"]},"allowlist":{"type":"array","items":{"type":"string"},"description":"Allowed origin hostnames for widget embedding."}},"description":"Chat-widget rendering configuration (theme, copy, consent prompt). Only relevant\nwhen the agent is exposed via the embeddable widget; ignored by voice-only agents.\n","title":"AgentDtoWidgetConfig"},"ToolType":{"type":"string","enum":["end_call","transfer_call","api_call","extract_dynamic_variables","knowledge_base_search"],"description":"The type of function/tool","title":"ToolType"},"ToolTransferOptionType":{"type":"string","enum":["cold_transfer","warm_transfer"],"default":"cold_transfer","description":"Transfer mode. `cold_transfer` hands off immediately; `warm_transfer` briefs the receiving party first.","title":"ToolTransferOptionType"},"ToolTransferOptionPrivateHandoffOptionType":{"type":"string","enum":["prompt","static"],"description":"`prompt` generates briefing from the LLM; `static` plays fixed text.","title":"ToolTransferOptionPrivateHandoffOptionType"},"ToolTransferOptionPrivateHandoffOption":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolTransferOptionPrivateHandoffOptionType","description":"`prompt` generates briefing from the LLM; `static` plays fixed text."},"prompt":{"type":"string","description":"The prompt or static text for the private handoff."}},"description":"Private briefing delivered to the transfer target before the caller is connected. Only used when `type = warm_transfer`.","title":"ToolTransferOptionPrivateHandoffOption"},"ToolTransferOptionPublicHandoffOptionType":{"type":"string","enum":["prompt","static"],"title":"ToolTransferOptionPublicHandoffOptionType"},"ToolTransferOptionPublicHandoffOption":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolTransferOptionPublicHandoffOptionType"},"prompt":{"type":"string"}},"description":"Message played to the caller while the transfer is being set up. Only used when `type = warm_transfer`.","title":"ToolTransferOptionPublicHandoffOption"},"ToolTransferOption":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolTransferOptionType","default":"cold_transfer","description":"Transfer mode. `cold_transfer` hands off immediately; `warm_transfer` briefs the receiving party first."},"privateHandoffOption":{"oneOf":[{"$ref":"#/components/schemas/ToolTransferOptionPrivateHandoffOption"},{"type":"null"}],"description":"Private briefing delivered to the transfer target before the caller is connected. Only used when `type = warm_transfer`."},"publicHandoffOption":{"oneOf":[{"$ref":"#/components/schemas/ToolTransferOptionPublicHandoffOption"},{"type":"null"}],"description":"Message played to the caller while the transfer is being set up. Only used when `type = warm_transfer`."}},"description":"Required for transfer_call type. Controls cold vs warm transfer behavior.","title":"ToolTransferOption"},"ToolOnHoldMusic":{"type":"string","enum":["ringtone","relaxing_sound","uplifting_beats","none"],"default":"ringtone","description":"Optional for transfer_call type. Audio played to the caller while the transfer is in progress.","title":"ToolOnHoldMusic"},"ToolMethod":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"description":"Required for api_call type. HTTP method to use.","title":"ToolMethod"},"ToolHeadersArrayItems":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"ToolHeadersArrayItems"},"ToolQueryParamsItems":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"title":"ToolQueryParamsItems"},"ToolLlmParametersItemsType":{"type":"string","enum":["text","number","boolean","enum"],"title":"ToolLlmParametersItemsType"},"ToolLlmParametersItems":{"type":"object","properties":{"name":{"type":"string","description":"Parameter name"},"description":{"type":"string","description":"What the parameter represents"},"type":{"$ref":"#/components/schemas/ToolLlmParametersItemsType"},"values":{"type":"array","items":{"type":"string"},"description":"Required when type is `enum`. Allowed values."},"required":{"type":"boolean","default":false}},"required":["name","description","type"],"title":"ToolLlmParametersItems"},"ToolResponseVariablesItems":{"type":"object","properties":{"variableName":{"type":"string","description":"Name to store the extracted value under"},"jsonPath":{"type":"string","description":"JSON path to extract the value from the response"}},"required":["variableName","jsonPath"],"title":"ToolResponseVariablesItems"},"ToolVariablesExtractionSchemaItemsType":{"type":"string","enum":["text","number","boolean","enum"],"title":"ToolVariablesExtractionSchemaItemsType"},"ToolVariablesExtractionSchemaItems":{"type":"object","properties":{"name":{"type":"string","description":"Name of the variable to extract"},"description":{"type":"string","description":"What this variable represents"},"type":{"$ref":"#/components/schemas/ToolVariablesExtractionSchemaItemsType"},"values":{"type":"array","items":{"type":"string"},"description":"Required when type is `enum`. List of possible values."}},"required":["name","description","type"],"title":"ToolVariablesExtractionSchemaItems"},"Tool":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolType","description":"The type of function/tool"},"name":{"type":"string","description":"Unique name for the function (no spaces)"},"description":{"type":"string","description":"Description of what the function does"},"enabled":{"type":"boolean","default":true,"description":"Whether the tool is enabled"},"transferNumber":{"type":"string","description":"Required for transfer_call type. Phone number to transfer the call to (E.164 format)"},"transferOption":{"$ref":"#/components/schemas/ToolTransferOption","description":"Required for transfer_call type. Controls cold vs warm transfer behavior."},"onHoldMusic":{"$ref":"#/components/schemas/ToolOnHoldMusic","default":"ringtone","description":"Optional for transfer_call type. Audio played to the caller while the transfer is in progress."},"transferOnlyIfHuman":{"type":"boolean","default":true,"description":"Optional for transfer_call type. If true, the call is only transferred when a human is detected on the receiving end (voicemail/IVR skipped)."},"detectionTimeout":{"type":"integer","default":30,"description":"Optional for transfer_call type. Seconds to wait for human detection before giving up (5–60)."},"url":{"type":"string","format":"uri","description":"Required for api_call type. The URL to make the HTTP request to."},"method":{"$ref":"#/components/schemas/ToolMethod","description":"Required for api_call type. HTTP method to use."},"timeout":{"type":"integer","default":5000,"description":"Optional for api_call type. Request timeout in milliseconds (1000–30000)."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional for api_call type. Static HTTP headers as a key/value map."},"headersArray":{"type":"array","items":{"$ref":"#/components/schemas/ToolHeadersArrayItems"},"description":"Optional for api_call type. Headers as an array of key/value objects (alternative to `headers` map)."},"queryParams":{"type":"array","items":{"$ref":"#/components/schemas/ToolQueryParamsItems"},"description":"Optional for api_call type. Query parameters to include in the request URL. Values support variable templating like `{{order_id}}`."},"requestBody":{"type":"string","description":"Optional for api_call type. Raw request body as a JSON string. Supports variable templating."},"llmParameters":{"type":"array","items":{"$ref":"#/components/schemas/ToolLlmParametersItems"},"description":"Optional for api_call type. Parameters the LLM can supply dynamically at runtime."},"responseVariables":{"type":"array","items":{"$ref":"#/components/schemas/ToolResponseVariablesItems"},"default":[],"description":"Optional for api_call type. Variables to extract from the API response into the agent's variable store."},"variablesExtractionSchema":{"type":"array","items":{"$ref":"#/components/schemas/ToolVariablesExtractionSchemaItems"},"description":"Required for extract_dynamic_variables type. Schema defining variables to extract from the conversation."},"knowledgeBaseId":{"type":"string","description":"Required for knowledge_base_search type. ID of the knowledge base to search."},"fillerPhrases":{"type":"array","items":{"type":"string"},"default":[],"description":"Optional for knowledge_base_search type. Phrases spoken while searching."}},"required":["type","name","description"],"description":"Tool (function) available to the agent. The `type` field determines which\nadditional fields are required. Backend validation enforces per-type schemas.\n","title":"Tool"},"AgentDtoResolvedConfigDefaultLanguage":{"type":"string","enum":["en","hi","mr","gu","ta","es","north_indic","bn","or"],"description":"Default language set on the resolved version.","title":"AgentDtoResolvedConfigDefaultLanguage"},"AgentDtoResolvedConfigLanguageSwitching":{"type":"object","properties":{},"description":"Language-switching configuration on the resolved version.","title":"AgentDtoResolvedConfigLanguageSwitching"},"AgentDtoResolvedConfigPreCallApi":{"type":"object","properties":{},"description":"Pre-call API configuration on the resolved version.","title":"AgentDtoResolvedConfigPreCallApi"},"AgentDtoResolvedConfigWorkflowGraph":{"type":"object","properties":{},"description":"Full node graph for workflow_graph agents. Null for single_prompt agents.","title":"AgentDtoResolvedConfigWorkflowGraph"},"AgentDtoResolvedConfigVoiceDetectionConfig":{"type":"object","properties":{},"title":"AgentDtoResolvedConfigVoiceDetectionConfig"},"AgentDtoResolvedConfigSmartTurnConfig":{"type":"object","properties":{},"title":"AgentDtoResolvedConfigSmartTurnConfig"},"AgentDtoResolvedConfigDenoisingConfig":{"type":"object","properties":{},"title":"AgentDtoResolvedConfigDenoisingConfig"},"AgentDtoResolvedConfigRedactionConfig":{"type":"object","properties":{},"title":"AgentDtoResolvedConfigRedactionConfig"},"AgentDtoResolvedConfigLlmIdleTimeoutConfig":{"type":"object","properties":{},"title":"AgentDtoResolvedConfigLlmIdleTimeoutConfig"},"AgentDtoResolvedConfigSessionTimeoutConfig":{"type":"object","properties":{},"title":"AgentDtoResolvedConfigSessionTimeoutConfig"},"AgentDtoResolvedConfig":{"type":"object","properties":{"prompt":{"type":"string","description":"Active version's single-prompt text."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"Active version's configured tools."},"postCallAnalyticsConfig":{"$ref":"#/components/schemas/PostCallAnalyticsConfig"},"callDispositionConfig":{"type":"string"},"modelName":{"type":"string","description":"LLM model name on the resolved version."},"transcriberType":{"type":"string","description":"STT engine in use on the resolved version."},"defaultLanguage":{"$ref":"#/components/schemas/AgentDtoResolvedConfigDefaultLanguage","description":"Default language set on the resolved version."},"supportedLanguages":{"type":"array","items":{"type":"string"},"description":"Supported languages on the resolved version."},"languageSwitching":{"$ref":"#/components/schemas/AgentDtoResolvedConfigLanguageSwitching","description":"Language-switching configuration on the resolved version."},"firstMessage":{"type":"string","description":"Opening message on the resolved version."},"globalPrompt":{"type":"string","description":"Global prompt on the resolved version (workflow_graph agents only)."},"preCallAPI":{"$ref":"#/components/schemas/AgentDtoResolvedConfigPreCallApi","description":"Pre-call API configuration on the resolved version."},"workflowGraph":{"$ref":"#/components/schemas/AgentDtoResolvedConfigWorkflowGraph","description":"Full node graph for workflow_graph agents. Null for single_prompt agents."},"muteUserUntilFirstBotResponse":{"type":"boolean"},"allowInterruptions":{"type":"boolean"},"voiceDetectionConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfigVoiceDetectionConfig"},"smartTurnConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfigSmartTurnConfig"},"backgroundSound":{"type":"string"},"denoisingConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfigDenoisingConfig"},"redactionConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfigRedactionConfig"},"llmIdleTimeoutConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfigLlmIdleTimeoutConfig"},"sessionTimeoutConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfigSessionTimeoutConfig"}},"description":"The resolved config of the target version, merged into a flat shape. Not returned in\nlist responses (`GET /agent`). Only populated in single-agent responses\n(`GET /agent/{id}`) when the agent has a published, activated version.\nCan contain up to ~30 fields depending on which config sections are set.\n","title":"AgentDtoResolvedConfig"},"AgentDtoConfigSource":{"type":"string","enum":["active","draft","version"],"description":"Only present when `?draftId` or `?versionId` query params are used.\nIndicates which config source was resolved into `_resolvedConfig`.\n","title":"AgentDtoConfigSource"},"AgentDtoVersionedWorkflowWorkflowGraph":{"type":"object","properties":{},"title":"AgentDtoVersionedWorkflowWorkflowGraph"},"AgentDtoVersionedWorkflow":{"type":"object","properties":{"prompt":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}},"workflowGraph":{"$ref":"#/components/schemas/AgentDtoVersionedWorkflowWorkflowGraph"}},"description":"**Deprecated — internal use only.** Legacy field present whenever `_resolvedConfig` is populated.\nMirrors a subset of `_resolvedConfig` (`prompt`, `tools`, `workflowGraph`). Kept for backward\ncompatibility with existing frontend code. Ignore in new integrations.\n","title":"AgentDtoVersionedWorkflow"},"AgentDTO":{"type":"object","properties":{"_id":{"type":"string","description":"The ID of the agent"},"name":{"type":"string","description":"The name of the agent"},"description":{"type":"string","description":"The description of the agent"},"backgroundSound":{"$ref":"#/components/schemas/AgentDtoBackgroundSound","description":"Ambient background sound during calls. Options: '' (none), 'office', 'cafe', 'call_center', 'static'."},"organization":{"type":"string","description":"The organization ID of the agent"},"workflowId":{"type":"string","description":"The workflow ID of the agent"},"workflowType":{"$ref":"#/components/schemas/WorkflowType","description":"The type of workflow used by the agent"},"createdBy":{"type":"string","description":"The user ID of the user who created the agent"},"globalKnowledgeBaseId":{"type":"string","description":"The global knowledge base ID of the agent"},"language":{"$ref":"#/components/schemas/AgentDtoLanguage","description":"The language configuration of the agent"},"synthesizer":{"$ref":"#/components/schemas/AgentDtoSynthesizer","description":"The synthesizer (TTS) configuration of the agent"},"slmModel":{"$ref":"#/components/schemas/AgentDtoSlmModel","description":"The LLM model to use for the agent. LLM model will be used to generate the response and take decisions based on the user's query."},"defaultVariables":{"$ref":"#/components/schemas/AgentDtoDefaultVariables","description":"The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent."},"preCallAPI":{"$ref":"#/components/schemas/AgentDtoPreCallApi","description":"Configuration for an API call to be made before the call starts. The response variables can be injected into the agent's prompt."},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the agent was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the agent was last updated"},"avatarUrl":{"type":"string","description":"URL of the agent's avatar image"},"firstMessage":{"type":"string","description":"The opening message spoken by the agent at the start of a call"},"allowInterruptions":{"type":"boolean","description":"Whether the agent can be interrupted mid-speech by the caller"},"waitForUserToSpeakFirst":{"type":"boolean","description":"When true, the agent waits for the caller to speak before responding"},"totalCalls":{"type":"number","format":"double","description":"Total number of calls made with this agent"},"transcriberType":{"type":"string","description":"The speech-to-text engine used for transcription"},"globalPrompt":{"type":"string","description":"A global system prompt prepended to all agent interactions"},"archived":{"type":"boolean","description":"Whether the agent has been archived. Archived agents are excluded from default listings."},"archivedAt":{"type":"string","format":"date-time","description":"The date and time when the agent was archived"},"isLocked":{"type":"boolean","description":"Whether the agent is locked and cannot be edited"},"activeVersionId":{"type":"string","description":"ID of the currently-active published version. Matches `versionId`."},"versionId":{"type":"string","description":"Alias for `activeVersionId`."},"allowInboundCall":{"type":"boolean","default":true,"description":"Whether the agent accepts inbound calls."},"phoneNumber":{"type":"array","items":{"type":"string"},"description":"Phone numbers attached to this agent (E.164 strings). Only present when\nthe agent has been linked to one or more telephony products.\n"},"visibleToEveryone":{"type":"boolean","default":false,"description":"Whether the agent is visible to all members of the organization (vs. only the creator)."},"speechFormatting":{"type":"boolean","description":"Apply LLM-side speech formatting (e.g. expanding \"$100\" to \"one hundred dollars\")\nbefore passing text to the synthesizer. Boolean; no default — when unset the\nplatform applies the per-organization default.\n"},"muteUserUntilFirstBotResponse":{"type":"boolean","default":false,"description":"When true, the user microphone is muted until the agent has spoken its first response."},"interruptionBackoffTimer":{"type":"number","format":"double","description":"Seconds to wait after an interruption before the agent resumes speaking."},"enableStyleGuide":{"type":"boolean","default":true,"description":"Whether to apply the platform's style-guide post-processing on agent responses."},"callDispositionConfig":{"type":"string","default":"","description":"Free-form prompt used for call disposition classification (separate from `postCallAnalyticsConfig.dispositionMetrics`)."},"voiceMailDetectionConfig":{"$ref":"#/components/schemas/AgentDtoVoiceMailDetectionConfig","description":"Voicemail detection settings."},"smartTurnConfig":{"$ref":"#/components/schemas/AgentDtoSmartTurnConfig","description":"Smart end-of-turn detection settings."},"voiceDetectionConfig":{"$ref":"#/components/schemas/AgentDtoVoiceDetectionConfig","description":"VAD (voice activity detection) tuning."},"denoisingConfig":{"$ref":"#/components/schemas/AgentDtoDenoisingConfig","description":"Audio denoising settings."},"redactionConfig":{"$ref":"#/components/schemas/AgentDtoRedactionConfig","description":"PII/PCI redaction settings applied to transcripts."},"pronunciationDicts":{"type":"array","items":{"$ref":"#/components/schemas/AgentDtoPronunciationDictsItems"},"description":"Custom pronunciation dictionary applied before synthesis."},"llmIdleTimeoutConfig":{"$ref":"#/components/schemas/AgentDtoLlmIdleTimeoutConfig","description":"Per-channel idle timeouts (seconds) after which the LLM is nudged when the user\nstops speaking. `maxRetries` bounds how many nudges before the call ends.\n"},"sessionTimeoutConfig":{"$ref":"#/components/schemas/AgentDtoSessionTimeoutConfig","description":"Maximum session duration before the call is automatically ended."},"timezone":{"$ref":"#/components/schemas/AgentDtoTimezone","description":"Agent timezone — used for time-of-day-sensitive prompts and analytics bucketing."},"postCallAnalyticsConfig":{"$ref":"#/components/schemas/PostCallAnalyticsConfig"},"widgetConfig":{"$ref":"#/components/schemas/AgentDtoWidgetConfig","description":"Chat-widget rendering configuration (theme, copy, consent prompt). Only relevant\nwhen the agent is exposed via the embeddable widget; ignored by voice-only agents.\n"},"_resolvedConfig":{"$ref":"#/components/schemas/AgentDtoResolvedConfig","description":"The resolved config of the target version, merged into a flat shape. Not returned in\nlist responses (`GET /agent`). Only populated in single-agent responses\n(`GET /agent/{id}`) when the agent has a published, activated version.\nCan contain up to ~30 fields depending on which config sections are set.\n"},"_configSource":{"$ref":"#/components/schemas/AgentDtoConfigSource","description":"Only present when `?draftId` or `?versionId` query params are used.\nIndicates which config source was resolved into `_resolvedConfig`.\n"},"_versionedWorkflow":{"$ref":"#/components/schemas/AgentDtoVersionedWorkflow","description":"**Deprecated — internal use only.** Legacy field present whenever `_resolvedConfig` is populated.\nMirrors a subset of `_resolvedConfig` (`prompt`, `tools`, `workflowGraph`). Kept for backward\ncompatibility with existing frontend code. Ignore in new integrations.\n"}},"title":"AgentDTO"},"AgentGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/AgentDTO"}},"total":{"type":"number","format":"double","description":"Total number of agents"}},"title":"AgentGetResponsesContentApplicationJsonSchemaData"},"agents_list_agents_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentGetResponsesContentApplicationJsonSchemaData"}},"title":"agents_list_agents_Response_200"},"ApiResponseData":{"type":"object","properties":{},"title":"ApiResponseData"},"ApiResponse":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ApiResponseData"}},"title":"ApiResponse"},"CreateAgentRequestBackgroundSound":{"type":"string","enum":["","office","cafe","call_center","static"],"default":"","description":"Ambient background sound during calls. Options: '' (none), 'office', 'cafe', 'call_center', 'static'. Note: this value is currently overridden by the server default on creation; update via PATCH after creation.","title":"CreateAgentRequestBackgroundSound"},"CreateAgentRequestLanguageDefault":{"type":"string","enum":["en","hi","mr","gu","ta","es","north_indic","bn","or"],"default":"en","description":"The default language of the agent. Note: `ta` cannot be combined with other languages in `supported`.","title":"CreateAgentRequestLanguageDefault"},"CreateAgentRequestLanguageSupportedItems":{"type":"string","enum":["en","hi","mr","gu","ta","es","north_indic","bn","or"],"title":"CreateAgentRequestLanguageSupportedItems"},"CreateAgentRequestLanguageSwitching":{"type":"object","properties":{"isEnabled":{"type":"boolean","default":false,"description":"Whether to enable language switching for the agent"},"minWordsForDetection":{"type":"number","format":"double","default":2,"description":"Minimum number of words required for language detection"},"strongSignalThreshold":{"type":"number","format":"double","default":0.7,"description":"Threshold for strong language signal detection (0.1 to 0.9)"},"weakSignalThreshold":{"type":"number","format":"double","default":0.3,"description":"Threshold for weak language signal detection (0.1 to 0.9)"},"minConsecutiveForWeakThresholdSwitch":{"type":"number","format":"double","default":2,"description":"Minimum consecutive detections required for weak threshold language switch"}},"description":"Language switching configuration for the agent. If enabled, the agent will be able to switch between languages based on the user's language.","title":"CreateAgentRequestLanguageSwitching"},"CreateAgentRequestLanguage":{"type":"object","properties":{"default":{"$ref":"#/components/schemas/CreateAgentRequestLanguageDefault","default":"en","description":"The default language of the agent. Note: `ta` cannot be combined with other languages in `supported`."},"supported":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestLanguageSupportedItems"},"description":"Languages the agent understands. `default` must be one of these values.\nTamil (`ta`) cannot be combined with other languages.\n"},"switching":{"$ref":"#/components/schemas/CreateAgentRequestLanguageSwitching","description":"Language switching configuration for the agent. If enabled, the agent will be able to switch between languages based on the user's language."}},"description":"Language configuration for the agent.\nCross-field rule: `default` must be one of the values in `supported`.\nTamil (`ta`) cannot be combined with other languages in `supported`.\n","title":"CreateAgentRequestLanguage"},"CreateAgentRequestSynthesizerVoiceConfigModel":{"type":"string","enum":["waves_lightning_v3_1","gpt-realtime","gpt-realtime-mini","waves","waves_lightning_large","waves_lightning_v2","waves_lightning_v3"],"default":"waves_lightning_v3_1","description":"The TTS model to use. Use `waves_lightning_v3_1` for the\nrecommended Waves voice path (default), or `gpt-realtime` /\n`gpt-realtime-mini` for OpenAI realtime models (require\n`workflowType: single_prompt`).\n\nThe other tokens (`waves`, `waves_lightning_large`,\n`waves_lightning_v2`, `waves_lightning_v3`) are kept for\nbackwards compatibility with existing agents and should\nnot be used for new agents.\n","title":"CreateAgentRequestSynthesizerVoiceConfigModel"},"CreateAgentRequestSynthesizerVoiceConfigGender":{"type":"string","enum":["male","female"],"default":"female","description":"The gender of the voice.","title":"CreateAgentRequestSynthesizerVoiceConfigGender"},"CreateAgentRequestSynthesizerVoiceConfig":{"type":"object","properties":{"model":{"$ref":"#/components/schemas/CreateAgentRequestSynthesizerVoiceConfigModel","default":"waves_lightning_v3_1","description":"The TTS model to use. Use `waves_lightning_v3_1` for the\nrecommended Waves voice path (default), or `gpt-realtime` /\n`gpt-realtime-mini` for OpenAI realtime models (require\n`workflowType: single_prompt`).\n\nThe other tokens (`waves`, `waves_lightning_large`,\n`waves_lightning_v2`, `waves_lightning_v3`) are kept for\nbackwards compatibility with existing agents and should\nnot be used for new agents.\n"},"voiceId":{"type":"string","default":"nyah","description":"The voice ID to use. For cloned voices, pass the voiceId from the Waves platform with a compatible model."},"gender":{"$ref":"#/components/schemas/CreateAgentRequestSynthesizerVoiceConfigGender","default":"female","description":"The gender of the voice."}},"description":"Voice configuration for the synthesizer.","title":"CreateAgentRequestSynthesizerVoiceConfig"},"CreateAgentRequestSynthesizerEnhancement":{"type":"string","enum":["0","1","2"],"title":"CreateAgentRequestSynthesizerEnhancement"},"CreateAgentRequestSynthesizerSampleRate":{"type":"string","enum":["8000","16000","24000","44100"],"description":"Output audio sample rate in Hz.","title":"CreateAgentRequestSynthesizerSampleRate"},"CreateAgentRequestSynthesizer":{"type":"object","properties":{"voiceConfig":{"$ref":"#/components/schemas/CreateAgentRequestSynthesizerVoiceConfig","default":{"model":"waves_lightning_large","voiceId":"nyah"},"description":"Voice configuration for the synthesizer."},"speed":{"type":"number","format":"double","default":1.2},"consistency":{"type":"number","format":"double","default":0.5},"similarity":{"type":"number","format":"double","default":0},"enhancement":{"$ref":"#/components/schemas/CreateAgentRequestSynthesizerEnhancement","default":1},"sampleRate":{"$ref":"#/components/schemas/CreateAgentRequestSynthesizerSampleRate","default":16000,"description":"Output audio sample rate in Hz."}},"description":"Synthesizer (TTS) configuration for the agent.\nModels `waves`, `waves_lightning_large`, `waves_lightning_v2`, and `waves_lightning_v3_1`\nvalidate `voiceId` against the Waves API. All other models accept any voiceId.\nCloned voices are regular voiceIds — use them with any compatible Waves model.\n","title":"CreateAgentRequestSynthesizer"},"CreateAgentRequestSlmModel":{"type":"string","enum":["electron","electron-kogta","electron-kogta-v2","gpt-4o","gpt-4.1","gpt-5.2","gpt-realtime","gpt-realtime-mini"],"default":"electron","description":"The LLM model to use for the agent.\nNote: `gpt-5.2`, `electron-kogta`, and `electron-kogta-v2` require org-level access and return 403 if not enabled.\n`workflowType` must be `single_prompt` to use `gpt-realtime` or `gpt-realtime-mini`.\n","title":"CreateAgentRequestSlmModel"},"CreateAgentRequestDefaultVariables":{"type":"object","properties":{},"description":"The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent.","title":"CreateAgentRequestDefaultVariables"},"CreateAgentRequestPreCallApiMethod":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"description":"The HTTP method to use for the API call.","title":"CreateAgentRequestPreCallApiMethod"},"CreateAgentRequestPreCallApiBody":{"type":"object","properties":{},"description":"Optional request body for POST/PUT/PATCH requests.","title":"CreateAgentRequestPreCallApiBody"},"CreateAgentRequestPreCallApiQueryParams":{"type":"object","properties":{},"description":"Optional query parameters to include in the request URL.","title":"CreateAgentRequestPreCallApiQueryParams"},"CreateAgentRequestPreCallApiResponseVariablesItems":{"type":"object","properties":{"variableName":{"type":"string","description":"The name of the variable to inject into the agent prompt."},"jsonPath":{"type":"string","description":"JSON path expression to extract the value from the API response."}},"required":["variableName","jsonPath"],"title":"CreateAgentRequestPreCallApiResponseVariablesItems"},"CreateAgentRequestPreCallApi":{"type":"object","properties":{"isEnabled":{"type":"boolean","default":false,"description":"Whether the pre-call API is enabled."},"url":{"type":"string","format":"uri","description":"The URL of the API endpoint to call."},"method":{"$ref":"#/components/schemas/CreateAgentRequestPreCallApiMethod","description":"The HTTP method to use for the API call."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to include in the request."},"body":{"$ref":"#/components/schemas/CreateAgentRequestPreCallApiBody","description":"Optional request body for POST/PUT/PATCH requests."},"timeout":{"type":"integer","default":5,"description":"Timeout in seconds for the API call."},"queryParams":{"$ref":"#/components/schemas/CreateAgentRequestPreCallApiQueryParams","description":"Optional query parameters to include in the request URL."},"responseVariables":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestPreCallApiResponseVariablesItems"},"description":"List of variables to extract from the API response using JSON path expressions."}},"required":["url","method"],"description":"Configuration for an API call to be made before the call starts. The response variables can be injected into the agent's prompt.","title":"CreateAgentRequestPreCallApi"},"CreateAgentRequestSmartTurnConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"waitTimeInSecs":{"type":"number","format":"double","description":"How long to wait after the user stops speaking before responding."}},"description":"Smart turn-detection configuration. When enabled, the agent uses an additional model to decide whether the user has finished a turn.","title":"CreateAgentRequestSmartTurnConfig"},"CreateAgentRequestVoiceDetectionConfig":{"type":"object","properties":{"confidence":{"type":"number","format":"double","description":"Minimum VAD confidence threshold to register speech."},"minVolume":{"type":"number","format":"double","description":"Minimum input volume threshold to register speech."},"triggerTimeInSecs":{"type":"number","format":"double","description":"How long sustained speech must be detected before turning the VAD on."},"releaseTimeInSecs":{"type":"number","format":"double","description":"How long after silence before the VAD turns off."}},"description":"Voice activity detection (VAD) configuration. Controls how the agent decides when speech is present.","title":"CreateAgentRequestVoiceDetectionConfig"},"CreateAgentRequestVoiceMailDetectionConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"endText":{"type":"string","description":"Message played before hanging up when voicemail is detected."}},"description":"Voicemail-detection configuration. When the call hits a voicemail tone, the agent plays `endText` and ends the call.","title":"CreateAgentRequestVoiceMailDetectionConfig"},"CreateAgentRequestDenoisingConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean"}},"description":"Background-noise denoising configuration for the agent's input audio.","title":"CreateAgentRequestDenoisingConfig"},"CreateAgentRequestRedactionConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean"}},"description":"PII redaction configuration. When enabled, personally identifiable information is redacted from transcripts before storage.","title":"CreateAgentRequestRedactionConfig"},"CreateAgentRequestPronunciationDictsItems":{"type":"object","properties":{"word":{"type":"string","description":"The word to override."},"pronunciation":{"type":"string","description":"How the word should be pronounced (phonetic spelling)."}},"required":["word","pronunciation"],"title":"CreateAgentRequestPronunciationDictsItems"},"CreateAgentRequestLlmIdleTimeoutConfig":{"type":"object","properties":{"chatTimeoutTimeInSecs":{"type":"number","format":"double","description":"LLM idle timeout for chat conversations, in seconds."},"webcallTimeoutTimeInSecs":{"type":"number","format":"double","description":"LLM idle timeout for web calls, in seconds."},"telephonyTimeoutTimeInSecs":{"type":"number","format":"double","description":"LLM idle timeout for telephony calls, in seconds."},"maxRetries":{"type":"number","format":"double","description":"Maximum number of LLM-idle retries before terminating the call. System-defined min/max."}},"description":"Timeout configuration for the LLM stage of a conversation. Triggers a retry or call termination when the LLM does not respond within the configured window.","title":"CreateAgentRequestLlmIdleTimeoutConfig"},"CreateAgentRequestSessionTimeoutConfig":{"type":"object","properties":{"timeoutTimeInSecs":{"type":"number","format":"double","default":1800,"description":"Maximum session duration in seconds (max 1 hour). Defaults to 1800 (30 minutes)."}},"description":"Maximum duration of a conversation session. The call ends after this elapsed time even if active.","title":"CreateAgentRequestSessionTimeoutConfig"},"CreateAgentRequestTimezone":{"type":"object","properties":{"label":{"type":"string","description":"IANA timezone label (e.g. `America/New_York`)."},"offset":{"type":"number","format":"double","description":"UTC offset in minutes (e.g. -300 for EST)."}},"description":"Timezone applied to scheduled actions and timestamps the agent reports to the user.","title":"CreateAgentRequestTimezone"},"CreateAgentRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"backgroundSound":{"$ref":"#/components/schemas/CreateAgentRequestBackgroundSound","default":"","description":"Ambient background sound during calls. Options: '' (none), 'office', 'cafe', 'call_center', 'static'. Note: this value is currently overridden by the server default on creation; update via PATCH after creation."},"language":{"$ref":"#/components/schemas/CreateAgentRequestLanguage","description":"Language configuration for the agent.\nCross-field rule: `default` must be one of the values in `supported`.\nTamil (`ta`) cannot be combined with other languages in `supported`.\n"},"synthesizer":{"$ref":"#/components/schemas/CreateAgentRequestSynthesizer","description":"Synthesizer (TTS) configuration for the agent.\nModels `waves`, `waves_lightning_large`, `waves_lightning_v2`, and `waves_lightning_v3_1`\nvalidate `voiceId` against the Waves API. All other models accept any voiceId.\nCloned voices are regular voiceIds — use them with any compatible Waves model.\n"},"globalKnowledgeBaseId":{"type":"string","description":"The global knowledge base ID of the agent. You can create a global knowledge base by using the /knowledgebase endpoint and assign it to the agent. The agent will use this knowledge base for its responses."},"slmModel":{"$ref":"#/components/schemas/CreateAgentRequestSlmModel","default":"electron","description":"The LLM model to use for the agent.\nNote: `gpt-5.2`, `electron-kogta`, and `electron-kogta-v2` require org-level access and return 403 if not enabled.\n`workflowType` must be `single_prompt` to use `gpt-realtime` or `gpt-realtime-mini`.\n"},"defaultVariables":{"$ref":"#/components/schemas/CreateAgentRequestDefaultVariables","description":"The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent."},"preCallAPI":{"$ref":"#/components/schemas/CreateAgentRequestPreCallApi","description":"Configuration for an API call to be made before the call starts. The response variables can be injected into the agent's prompt."},"globalPrompt":{"type":"string","description":"Set global instructions for your agent's personality, role, and behavior throughout conversations.\nNote: Only used for workflow_graph agents. Maximum 4000 characters.\n"},"telephonyProductId":{"type":"array","items":{"type":"string"},"description":"IDs of telephony products (phone numbers) to associate with the agent for inbound/outbound calls."},"workflowType":{"$ref":"#/components/schemas/WorkflowType","description":"The type of workflow to create for the agent. Defaults to `single_prompt` if not specified. Using `workflow_graph` requires conversational agent access (403 if not enabled)."},"firstMessage":{"type":"string","description":"The first message the agent sends when a conversation starts."},"muteUserUntilFirstBotResponse":{"type":"boolean","description":"When true, the user's audio is muted until the agent has finished its first response."},"allowInterruptions":{"type":"boolean","description":"Whether the user can interrupt the agent while it is speaking."},"waitForUserToSpeakFirst":{"type":"boolean","description":"When true, the agent waits for the user to speak before sending the first message."},"interruptionBackoffTimer":{"type":"number","format":"double","description":"Seconds the agent waits after being interrupted before resuming speech."},"smartTurnConfig":{"$ref":"#/components/schemas/CreateAgentRequestSmartTurnConfig","description":"Smart turn-detection configuration. When enabled, the agent uses an additional model to decide whether the user has finished a turn."},"voiceDetectionConfig":{"$ref":"#/components/schemas/CreateAgentRequestVoiceDetectionConfig","description":"Voice activity detection (VAD) configuration. Controls how the agent decides when speech is present."},"voiceMailDetectionConfig":{"$ref":"#/components/schemas/CreateAgentRequestVoiceMailDetectionConfig","description":"Voicemail-detection configuration. When the call hits a voicemail tone, the agent plays `endText` and ends the call."},"denoisingConfig":{"$ref":"#/components/schemas/CreateAgentRequestDenoisingConfig","description":"Background-noise denoising configuration for the agent's input audio."},"redactionConfig":{"$ref":"#/components/schemas/CreateAgentRequestRedactionConfig","description":"PII redaction configuration. When enabled, personally identifiable information is redacted from transcripts before storage."},"pronunciationDicts":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgentRequestPronunciationDictsItems"},"description":"Pronunciation overrides — words the TTS engine should pronounce differently from its default."},"llmIdleTimeoutConfig":{"$ref":"#/components/schemas/CreateAgentRequestLlmIdleTimeoutConfig","description":"Timeout configuration for the LLM stage of a conversation. Triggers a retry or call termination when the LLM does not respond within the configured window."},"sessionTimeoutConfig":{"$ref":"#/components/schemas/CreateAgentRequestSessionTimeoutConfig","description":"Maximum duration of a conversation session. The call ends after this elapsed time even if active."},"timezone":{"$ref":"#/components/schemas/CreateAgentRequestTimezone","description":"Timezone applied to scheduled actions and timestamps the agent reports to the user."},"callDispositionConfig":{"type":"string","description":"Configuration string for call disposition tracking."},"allowInboundCall":{"type":"boolean","default":true,"description":"Whether the agent accepts inbound calls."},"enableStyleGuide":{"type":"boolean","default":true,"description":"Whether style guide enforcement is applied to agent responses."},"speechFormatting":{"type":"boolean","description":"Whether speech formatting is applied to the agent's responses."}},"required":["name"],"title":"CreateAgentRequest"},"agents_create_agent_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"The ID of the created agent"}},"title":"agents_create_agent_Response_201"},"AgentWithAiPostRequestBodyContentApplicationJsonSchemaQuestionsItems":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"],"title":"AgentWithAiPostRequestBodyContentApplicationJsonSchemaQuestionsItems"},"AgentWithAiPostRequestBodyContentApplicationJsonSchemaType":{"type":"string","enum":["single_prompt"],"description":"Workflow type. Only `single_prompt` is supported.","title":"AgentWithAiPostRequestBodyContentApplicationJsonSchemaType"},"Agents_createAgentWithAi_Response_201":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"string","description":"MongoDB ObjectId of the created agent"}},"title":"Agents_createAgentWithAi_Response_201"},"AgentIdDuplicatePostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The ID of the newly created agent"}},"title":"AgentIdDuplicatePostResponsesContentApplicationJsonSchemaData"},"agents_duplicate_agent_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdDuplicatePostResponsesContentApplicationJsonSchemaData"}},"title":"agents_duplicate_agent_Response_201"},"agents_get_agent_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentDTO"}},"title":"agents_get_agent_Response_200"},"UpdateAgentRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the agent."},"description":{"type":"string","description":"Description of the agent."},"avatarUrl":{"type":"string","description":"URL of the agent's avatar image."},"telephonyProductId":{"type":"array","items":{"type":"string"},"description":"IDs of telephony products (phone numbers) to associate with the agent."},"allowInboundCall":{"type":"boolean","description":"Whether the agent accepts inbound calls."},"visibleToEveryone":{"type":"boolean","description":"Whether the agent is visible to all members of the organization."}},"description":"Agent update payload. Behavior depends on whether the agent has versioning enabled:\n\n**Versioned agents**: only the metadata fields below are accepted. Config-level\nfields (language, synthesizer, slmModel, etc.) return 400.\n\n**Non-versioned agents**: all configuration fields are accepted — the same full set\nas `POST /agent` (see `CreateAgentRequest`).\n","title":"UpdateAgentRequest"},"agents_update_agent_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"The ID of the updated agent"}},"title":"agents_update_agent_Response_200"},"AgentPromptConfigGetResponsesContentApplicationJsonSchemaDataQuestionsItems":{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","description":"Question input type (e.g. `text`, `select`)"},"options":{"type":"array","items":{"type":"string"}},"examples":{"type":"object","additionalProperties":{"type":"string"},"description":"Pre-filled sample answers keyed by label. `\"default\"` is always present."}},"title":"AgentPromptConfigGetResponsesContentApplicationJsonSchemaDataQuestionsItems"},"AgentPromptConfigGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/AgentPromptConfigGetResponsesContentApplicationJsonSchemaDataQuestionsItems"},"description":"Ordered list of questions shown in the agent creation wizard"},"exampleLabels":{"type":"array","items":{"type":"string"},"description":"Labels other than `\"default\"` that example answer sets exist for"},"defaultLabel":{"type":"string"}},"title":"AgentPromptConfigGetResponsesContentApplicationJsonSchemaData"},"Agents_getAgentPromptConfig_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentPromptConfigGetResponsesContentApplicationJsonSchemaData"}},"title":"Agents_getAgentPromptConfig_Response_200"},"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataPosition":{"type":"string","enum":["bottom-right","bottom-left","top-right","top-left"],"title":"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataPosition"},"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataSize":{"type":"string","enum":["tiny","compact","full"],"title":"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataSize"},"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataMode":{"type":"string","enum":["chat","voice"],"title":"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataMode"},"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataTheme":{"type":"string","enum":["light","dark"],"title":"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataTheme"},"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"assistantId":{"type":"string","description":"Same as the agent ID — convenience field for the widget embed code"},"position":{"$ref":"#/components/schemas/AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataPosition"},"size":{"$ref":"#/components/schemas/AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataSize"},"borderRadius":{"type":"number","format":"double"},"mode":{"$ref":"#/components/schemas/AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataMode"},"theme":{"$ref":"#/components/schemas/AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaDataTheme"},"baseColor":{"type":"string"},"accentColor":{"type":"string"},"title":{"type":"string"},"startButtonText":{"type":"string"},"endButtonText":{"type":"string"},"avatarUrl":{"type":["string","null"]},"voiceShowTranscript":{"type":"boolean"},"consentRequired":{"type":"boolean"}},"description":"All fields may be absent if not yet configured","title":"AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaData"},"Agents_getAgentWidgetConfig_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdWidgetConfigGetResponsesContentApplicationJsonSchemaData","description":"All fields may be absent if not yet configured"}},"title":"Agents_getAgentWidgetConfig_Response_200"},"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigPosition":{"type":"string","enum":["bottom-right","bottom-left","top-right","top-left"],"title":"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigPosition"},"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigSize":{"type":"string","enum":["tiny","compact","full"],"title":"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigSize"},"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigMode":{"type":"string","enum":["chat","voice"],"title":"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigMode"},"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigTheme":{"type":"string","enum":["light","dark"],"title":"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigTheme"},"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfig":{"type":"object","properties":{"position":{"$ref":"#/components/schemas/AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigPosition"},"size":{"$ref":"#/components/schemas/AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigSize"},"borderRadius":{"type":"number","format":"double"},"mode":{"$ref":"#/components/schemas/AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigMode"},"theme":{"$ref":"#/components/schemas/AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfigTheme"},"baseColor":{"type":"string"},"accentColor":{"type":"string"},"agentBubbleColor":{"type":"string"},"textOnAccentColor":{"type":"string"},"secondaryTextColor":{"type":"string"},"primaryTextColor":{"type":"string"},"title":{"type":"string"},"startButtonText":{"type":"string"},"endButtonText":{"type":"string"},"ctaTitle":{"type":["string","null"]},"ctaSubtitle":{"type":["string","null"]},"ctaName":{"type":["string","null"]},"widgetName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"description":"Must be a platform CDN URL. Use `POST /agent/{id}/avatar/presigned-url` to obtain one."},"voiceEmptyMessage":{"type":["string","null"]},"voiceActiveEmptyMessage":{"type":["string","null"]},"chatEmptyMessage":{"type":["string","null"]},"chatFirstMessage":{"type":["string","null"]},"chatPlaceholder":{"type":"string"},"voiceShowTranscript":{"type":"boolean"},"consentRequired":{"type":"boolean"},"consentTitle":{"type":"string"},"consentContent":{"type":"string"},"consentStorageKey":{"type":["string","null"]},"publicKey":{"type":"string"},"allowlist":{"type":"array","items":{"type":"string"}}},"description":"All fields are optional — only provided fields are updated","title":"AgentIdWidgetConfigPatchRequestBodyContentApplicationJsonSchemaWidgetConfig"},"AgentIdWidgetConfigPatchResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{},"description":"The updated widgetConfig object","title":"AgentIdWidgetConfigPatchResponsesContentApplicationJsonSchemaData"},"Agents_updateAgentWidgetConfig_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdWidgetConfigPatchResponsesContentApplicationJsonSchemaData","description":"The updated widgetConfig object"}},"title":"Agents_updateAgentWidgetConfig_Response_200"},"AgentIdAvatarPresignedUrlPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"presignedUrl":{"type":"string","description":"S3 pre-signed PUT URL (expires in 300 s)"},"cdnUrl":{"type":"string","description":"Final public CDN URL to save on the agent after upload"},"key":{"type":"string","description":"S3 object key"}},"title":"AgentIdAvatarPresignedUrlPostResponsesContentApplicationJsonSchemaData"},"Agents_getAgentAvatarPresignedUrl_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdAvatarPresignedUrlPostResponsesContentApplicationJsonSchemaData"}},"title":"Agents_getAgentAvatarPresignedUrl_Response_200"},"WorkflowGraphDataNodesItemsPosition":{"type":"object","properties":{"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"}},"title":"WorkflowGraphDataNodesItemsPosition"},"WorkflowGraphDataNodesItemsData":{"type":"object","properties":{},"description":"Node-specific data and configuration","title":"WorkflowGraphDataNodesItemsData"},"WorkflowGraphDataNodesItems":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node"},"type":{"type":"string","description":"Type of the node (e.g., default_node, end_call, pre_call_api)"},"position":{"$ref":"#/components/schemas/WorkflowGraphDataNodesItemsPosition"},"data":{"$ref":"#/components/schemas/WorkflowGraphDataNodesItemsData","description":"Node-specific data and configuration"}},"title":"WorkflowGraphDataNodesItems"},"WorkflowGraphDataEdgesItems":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the edge"},"source":{"type":"string","description":"ID of the source node"},"target":{"type":"string","description":"ID of the target node"},"type":{"type":"string","description":"Type of the edge"}},"title":"WorkflowGraphDataEdgesItems"},"WorkflowGraphData":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowGraphDataNodesItems"},"description":"Array of workflow nodes"},"edges":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowGraphDataEdgesItems"},"description":"Array of workflow edges connecting nodes"}},"description":"Workflow configuration using a node-based graph structure","title":"WorkflowGraphData"},"SinglePromptDataToolsItems":{"type":"object","properties":{},"description":"Tool configuration object","title":"SinglePromptDataToolsItems"},"SinglePromptData":{"type":"object","properties":{"prompt":{"type":"string","description":"The main prompt that defines the agent's behavior and responses"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/SinglePromptDataToolsItems"},"description":"Array of tools/functions available to the agent"}},"description":"Workflow configuration using a simple prompt-based approach","title":"SinglePromptData"},"AgentIdWorkflowGetResponsesContentApplicationJsonSchemaDataData":{"oneOf":[{"$ref":"#/components/schemas/WorkflowGraphData"},{"$ref":"#/components/schemas/SinglePromptData"}],"description":"Graph data for workflow_graph agents.","title":"AgentIdWorkflowGetResponsesContentApplicationJsonSchemaDataData"},"AgentIdWorkflowGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"prompt":{"type":"string","description":"Active prompt (single-prompt agents only)."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"Active tool list (single-prompt agents only)."},"type":{"$ref":"#/components/schemas/WorkflowType","description":"Workflow type. Present for workflow_graph agents."},"data":{"$ref":"#/components/schemas/AgentIdWorkflowGetResponsesContentApplicationJsonSchemaDataData","description":"Graph data for workflow_graph agents."}},"description":"The active version's workflow.","title":"AgentIdWorkflowGetResponsesContentApplicationJsonSchemaData"},"Agents_getAgentWorkflow_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdWorkflowGetResponsesContentApplicationJsonSchemaData","description":"The active version's workflow."}},"title":"Agents_getAgentWorkflow_Response_200"},"WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraphNodesItems":{"type":"object","properties":{},"title":"WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraphNodesItems"},"WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraphEdgesItems":{"type":"object","properties":{},"title":"WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraphEdgesItems"},"WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraph":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraphNodesItems"}},"edges":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraphEdgesItems"}}},"description":"Required when `type = workflow_graph`. Exactly one of `workflowGraph` or `singlePromptConfig` must be provided.","title":"WorkflowIdPatchRequestBodyContentApplicationJsonSchemaWorkflowGraph"},"SinglePromptConfig":{"type":"object","properties":{"prompt":{"type":"string","description":"The main prompt that defines the agent's behavior and responses"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"default":[],"description":"Array of tools/functions available to the agent during conversations.\nFive tool types are supported: `end_call`, `transfer_call`, `api_call`,\n`extract_dynamic_variables`, and `knowledge_base_search`. Each type has its\nown required fields — see `Tool` schema.\n"}},"required":["prompt"],"description":"Configuration for single prompt workflow type","title":"SinglePromptConfig"},"agents_update_workflow_configuration_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_update_workflow_configuration_Response_200"},"AgentIdCallLogsGetResponsesContentApplicationJsonSchemaDataCallLogsItems":{"type":"object","properties":{"callId":{"type":"string"},"callStatus":{"type":"string"},"callType":{"type":"string"},"fromNumber":{"type":"string"},"toNumber":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"callDuration":{"type":"number","format":"double","description":"Call duration in milliseconds"}},"title":"AgentIdCallLogsGetResponsesContentApplicationJsonSchemaDataCallLogsItems"},"AgentIdCallLogsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"callLogs":{"type":"array","items":{"$ref":"#/components/schemas/AgentIdCallLogsGetResponsesContentApplicationJsonSchemaDataCallLogsItems"}},"totalCount":{"type":"number","format":"double"},"page":{"type":"number","format":"double"},"offset":{"type":"number","format":"double"}},"title":"AgentIdCallLogsGetResponsesContentApplicationJsonSchemaData"},"Agents_getAgentCallLogs_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdCallLogsGetResponsesContentApplicationJsonSchemaData"}},"title":"Agents_getAgentCallLogs_Response_200"},"AgentIdArchiveDeleteResponsesContentApplicationJsonSchemaDataMessage":{"type":"string","enum":["Agent archived","Agent unarchived"],"description":"Human-readable outcome message","title":"AgentIdArchiveDeleteResponsesContentApplicationJsonSchemaDataMessage"},"AgentIdArchiveDeleteResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/AgentIdArchiveDeleteResponsesContentApplicationJsonSchemaDataMessage","description":"Human-readable outcome message"}},"title":"AgentIdArchiveDeleteResponsesContentApplicationJsonSchemaData"},"agents_archive_agent_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdArchiveDeleteResponsesContentApplicationJsonSchemaData"}},"title":"agents_archive_agent_Response_200"},"PromptScoringScoreAPromptRequest0":{"type":"object","properties":{"versionId":{"type":"string","description":"Published agent version ID (MongoDB ObjectId)."}},"required":["versionId"],"title":"PromptScoringScoreAPromptRequest0"},"PromptScoringScoreAPromptRequest1":{"type":"object","properties":{"draftId":{"type":"string","description":"Agent draft ID (MongoDB ObjectId)."}},"required":["draftId"],"title":"PromptScoringScoreAPromptRequest1"},"Prompt Scoring_scoreAPrompt_Request":{"oneOf":[{"$ref":"#/components/schemas/PromptScoringScoreAPromptRequest0"},{"$ref":"#/components/schemas/PromptScoringScoreAPromptRequest1"}],"description":"Exactly one of `versionId` or `draftId` must be provided.","title":"Prompt Scoring_scoreAPrompt_Request"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataOverallGrade":{"type":"string","enum":["Excellent","Good","Needs Work","Poor"],"description":"Human-readable grade.","title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataOverallGrade"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataBand":{"type":"string","enum":["lean","normal","heavy","overweight"],"description":"Token density band based on prompt length:\n- `lean` — fewer than 4K tokens\n- `normal` — 4K–9.9K tokens\n- `heavy` — 10K–14.9K tokens\n- `overweight` — 15K or more tokens\n","title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataBand"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItemsTier":{"type":"string","enum":["1","2","3"],"description":"Priority tier: 1 (highest), 2, or 3.","title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItemsTier"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItemsLevel":{"type":"string","enum":["Strong","Adequate","Weak","Missing","Not Applicable"],"description":"Quality level for this dimension.","title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItemsLevel"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItems":{"type":"object","properties":{"tier":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItemsTier","description":"Priority tier: 1 (highest), 2, or 3."},"level":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItemsLevel","description":"Quality level for this dimension."},"evidence_span":{"type":"string","description":"Quote from the prompt supporting the assessment. Empty string if no relevant content was found."},"title":{"type":"string","description":"Short dimension name."},"description":{"type":"string","description":"Explanation of the score for this dimension."}},"title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItems"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"overall_score":{"type":"integer","description":"0–100 quality score."},"overall_grade":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaDataOverallGrade","description":"Human-readable grade."},"band":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaDataBand","description":"Token density band based on prompt length:\n- `lean` — fewer than 4K tokens\n- `normal` — 4K–9.9K tokens\n- `heavy` — 10K–14.9K tokens\n- `overweight` — 15K or more tokens\n"},"estimated_ttft_overhead_ms":{"type":"number","format":"double","description":"Estimated first-token latency overhead in milliseconds introduced by the prompt length."},"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaDataDimensionsItems"},"description":"Per-dimension scoring results across 11 quality dimensions."}},"title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaData"},"Prompt Scoring_scoreAPrompt_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaData"}},"title":"Prompt Scoring_scoreAPrompt_Response_200"},"ScoreAPromptRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"ScoreAPromptRequestBadRequestError"},"ScoreAPromptRequestForbiddenError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"ScoreAPromptRequestForbiddenError"},"ScoreAPromptRequestNotFoundError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"ScoreAPromptRequestNotFoundError"},"PromptScoringScorePostResponsesContentApplicationJsonSchemaRateLimit":{"type":"object","properties":{"routeClass":{"type":"string"},"limit":{"type":"integer"},"retryAfterSec":{"type":"integer","description":"Seconds to wait before retrying."}},"title":"PromptScoringScorePostResponsesContentApplicationJsonSchemaRateLimit"},"ScoreAPromptRequestTooManyRequestsError":{"type":"object","properties":{"message":{"type":"string"},"rateLimit":{"$ref":"#/components/schemas/PromptScoringScorePostResponsesContentApplicationJsonSchemaRateLimit"}},"title":"ScoreAPromptRequestTooManyRequestsError"},"ScoreAPromptRequestInternalServerError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"ScoreAPromptRequestInternalServerError"},"ConversationGetParametersCallTypes":{"type":"string","enum":["telephony_inbound","telephony_outbound","webcall"],"title":"ConversationGetParametersCallTypes"},"ConversationGetParametersSortBy":{"type":"string","enum":["createdAt","updatedAt","callDuration","avgLatency"],"title":"ConversationGetParametersSortBy"},"ConversationGetParametersSortOrder":{"type":"string","enum":["asc","desc"],"title":"ConversationGetParametersSortOrder"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsStatus":{"type":"string","enum":["pending","in_progress","in_queue","processing","active","completed","failed","no_answer","cancelled"],"description":"The status of the call","title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsStatus"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsType":{"type":"string","enum":["telephony_inbound","telephony_outbound","webcall"],"description":"The type of call","title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsType"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsAgentDispositionConfigItems":{"type":"object","properties":{"identifier":{"type":"string"},"type":{"type":"string"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsAgentDispositionConfigItems"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems":{"type":"object","properties":{"identifier":{"type":"string","description":"Metric identifier matching the agent config"},"value":{"type":"string","description":"The evaluated value for this metric"},"confidence":{"type":"number","format":"double","description":"Confidence score for the evaluation (0–1)"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics":{"type":"object","properties":{"summary":{"type":"string","description":"Auto-generated summary of the call"},"dispositionMetrics":{"type":"array","items":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems"},"description":"Evaluated disposition metrics for this call"}},"description":"Post-call analytics results evaluated against the call transcript.\nContains disposition metric values with confidence scores.\n","title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems":{"type":"object","properties":{"turn":{"type":"number","format":"double"},"user_end":{"type":"number","format":"double","description":"Timestamp (ms) when the user finished speaking"},"bot_start":{"type":"number","format":"double","description":"Timestamp (ms) when the agent started responding"},"latency":{"type":"number","format":"double","description":"Latency for this turn in milliseconds"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics":{"type":"object","properties":{"avgLatency":{"type":"number","format":"double","description":"Average turn latency in milliseconds"},"medianLatency":{"type":"number","format":"double","description":"Median turn latency in milliseconds"},"minLatency":{"type":"number","format":"double","description":"Minimum turn latency in milliseconds"},"maxLatency":{"type":"number","format":"double","description":"Maximum turn latency in milliseconds"},"turns":{"type":"number","format":"double","description":"Total number of turns in the call"},"latencies":{"type":"array","items":{"type":"number","format":"double"},"description":"Array of individual turn latencies in milliseconds"},"transitions":{"type":"array","items":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems"},"description":"Per-turn timing breakdown."},"processedAt":{"type":"string","format":"date-time","description":"When the latency metrics were computed."}},"description":"Per-turn latency statistics for the call","title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics"},"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItems":{"type":"object","properties":{"_id":{"type":"string","description":"The database ID of the call log"},"callId":{"type":"string","description":"The unique call identifier"},"status":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsStatus","description":"The status of the call"},"duration":{"type":"number","format":"double","description":"The duration of the call in seconds"},"from":{"type":"string","description":"The phone number the call was made from"},"to":{"type":"string","description":"The phone number the call was made to"},"type":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsType","description":"The type of call"},"agentId":{"type":"string","description":"The ID of the agent that handled the call"},"recordingUrl":{"type":"string","description":"URL to the call recording (if available)"},"recordingDualUrl":{"type":"string","description":"URL to the dual-channel call recording (if available)"},"disconnectionReason":{"type":"string","description":"The reason the call was disconnected"},"retryCount":{"type":"integer","description":"Number of retry attempts for this call"},"createdAt":{"type":"string","format":"date-time","description":"When the call was created"},"dispositionMetrics":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom disposition metrics for the call"},"agentDispositionConfig":{"type":"array","items":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsAgentDispositionConfigItems"},"description":"Configuration for disposition metrics"},"callFailureReason":{"type":"string","description":"Reason the call failed, if applicable"},"callCost":{"type":"number","format":"double","description":"Discounted total cost of the call"},"versionId":{"type":"string","description":"ID of the agent version that handled this call"},"versionNumber":{"type":"number","format":"double","description":"Human-readable version number of the agent version used"},"isTest":{"type":"boolean","description":"Whether this was a test call"},"retryCallId":{"type":"string","description":"ID of the retry call if this call was retried"},"retryAttemptNumber":{"type":"number","format":"double","description":"Which retry attempt this was (0 = initial, 1 = first retry, etc.)"},"postCallAnalytics":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics","description":"Post-call analytics results evaluated against the call transcript.\nContains disposition metric values with confidence scores.\n"},"turnLatencyMetrics":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics","description":"Per-turn latency statistics for the call"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaDataLogsItems"},"ConversationGetResponsesContentApplicationJsonSchemaDataPagination":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of matching call logs"},"page":{"type":"integer","description":"Current page number"},"limit":{"type":"integer","description":"Number of items per page (page size)"},"hasMore":{"type":"boolean","description":"Whether there are more pages available"},"totalPages":{"type":"integer","description":"Total number of pages"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaDataPagination"},"ConversationGetResponsesContentApplicationJsonSchemaDataDispositionMetricsConfigItems":{"type":"object","properties":{"identifier":{"type":"string"},"type":{"type":"string"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaDataDispositionMetricsConfigItems"},"ConversationGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataLogsItems"}},"pagination":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataPagination"},"dispositionMetricsConfig":{"type":"array","items":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaDataDispositionMetricsConfigItems"},"description":"Global disposition metrics configuration"}},"title":"ConversationGetResponsesContentApplicationJsonSchemaData"},"calls_list_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationGetResponsesContentApplicationJsonSchemaData"}},"title":"calls_list_Response_200"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsStatus":{"type":"string","enum":["pending","in_progress","in_queue","processing","active","completed","failed","no_answer","cancelled"],"description":"The status of the call","title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsStatus"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsType":{"type":"string","enum":["telephony_inbound","telephony_outbound","webcall"],"description":"The type of call","title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsType"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems":{"type":"object","properties":{"identifier":{"type":"string"},"value":{"type":"string"},"confidence":{"type":"number","format":"double"}},"title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics":{"type":"object","properties":{"summary":{"type":"string"},"dispositionMetrics":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems"}}},"description":"Post-call analytics results evaluated against the call transcript","title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems":{"type":"object","properties":{"turn":{"type":"number","format":"double"},"user_end":{"type":"number","format":"double"},"bot_start":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"}},"title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics":{"type":"object","properties":{"avgLatency":{"type":"number","format":"double"},"medianLatency":{"type":"number","format":"double"},"minLatency":{"type":"number","format":"double"},"maxLatency":{"type":"number","format":"double"},"turns":{"type":"number","format":"double"},"latencies":{"type":"array","items":{"type":"number","format":"double"}},"transitions":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems"}},"processedAt":{"type":"string","format":"date-time"}},"description":"Per-turn latency statistics for the call","title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics"},"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItems":{"type":"object","properties":{"_id":{"type":"string","description":"The database ID of the call log"},"callId":{"type":"string","description":"The unique call identifier"},"status":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsStatus","description":"The status of the call"},"duration":{"type":"number","format":"double","description":"The duration of the call in seconds"},"from":{"type":"string","description":"The phone number the call was made from"},"to":{"type":"string","description":"The phone number the call was made to"},"type":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsType","description":"The type of call"},"agentId":{"type":"string","description":"The ID of the agent that handled the call"},"recordingUrl":{"type":"string","description":"URL to the call recording (if available)"},"recordingDualUrl":{"type":"string","description":"URL to the dual-channel call recording (if available)"},"disconnectionReason":{"type":"string","description":"The reason the call was disconnected"},"retryCount":{"type":"integer","description":"Number of retry attempts for this call"},"createdAt":{"type":"string","format":"date-time","description":"When the call was created"},"callFailureReason":{"type":"string","description":"Reason the call failed, if applicable"},"callCost":{"type":"number","format":"double","description":"Discounted total cost of the call"},"versionId":{"type":"string","description":"ID of the agent version that handled this call"},"isTest":{"type":"boolean","description":"Whether this was a test call"},"retryCallId":{"type":"string","description":"ID of the retry call if this call was retried"},"retryAttemptNumber":{"type":"number","format":"double","description":"Which retry attempt this was (0 = initial)"},"postCallAnalytics":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics","description":"Post-call analytics results evaluated against the call transcript"},"turnLatencyMetrics":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics","description":"Per-turn latency statistics for the call"}},"title":"ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItems"},"ConversationSearchPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItems"}},"total":{"type":"integer","description":"Number of logs returned"},"requestedCount":{"type":"integer","description":"Number of callIds requested"}},"title":"ConversationSearchPostResponsesContentApplicationJsonSchemaData"},"calls_search_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaData"}},"title":"calls_search_Response_200"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataStatus":{"type":"string","enum":["pending","in_progress","in_queue","processing","active","completed","failed","no_answer","cancelled"],"description":"The status of the conversation","title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataStatus"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataType":{"type":"string","enum":["telephony_inbound","telephony_outbound","webcall"],"description":"The type of the conversation","title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataType"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataTranscriptItemsRole":{"type":"string","enum":["agent","user"],"description":"Who spoke this turn","title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataTranscriptItemsRole"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataTranscriptItems":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataTranscriptItemsRole","description":"Who spoke this turn"},"content":{"type":"string","description":"The spoken text for this turn"},"timestamp":{"type":"number","format":"double","description":"Timestamp offset in milliseconds from call start"}},"title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataTranscriptItems"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataPostCallAnalyticsDispositionMetricsItems":{"type":"object","properties":{"identifier":{"type":"string","description":"Metric identifier matching the agent config"},"value":{"type":"string","description":"The evaluated value for this metric"},"confidence":{"type":"number","format":"double","description":"Confidence score for the evaluation (0–1)"}},"title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataPostCallAnalyticsDispositionMetricsItems"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataPostCallAnalytics":{"type":"object","properties":{"summary":{"type":"string","description":"Auto-generated summary of the call"},"dispositionMetrics":{"type":"array","items":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataPostCallAnalyticsDispositionMetricsItems"},"description":"Evaluated disposition metrics for this call"}},"description":"Post-call analytics results evaluated against the call transcript","title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataPostCallAnalytics"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataTurnLatencyMetricsTransitionsItems":{"type":"object","properties":{"turn":{"type":"number","format":"double"},"user_end":{"type":"number","format":"double","description":"Timestamp (ms) when the user finished speaking"},"bot_start":{"type":"number","format":"double","description":"Timestamp (ms) when the agent started responding"},"latency":{"type":"number","format":"double","description":"Latency for this turn in milliseconds"}},"title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataTurnLatencyMetricsTransitionsItems"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataTurnLatencyMetrics":{"type":"object","properties":{"turns":{"type":"number","format":"double","description":"Total number of turns in the call"},"avgLatency":{"type":"number","format":"double","description":"Average turn latency in milliseconds"},"medianLatency":{"type":"number","format":"double","description":"Median turn latency in milliseconds"},"minLatency":{"type":"number","format":"double","description":"Minimum turn latency in milliseconds"},"maxLatency":{"type":"number","format":"double","description":"Maximum turn latency in milliseconds"},"latencies":{"type":"array","items":{"type":"number","format":"double"},"description":"Array of individual turn latencies in milliseconds"},"transitions":{"type":"array","items":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataTurnLatencyMetricsTransitionsItems"},"description":"Per-turn timing breakdown"},"processedAt":{"type":"string","format":"date-time","description":"When the latency metrics were computed"}},"description":"Per-turn latency statistics for the call. Replaces the deprecated average_*_latency fields.","title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataTurnLatencyMetrics"},"ConversationIdGetResponsesContentApplicationJsonSchemaDataVoiceConfigUsed":{"type":"object","properties":{"model":{"type":"string","description":"The TTS model used for the call"},"voiceId":{"type":"string","description":"The voice ID used for the call"},"gender":{"type":"string","description":"The gender of the voice used for the call"}},"description":"The voice configuration that was actually used for this call","title":"ConversationIdGetResponsesContentApplicationJsonSchemaDataVoiceConfigUsed"},"ConversationIdGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The database ID of the conversation log"},"callId":{"type":"string","description":"The unique call identifier"},"agent":{"$ref":"#/components/schemas/AgentDTO"},"status":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataStatus","description":"The status of the conversation"},"duration":{"type":"number","format":"double","description":"The duration of the conversation in seconds"},"recordingUrl":{"type":"string","description":"The recording URL of the conversation"},"recordingDualUrl":{"type":"string","description":"URL to the dual-channel recording of the conversation"},"from":{"type":"string","description":"The phone number of the caller"},"to":{"type":"string","description":"The phone number of the callee"},"type":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataType","description":"The type of the conversation"},"transcript":{"type":"array","items":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataTranscriptItems"},"description":"The reconstructed transcript of the conversation"},"variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Runtime variables resolved and used during the call"},"events":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"Raw event stream from the relay service"},"callCost":{"type":"number","format":"double","description":"Discounted total cost of the call"},"callFailureReason":{"type":"string","description":"Reason the call failed, if applicable"},"retryCallId":{"type":"string","description":"ID of the retry call if this call was retried"},"postCallAnalytics":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataPostCallAnalytics","description":"Post-call analytics results evaluated against the call transcript"},"turnLatencyMetrics":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataTurnLatencyMetrics","description":"Per-turn latency statistics for the call. Replaces the deprecated average_*_latency fields."},"voiceConfigUsed":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaDataVoiceConfigUsed","description":"The voice configuration that was actually used for this call"},"slmModelUsed":{"type":"string","description":"The SLM/LLM model that was actually used for this call"}},"title":"ConversationIdGetResponsesContentApplicationJsonSchemaData"},"calls_get_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationIdGetResponsesContentApplicationJsonSchemaData"}},"title":"calls_get_Response_200"},"ConversationOutboundPostParametersXTestCall":{"type":"string","enum":["true"],"title":"ConversationOutboundPostParametersXTestCall"},"ConversationOutboundPostRequestBodyContentApplicationJsonSchemaVariables":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"title":"ConversationOutboundPostRequestBodyContentApplicationJsonSchemaVariables"},"ConversationOutboundPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"conversationId":{"type":"string","description":"The callId of the initiated call (format `CALL-{13-digit-timestamp}-{6-char-hex}`).\nUse this value as the `id` path parameter in `GET /conversation/{id}` and as an\nentry in `POST /conversation/search`.\n"}},"title":"ConversationOutboundPostResponsesContentApplicationJsonSchemaData"},"calls_start_outbound_call_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationOutboundPostResponsesContentApplicationJsonSchemaData"}},"title":"calls_start_outbound_call_Response_200"},"CallActionsGetParametersCategory":{"type":"string","enum":["trigger","post-call"],"title":"CallActionsGetParametersCategory"},"CallActionCategory":{"type":"string","enum":["trigger","post-call"],"description":"When the action fires","title":"CallActionCategory"},"CallActionActionType":{"type":"string","enum":["create","update"],"description":"The operation performed on the provider object","title":"CallActionActionType"},"CallActionConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","nin","contains","notContains","startsWith","endsWith"],"description":"Comparison operator","title":"CallActionConditionOperator"},"CallActionCondition":{"type":"object","properties":{"field":{"type":"string","description":"Provider record field name"},"operator":{"$ref":"#/components/schemas/CallActionConditionOperator","description":"Comparison operator"},"value":{"type":"string","description":"Value to compare against"}},"required":["field","operator","value"],"description":"A filter condition evaluated against provider record fields","title":"CallActionCondition"},"CallActionConfig":{"type":"object","properties":{"phoneNumberFieldName":{"type":"string","description":"Provider field that contains the phone number (required for `trigger` actions)"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CallActionCondition"}},"body":{"type":"string","description":"Request body template or payload for the provider action"}},"title":"CallActionConfig"},"CallAction":{"type":"object","properties":{"_id":{"type":"string","description":"MongoDB ObjectId"},"organization":{"type":"string","description":"Organization ObjectId"},"agentId":{"type":"string","description":"Agent ObjectId this action belongs to"},"category":{"$ref":"#/components/schemas/CallActionCategory","description":"When the action fires"},"provider":{"type":"string","description":"Integration provider (e.g. `hubspot`, `salesforce`)"},"action_type":{"$ref":"#/components/schemas/CallActionActionType","description":"The operation performed on the provider object"},"object":{"type":"string","description":"Provider object type (e.g. `contact`, `deal`)"},"config":{"$ref":"#/components/schemas/CallActionConfig"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"A call action that fires automatically at a specific point in the call lifecycle","title":"CallAction"},"CallActionsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"callActions":{"type":"array","items":{"$ref":"#/components/schemas/CallAction"}},"totalCount":{"type":"number","format":"double"},"page":{"type":"number","format":"double"},"limit":{"type":"number","format":"double"}},"title":"CallActionsGetResponsesContentApplicationJsonSchemaData"},"Call Actions_listCallActions_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CallActionsGetResponsesContentApplicationJsonSchemaData"}},"title":"Call Actions_listCallActions_Response_200"},"CallActionsPostRequestBodyContentApplicationJsonSchemaCategory":{"type":"string","enum":["trigger","post-call"],"description":"When the action fires","title":"CallActionsPostRequestBodyContentApplicationJsonSchemaCategory"},"CallActionsPostRequestBodyContentApplicationJsonSchemaActionType":{"type":"string","enum":["create","update"],"description":"The operation to perform on the provider object","title":"CallActionsPostRequestBodyContentApplicationJsonSchemaActionType"},"CallActionsPostRequestBodyContentApplicationJsonSchemaConfig":{"type":"object","properties":{"phoneNumberFieldName":{"type":"string","description":"Provider field name that contains the phone number. Required when `category` is `trigger`."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CallActionCondition"},"description":"Filter conditions — action only fires when all conditions match"},"body":{"type":"string","description":"Request body template or payload for the provider action"}},"title":"CallActionsPostRequestBodyContentApplicationJsonSchemaConfig"},"Call Actions_createCallAction_Response_201":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CallAction"}},"title":"Call Actions_createCallAction_Response_201"},"Call Actions_getCallAction_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CallAction"}},"title":"Call Actions_getCallAction_Response_200"},"CallActionsIdPutRequestBodyContentApplicationJsonSchemaCategory":{"type":"string","enum":["trigger","post-call"],"description":"Change when the action fires","title":"CallActionsIdPutRequestBodyContentApplicationJsonSchemaCategory"},"CallActionsIdPutRequestBodyContentApplicationJsonSchemaActionType":{"type":"string","enum":["create","update"],"description":"Change the operation type","title":"CallActionsIdPutRequestBodyContentApplicationJsonSchemaActionType"},"CallActionsIdPutRequestBodyContentApplicationJsonSchemaConfig":{"type":"object","properties":{"phoneNumberFieldName":{"type":"string","description":"Update the phone number field mapping"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CallActionCondition"},"description":"Replace the full conditions array"},"body":{"type":"string","description":"Update the payload body"}},"title":"CallActionsIdPutRequestBodyContentApplicationJsonSchemaConfig"},"Call Actions_updateCallAction_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CallAction"}},"title":"Call Actions_updateCallAction_Response_200"},"CallActionsIdDeleteResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"message":{"type":"string"}},"title":"CallActionsIdDeleteResponsesContentApplicationJsonSchemaData"},"Call Actions_deleteCallAction_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CallActionsIdDeleteResponsesContentApplicationJsonSchemaData"}},"title":"Call Actions_deleteCallAction_Response_200"},"ConcurrencyGetResponsesContentApplicationJsonSchemaDataAgentsItems":{"type":"object","properties":{"agentId":{"type":"string","description":"Agent ObjectId"},"agentName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"webcall":{"type":"number","format":"double","description":"Reserved webcall slots"},"outbound":{"type":"number","format":"double","description":"Reserved outbound call slots"},"inbound":{"type":"number","format":"double","description":"Reserved inbound call slots"},"chat":{"type":"number","format":"double","description":"Reserved chat slots"}},"title":"ConcurrencyGetResponsesContentApplicationJsonSchemaDataAgentsItems"},"ConcurrencyGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgLimit":{"type":"number","format":"double","description":"Total concurrent calls allowed for this organization"},"totalReserved":{"type":"number","format":"double","description":"Sum of all agent reservations across all channels"},"unreservedPool":{"type":"number","format":"double","description":"orgLimit minus totalReserved — capacity available to any agent"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ConcurrencyGetResponsesContentApplicationJsonSchemaDataAgentsItems"}}},"title":"ConcurrencyGetResponsesContentApplicationJsonSchemaData"},"Concurrency_getConcurrency_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConcurrencyGetResponsesContentApplicationJsonSchemaData"}},"title":"Concurrency_getConcurrency_Response_200"},"ConcurrencyReservationsPutRequestBodyContentApplicationJsonSchemaReservationsItems":{"type":"object","properties":{"agentId":{"type":"string","description":"Agent ObjectId"},"webcall":{"type":"integer","description":"Reserved webcall slots"},"outbound":{"type":"integer","description":"Reserved outbound call slots"},"inbound":{"type":"integer","description":"Reserved inbound call slots"},"chat":{"type":"integer","description":"Reserved chat slots"}},"required":["agentId","webcall","outbound","inbound","chat"],"title":"ConcurrencyReservationsPutRequestBodyContentApplicationJsonSchemaReservationsItems"},"ConcurrencyReservationsPutResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"updated":{"type":"number","format":"double","description":"Count of agent reservations updated"}},"title":"ConcurrencyReservationsPutResponsesContentApplicationJsonSchemaData"},"Concurrency_updateConcurrencyReservations_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConcurrencyReservationsPutResponsesContentApplicationJsonSchemaData"}},"title":"Concurrency_updateConcurrencyReservations_Response_200"},"CampaignGetParametersStatus":{"type":"string","enum":["draft","scheduled","processing","running","paused","completed","failed"],"title":"CampaignGetParametersStatus"},"CampaignGetParametersSortField":{"type":"string","enum":["createdAt","updatedAt"],"default":"createdAt","title":"CampaignGetParametersSortField"},"CampaignGetParametersSortOrder":{"type":"string","enum":["asc","desc"],"default":"desc","title":"CampaignGetParametersSortOrder"},"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsAgent":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"workflowType":{"type":"string"}},"description":"The agent assigned to this campaign","title":"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsAgent"},"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsAudience":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}},"description":"The audience assigned to this campaign","title":"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsAudience"},"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsStatus":{"type":"string","enum":["draft","scheduled","processing","running","paused","completed","failed"],"description":"Current status of the campaign","title":"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsStatus"},"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItems":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the campaign"},"name":{"type":"string","description":"The name of the campaign"},"description":{"type":"string","description":"The description of the campaign"},"organization":{"type":"string","description":"The ID of the organization"},"agent":{"$ref":"#/components/schemas/CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsAgent","description":"The agent assigned to this campaign"},"audience":{"$ref":"#/components/schemas/CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsAudience","description":"The audience assigned to this campaign"},"createdBy":{"type":"string","description":"The ID of the user who created the campaign"},"participantsCount":{"type":"integer","description":"The number of participants in the campaign"},"status":{"$ref":"#/components/schemas/CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItemsStatus","description":"Current status of the campaign"},"maxRetries":{"type":"integer","description":"Maximum retry attempts per failed call"},"retryDelay":{"type":"integer","description":"Delay in minutes between retry attempts"},"retryAttempts":{"type":"integer","description":"Total retry attempts made so far"},"scheduledAt":{"type":"string","format":"date-time"},"pausedAt":{"type":"string","format":"date-time"},"cancelledCallsCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the campaign was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the campaign was last updated"}},"title":"CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItems"},"CampaignGetResponsesContentApplicationJsonSchemaDataPagination":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"offset":{"type":"integer"},"hasMore":{"type":"boolean"},"totalPages":{"type":"integer"}},"title":"CampaignGetResponsesContentApplicationJsonSchemaDataPagination"},"CampaignGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/CampaignGetResponsesContentApplicationJsonSchemaDataCampaignsItems"}},"pagination":{"$ref":"#/components/schemas/CampaignGetResponsesContentApplicationJsonSchemaDataPagination"},"totalCampaignCount":{"type":"integer","description":"Total number of campaigns in the organization (unfiltered)"}},"title":"CampaignGetResponsesContentApplicationJsonSchemaData"},"campaigns_list_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CampaignGetResponsesContentApplicationJsonSchemaData"}},"title":"campaigns_list_Response_200"},"CampaignPostResponsesContentApplicationJsonSchemaDataStatus":{"type":"string","enum":["draft","scheduled","processing","running","paused","completed","failed"],"description":"Current campaign status.","title":"CampaignPostResponsesContentApplicationJsonSchemaDataStatus"},"CampaignPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the campaign"},"name":{"type":"string","description":"The name of the campaign"},"description":{"type":"string","description":"The description of the campaign"},"organization":{"type":"string","description":"The ID of the organization"},"agentId":{"type":"string","description":"Raw ObjectId of the agent (not a nested object)"},"createdBy":{"type":"string","description":"The ID of the user who created the campaign"},"audienceId":{"type":"string","description":"Raw ObjectId of the audience (not a nested object)"},"participantsCount":{"type":"integer","description":"The number of participants in the campaign"},"scheduledAt":{"type":"string","format":"date-time","description":"The scheduled start time, if provided at creation."},"maxRetries":{"type":"integer","description":"Maximum retries per failed call (echoes request)."},"retryDelay":{"type":"integer","description":"Delay in minutes between retry attempts (echoes request)."},"retryAttempts":{"type":"integer","description":"Number of retries attempted so far across the campaign."},"status":{"$ref":"#/components/schemas/CampaignPostResponsesContentApplicationJsonSchemaDataStatus","description":"Current campaign status."},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the campaign was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the campaign was last updated"}},"title":"CampaignPostResponsesContentApplicationJsonSchemaData"},"campaigns_create_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CampaignPostResponsesContentApplicationJsonSchemaData"}},"title":"campaigns_create_Response_201"},"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignAgent":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"workflowType":{"type":"string"}},"description":"The agent assigned to this campaign","title":"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignAgent"},"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignAudience":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}},"description":"The audience assigned to this campaign","title":"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignAudience"},"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignStatus":{"type":"string","enum":["draft","scheduled","processing","running","paused","completed","failed"],"description":"The current status of the campaign","title":"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignStatus"},"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaign":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the campaign"},"name":{"type":"string","description":"The name of the campaign"},"description":{"type":"string","description":"The description of the campaign"},"organization":{"type":"string","description":"The ID of the organization"},"agent":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignAgent","description":"The agent assigned to this campaign"},"audience":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignAudience","description":"The audience assigned to this campaign"},"createdBy":{"type":"string","description":"The ID of the user who created the campaign"},"participantsCount":{"type":"integer","description":"The number of participants in the campaign"},"status":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaignStatus","description":"The current status of the campaign"},"maxRetries":{"type":"integer","description":"Maximum number of retry attempts"},"retryDelay":{"type":"integer","description":"Delay between retries in minutes"},"retryAttempts":{"type":"integer","description":"Total retry attempts made so far"},"scheduledAt":{"type":"string","format":"date-time","description":"Scheduled start time for the campaign"},"pausedAt":{"type":"string","format":"date-time","description":"When the campaign was paused"},"cancelledCallsCount":{"type":"integer","description":"Number of calls cancelled (e.g. when campaign was paused)"},"error":{"type":"string","description":"Error message if the campaign failed"},"failedAt":{"type":"string","format":"date-time","description":"When the campaign entered failed state"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the campaign was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the campaign was last updated"}},"title":"CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaign"},"CampaignIdGetResponsesContentApplicationJsonSchemaDataEventsItems":{"type":"object","properties":{"_id":{"type":"string"},"triggerSource":{"type":"string"},"eventAction":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"title":"CampaignIdGetResponsesContentApplicationJsonSchemaDataEventsItems"},"CampaignIdGetResponsesContentApplicationJsonSchemaDataMetrics":{"type":"object","properties":{"total_participants":{"type":"integer","description":"Total number of contacts in the campaign audience"},"contacts_called":{"type":"integer","description":"Number of unique contacts where a call was attempted (statuses ACTIVE, COMPLETED, FAILED, NO_ANSWER)"},"contacts_connected":{"type":"integer","description":"Number of unique contacts who answered and had a conversation (status COMPLETED)"}},"description":"Campaign performance metrics","title":"CampaignIdGetResponsesContentApplicationJsonSchemaDataMetrics"},"CampaignIdGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaDataCampaign"},"events":{"type":"array","items":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaDataEventsItems"},"description":"Campaign events history"},"metrics":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaDataMetrics","description":"Campaign performance metrics"}},"title":"CampaignIdGetResponsesContentApplicationJsonSchemaData"},"campaigns_get_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CampaignIdGetResponsesContentApplicationJsonSchemaData"}},"title":"campaigns_get_Response_200"},"campaigns_delete_Response_200":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"campaigns_delete_Response_200"},"CampaignIdStartPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"message":{"type":"string"},"taskId":{"type":"string","description":"Internal task identifier for the queued job"},"campaignId":{"type":"string","description":"The ID of the campaign"}},"title":"CampaignIdStartPostResponsesContentApplicationJsonSchemaData"},"campaigns_start_or_resume_Response_202":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/CampaignIdStartPostResponsesContentApplicationJsonSchemaData"}},"title":"campaigns_start_or_resume_Response_202"},"campaigns_pause_Response_200":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"campaigns_pause_Response_200"},"KnowledgeBaseProcessingStatus":{"type":"string","enum":["pending","processing","completed","failed"],"description":"The current processing status of the knowledge base","title":"KnowledgeBaseProcessingStatus"},"KnowledgeBase":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the knowledge base"},"name":{"type":"string","description":"The name of the knowledge base"},"description":{"type":"string","description":"The description of the knowledge base"},"organization":{"type":"string","description":"The organization ID"},"createdBy":{"type":"string","description":"The user ID who created the knowledge base"},"processingStatus":{"$ref":"#/components/schemas/KnowledgeBaseProcessingStatus","description":"The current processing status of the knowledge base"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the knowledge base was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the knowledge base was last updated"}},"required":["_id","name","organization","createdBy"],"title":"KnowledgeBase"},"knowledge_base_list_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBase"}}},"title":"knowledge_base_list_Response_200"},"knowledge_base_create_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string"}},"title":"knowledge_base_create_Response_201"},"knowledge_base_get_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/KnowledgeBase"}},"title":"knowledge_base_get_Response_200"},"Knowledge Base_updateAKnowledgeBaseNameDescription_Response_200":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"Knowledge Base_updateAKnowledgeBaseNameDescription_Response_200"},"knowledge_base_delete_Response_200":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"knowledge_base_delete_Response_200"},"KnowledgeBaseItemItemType":{"type":"string","enum":["file","text"],"description":"The type of the knowledge base item","title":"KnowledgeBaseItemItemType"},"KnowledgeBaseItemMetadata":{"type":"object","properties":{},"description":"Additional metadata for the item","title":"KnowledgeBaseItemMetadata"},"KnowledgeBaseItemProcessingStatus":{"type":"string","enum":["pending","processing","completed","failed"],"description":"The processing status of the item","title":"KnowledgeBaseItemProcessingStatus"},"KnowledgeBaseItem":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the knowledge base item"},"itemType":{"$ref":"#/components/schemas/KnowledgeBaseItemItemType","description":"The type of the knowledge base item"},"metadata":{"$ref":"#/components/schemas/KnowledgeBaseItemMetadata","description":"Additional metadata for the item"},"knowledgeBaseId":{"type":"string","description":"The ID of the knowledge base this item belongs to"},"processingStatus":{"$ref":"#/components/schemas/KnowledgeBaseItemProcessingStatus","description":"The processing status of the item"},"fileName":{"type":"string","description":"The name of the file (for file type items)"},"contentType":{"type":"string","description":"The MIME type of the content"},"size":{"type":"number","format":"double","description":"The size of the file in bytes"},"key":{"type":"string","description":"The storage key for the file"},"title":{"type":"string","description":"The title of the item"},"content":{"type":"string","description":"The content of the item (for text type items)"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the item was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the item was last updated"}},"required":["_id","itemType","knowledgeBaseId","processingStatus","createdAt","updatedAt"],"title":"KnowledgeBaseItem"},"Knowledge Base_getAllKnowledgeBaseItems_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseItem"}}},"title":"Knowledge Base_getAllKnowledgeBaseItems_Response_200"},"Knowledge Base_deleteAKnowledgeBaseItem_Response_200":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"Knowledge Base_deleteAKnowledgeBaseItem_Response_200"},"Knowledge Base_uploadAPdfFileToAKnowledgeBase_Response_201":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"Knowledge Base_uploadAPdfFileToAKnowledgeBase_Response_201"},"KnowledgebaseGetPresignedUrlPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Time-limited presigned URL. PUT the file bytes here with `Content-Type` matching what you sent above."},"key":{"type":"string","description":"S3 storage key — pass this back in `POST /knowledgebase/compelete-file-upload`."}},"title":"KnowledgebaseGetPresignedUrlPostResponsesContentApplicationJsonSchemaData"},"Knowledge Base_getAPresignedS3UrlForDirectFileUpload_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/KnowledgebaseGetPresignedUrlPostResponsesContentApplicationJsonSchemaData"}},"title":"Knowledge Base_getAPresignedS3UrlForDirectFileUpload_Response_200"},"KnowledgebaseCompeleteFileUploadPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{},"description":"Created knowledge-base item record.","title":"KnowledgebaseCompeleteFileUploadPostResponsesContentApplicationJsonSchemaData"},"Knowledge Base_completeAPresignedUrlUploadAndStartProcessing_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/KnowledgebaseCompeleteFileUploadPostResponsesContentApplicationJsonSchemaData","description":"Created knowledge-base item record."}},"title":"Knowledge Base_completeAPresignedUrlUploadAndStartProcessing_Response_200"},"KnowledgebaseGetSitemapUrlsPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"All URLs discovered in the sitemap."},"extractedAt":{"type":"string","format":"date-time"}},"title":"KnowledgebaseGetSitemapUrlsPostResponsesContentApplicationJsonSchemaData"},"knowledge_base_extract_sitemap_urls_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/KnowledgebaseGetSitemapUrlsPostResponsesContentApplicationJsonSchemaData"}},"title":"knowledge_base_extract_sitemap_urls_Response_200"},"KnowledgebaseIdScrapeUrlsPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{},"description":"Async job acknowledgement. Inspect `/scraped-urls` for per-URL progress.","title":"KnowledgebaseIdScrapeUrlsPostResponsesContentApplicationJsonSchemaData"},"knowledge_base_scrape_urls_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/KnowledgebaseIdScrapeUrlsPostResponsesContentApplicationJsonSchemaData","description":"Async job acknowledgement. Inspect `/scraped-urls` for per-URL progress."}},"title":"knowledge_base_scrape_urls_Response_200"},"KnowledgebaseIdScrapedUrlsGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string"},"url":{"type":"string","format":"uri"},"status":{"type":"string","description":"Current scrape/index status (e.g. `pending`, `scraping`, `indexed`, `failed`)."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"title":"KnowledgebaseIdScrapedUrlsGetResponsesContentApplicationJsonSchemaDataItems"},"Knowledge Base_listScrapedUrLsInAKnowledgeBaseTheirStatus_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgebaseIdScrapedUrlsGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Knowledge Base_listScrapedUrLsInAKnowledgeBaseTheirStatus_Response_200"},"Knowledge Base_deleteAScrapedUrlFromAKnowledgeBase_Response_200":{"type":"object","properties":{"status":{"type":"boolean"}},"title":"Knowledge Base_deleteAScrapedUrlFromAKnowledgeBase_Response_200"},"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsProductType":{"type":"string","enum":["telephony"],"description":"The product type — always `telephony` for numbers returned by this endpoint","title":"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsProductType"},"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsAttributesProvider":{"type":"string","enum":["twilio","plivo"],"description":"The telephony provider","title":"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsAttributesProvider"},"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsAttributes":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsAttributesProvider","description":"The telephony provider"},"phoneNumber":{"type":"string","description":"The actual phone number in E.164 format"},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the number"},"areaCode":{"type":"string","description":"Area code of the number (if applicable)"},"complianceApplicationId":{"type":"string","description":"Compliance application ID associated with the number (if applicable)"}},"description":"Telephony provider attributes for the phone number","title":"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsAttributes"},"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the phone number"},"productType":{"$ref":"#/components/schemas/ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsProductType","description":"The product type — always `telephony` for numbers returned by this endpoint"},"isActive":{"type":"boolean","description":"Whether the phone number is active"},"agentId":{"type":["string","null"],"description":"ID of the agent currently assigned to this number, or null if unassigned"},"attributes":{"$ref":"#/components/schemas/ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItemsAttributes","description":"Telephony provider attributes for the phone number"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the phone number was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the phone number was last updated"}},"title":"ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItems"},"phone_numbers_list_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductPhoneNumbersGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"phone_numbers_list_Response_200"},"ProductProductType":{"type":"string","enum":["telephony","custom-telephony"],"description":"- `telephony` — number rented via the Atoms platform (Plivo/Twilio).\n- `custom-telephony` — number imported via `POST /product/import-phone-number` with the customer's own SIP trunk.\n","title":"ProductProductType"},"ProductAttributesProvider":{"type":"string","enum":["plivo","twilio"],"title":"ProductAttributesProvider"},"ProductAttributes":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/ProductAttributesProvider"},"phoneNumber":{"type":"string","description":"E.164 format including `+`."}},"description":"Provider-specific number metadata.","title":"ProductAttributes"},"Product":{"type":"object","properties":{"_id":{"type":"string","description":"24-char MongoDB ObjectId. Use this as `productId` when releasing, or assign to an agent via `PATCH /agent/{agentId}`."},"productType":{"$ref":"#/components/schemas/ProductProductType","description":"- `telephony` — number rented via the Atoms platform (Plivo/Twilio).\n- `custom-telephony` — number imported via `POST /product/import-phone-number` with the customer's own SIP trunk.\n"},"isActive":{"type":"boolean","description":"Whether the number is currently billable / serving traffic."},"attributes":{"$ref":"#/components/schemas/ProductAttributes","description":"Provider-specific number metadata."},"agentId":{"type":["string","null"],"description":"24-char MongoDB ObjectId of the agent this number is assigned to, if any. `null` when unassigned."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"A phone-number product owned by the organization — either a platform-rented number (`productType: telephony`) or a SIP-imported number (`productType: custom-telephony`).","title":"Product"},"ProductAllNumbersGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"telephonyProducts":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"customProducts":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"title":"ProductAllNumbersGetResponsesContentApplicationJsonSchemaData"},"Phone Numbers_listAllPhoneNumbersPlatformSip_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductAllNumbersGetResponsesContentApplicationJsonSchemaData"}},"title":"Phone Numbers_listAllPhoneNumbersPlatformSip_Response_200"},"ProductGetAvailableNumbersGetParametersProvider":{"type":"string","enum":["plivo","twilio"],"title":"ProductGetAvailableNumbersGetParametersProvider"},"ProductGetAvailableNumbersGetResponsesContentApplicationJsonSchemaDataItemsProvider":{"type":"string","enum":["plivo","twilio"],"title":"ProductGetAvailableNumbersGetResponsesContentApplicationJsonSchemaDataItemsProvider"},"ProductGetAvailableNumbersGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"E.164-style number without the leading `+`. Pass exactly this value to `POST /product/rent-number`."},"countryCode":{"type":"string"},"provider":{"$ref":"#/components/schemas/ProductGetAvailableNumbersGetResponsesContentApplicationJsonSchemaDataItemsProvider"},"areaCode":{"type":"string","description":"Region / state / area-code label returned by the provider."}},"title":"ProductGetAvailableNumbersGetResponsesContentApplicationJsonSchemaDataItems"},"phone_numbers_search_rentable_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductGetAvailableNumbersGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"phone_numbers_search_rentable_Response_200"},"ProductProrationAmountGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"immediateCharge":{"type":"number","format":"double","description":"Amount that will be charged today (USD)."},"perNumberRecurringAmount":{"type":"number","format":"double","description":"Monthly per-number recurring charge after the prorated first period (USD)."},"monthlyRate":{"type":"number","format":"double"},"prorationAmount":{"type":"number","format":"double"},"daysRemaining":{"type":"integer"},"daysInMonth":{"type":"integer"},"proratedValue":{"type":"number","format":"double","description":"Fraction of the month remaining (`daysRemaining / daysInMonth`)."}},"title":"ProductProrationAmountGetResponsesContentApplicationJsonSchemaData"},"Phone Numbers_previewProratedRentalCostForRentingAPhoneNumberToday_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductProrationAmountGetResponsesContentApplicationJsonSchemaData"}},"title":"Phone Numbers_previewProratedRentalCostForRentingAPhoneNumberToday_Response_200"},"ProductRentNumberPostRequestBodyContentApplicationJsonSchemaProvider":{"type":"string","enum":["plivo","twilio"],"title":"ProductRentNumberPostRequestBodyContentApplicationJsonSchemaProvider"},"ProductRentNumberPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"requiresAction":{"type":"boolean","description":"If `true`, payment requires further customer action (3-D Secure / SCA). Surface the client-secret flow."}},"title":"ProductRentNumberPostResponsesContentApplicationJsonSchemaData"},"phone_numbers_rent_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductRentNumberPostResponsesContentApplicationJsonSchemaData"}},"title":"phone_numbers_rent_Response_200"},"ProductReleaseNumberPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"success":{"type":"boolean"}},"title":"ProductReleaseNumberPostResponsesContentApplicationJsonSchemaData"},"phone_numbers_release_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductReleaseNumberPostResponsesContentApplicationJsonSchemaData"}},"title":"phone_numbers_release_Response_200"},"ProductManageSubscriptionGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Time-limited Stripe Customer Portal URL. Empty object if not applicable."}},"title":"ProductManageSubscriptionGetResponsesContentApplicationJsonSchemaData"},"Phone Numbers_getStripeCustomerPortalUrl_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductManageSubscriptionGetResponsesContentApplicationJsonSchemaData"}},"title":"Phone Numbers_getStripeCustomerPortalUrl_Response_200"},"ProductUnpaidInvoicesGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"paymentRequired":{"type":"boolean","description":"When `true`, the org has at least one unpaid invoice. Surface a \"Pay balance\" CTA before allowing further billable actions."}},"title":"ProductUnpaidInvoicesGetResponsesContentApplicationJsonSchemaData"},"Phone Numbers_checkWhetherTheOrganizationHasUnpaidInvoices_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductUnpaidInvoicesGetResponsesContentApplicationJsonSchemaData"}},"title":"Phone Numbers_checkWhetherTheOrganizationHasUnpaidInvoices_Response_200"},"ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaDataProductType":{"type":"string","enum":["custom"],"description":"The type of product created — always `custom` for imported SIP numbers","title":"ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaDataProductType"},"ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaDataAttributes":{"type":"object","properties":{"name":{"type":"string","description":"Display name for the number"},"phoneNumber":{"type":"string","description":"The imported phone number"},"outboundSipTrunkId":{"type":"string","description":"Identifier for the outbound SIP trunk created"},"inboundSipTrunkId":{"type":"string","description":"Identifier for the inbound SIP trunk created"}},"title":"ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaDataAttributes"},"ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier of the created product"},"productType":{"$ref":"#/components/schemas/ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaDataProductType","description":"The type of product created — always `custom` for imported SIP numbers"},"isActive":{"type":"boolean","description":"Whether the number is active and ready to use"},"attributes":{"$ref":"#/components/schemas/ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaDataAttributes"},"agentId":{"type":["string","null"],"description":"ID of the agent assigned to this number (null if unassigned)"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the product was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the product was last updated"}},"title":"ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaData"},"phone_numbers_import_sip_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ProductImportPhoneNumberPostResponsesContentApplicationJsonSchemaData"}},"title":"phone_numbers_import_sip_Response_200"},"ImportASipPhoneNumberRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"},"description":"List of validation error messages"}},"title":"ImportASipPhoneNumberRequestBadRequestError"},"WebhookStatus":{"type":"string","enum":["enabled","disabled"],"description":"The status of the webhook","title":"WebhookStatus"},"WebhookAgent":{"type":"object","properties":{"_id":{"type":"string","description":"The ID of the agent"},"name":{"type":"string","description":"The name of the agent"},"description":{"type":"string","description":"The description of the agent"}},"title":"WebhookAgent"},"WebhookSubscriptionPopulatedEventType":{"type":"string","enum":["pre-conversation","post-conversation","analytics-completed"],"description":"The type of event subscribed to","title":"WebhookSubscriptionPopulatedEventType"},"WebhookSubscriptionPopulated":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the subscription"},"webhookId":{"type":"string","description":"The ID of the webhook"},"agentId":{"oneOf":[{"$ref":"#/components/schemas/WebhookAgent"},{"type":"null"}],"description":"The populated agent details, or null if not assigned"},"eventType":{"$ref":"#/components/schemas/WebhookSubscriptionPopulatedEventType","description":"The type of event subscribed to"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the subscription was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the subscription was last updated"}},"title":"WebhookSubscriptionPopulated"},"Webhook":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the webhook"},"url":{"type":"string","description":"The webhook endpoint URL"},"description":{"type":"string","description":"The description of the webhook"},"status":{"$ref":"#/components/schemas/WebhookStatus","description":"The status of the webhook"},"organizationId":{"type":"string","description":"The organization ID"},"createdBy":{"type":"string","description":"The user ID who created the webhook"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscriptionPopulated"},"description":"A list of subscriptions for the webhook with populated agent details."},"decryptedSecretKey":{"type":"string","description":"The decrypted signing secret for the webhook. This is only returned when fetching a single webhook by ID."},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the webhook was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the webhook was last updated"}},"title":"Webhook"},"WebhookGetResponsesContentApplicationJsonSchemaData1":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"},"title":"WebhookGetResponsesContentApplicationJsonSchemaData1"},"WebhookGetResponsesContentApplicationJsonSchemaData":{"oneOf":[{"$ref":"#/components/schemas/Webhook"},{"$ref":"#/components/schemas/WebhookGetResponsesContentApplicationJsonSchemaData1"}],"title":"WebhookGetResponsesContentApplicationJsonSchemaData"},"Webhooks_getWebhooks_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/WebhookGetResponsesContentApplicationJsonSchemaData"}},"title":"Webhooks_getWebhooks_Response_200"},"WebhookPostRequestBodyContentApplicationJsonSchemaEventsItemsEventType":{"type":"string","enum":["pre-conversation","post-conversation","analytics-completed"],"description":"The type of event to subscribe to","title":"WebhookPostRequestBodyContentApplicationJsonSchemaEventsItemsEventType"},"WebhookPostRequestBodyContentApplicationJsonSchemaEventsItems":{"type":"object","properties":{"agentId":{"type":"string","description":"The ID of the agent"},"eventType":{"$ref":"#/components/schemas/WebhookPostRequestBodyContentApplicationJsonSchemaEventsItemsEventType","description":"The type of event to subscribe to"}},"required":["agentId","eventType"],"title":"WebhookPostRequestBodyContentApplicationJsonSchemaEventsItems"},"webhooks_create_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"The ID of the created webhook"}},"title":"webhooks_create_Response_201"},"webhooks_delete_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"Success message"}},"title":"webhooks_delete_Response_200"},"DeleteAWebhookRequestNotFoundError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"DeleteAWebhookRequestNotFoundError"},"WebhookSubscriptionEventType":{"type":"string","enum":["pre-conversation","post-conversation","analytics-completed"],"description":"The type of event subscribed to","title":"WebhookSubscriptionEventType"},"WebhookSubscription":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the subscription"},"webhookId":{"type":"string","description":"The ID of the webhook"},"agentId":{"type":"string","description":"The ID of the agent"},"eventType":{"$ref":"#/components/schemas/WebhookSubscriptionEventType","description":"The type of event subscribed to"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the subscription was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the subscription was last updated"}},"title":"WebhookSubscription"},"Webhooks_getWebhookSubscriptionsForAnAgent_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}}},"title":"Webhooks_getWebhookSubscriptionsForAnAgent_Response_200"},"GetWebhookSubscriptionsForAnAgentRequestNotFoundError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"GetWebhookSubscriptionsForAnAgentRequestNotFoundError"},"AgentAgentIdWebhookSubscriptionsPostRequestBodyContentApplicationJsonSchemaEventTypesItems":{"type":"string","enum":["pre-conversation","post-conversation","analytics-completed"],"description":"The type of event to subscribe to","title":"AgentAgentIdWebhookSubscriptionsPostRequestBodyContentApplicationJsonSchemaEventTypesItems"},"Webhooks_replaceWebhookSubscriptionsForAnAgent_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"Success message"}},"title":"Webhooks_replaceWebhookSubscriptionsForAnAgent_Response_201"},"ReplaceWebhookSubscriptionsForAnAgentRequestNotFoundError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"ReplaceWebhookSubscriptionsForAnAgentRequestNotFoundError"},"Webhooks_deleteWebhookSubscriptionsForAnAgent_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"string","description":"Success message"}},"title":"Webhooks_deleteWebhookSubscriptionsForAnAgent_Response_200"},"DeleteWebhookSubscriptionsForAnAgentRequestNotFoundError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"DeleteWebhookSubscriptionsForAnAgentRequestNotFoundError"},"WebEngageIntegrationSet":{"type":"object","properties":{"licenseCode":{"type":"string","description":"WebEngage license code"},"environment":{"type":"string","description":"WebEngage environment identifier"},"apiKey":{"type":"string","description":"WebEngage API key"}},"required":["licenseCode","environment","apiKey"],"description":"A single WebEngage credential set","title":"WebEngageIntegrationSet"},"IntegrationModifyWebengageIntegrationPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{},"description":"Integration details object","title":"IntegrationModifyWebengageIntegrationPostResponsesContentApplicationJsonSchemaData"},"Integrations_modifyWebEngageIntegration_Response_200":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/IntegrationModifyWebengageIntegrationPostResponsesContentApplicationJsonSchemaData","description":"Integration details object"}},"title":"Integrations_modifyWebEngageIntegration_Response_200"},"IntegrationGetWebengageDetailsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{},"description":"Integration details object","title":"IntegrationGetWebengageDetailsGetResponsesContentApplicationJsonSchemaData"},"Integrations_getWebEngageDetails_Response_200":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/IntegrationGetWebengageDetailsGetResponsesContentApplicationJsonSchemaData","description":"Integration details object"}},"title":"Integrations_getWebEngageDetails_Response_200"},"AudienceGetResponsesContentApplicationJsonSchemaDataItemsCampaignsItems":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"title":"AudienceGetResponsesContentApplicationJsonSchemaDataItemsCampaignsItems"},"AudienceGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the audience"},"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"phoneNumberColumnName":{"type":"string","description":"The name of the column in the CSV that contains phone numbers"},"organization":{"type":"string","description":"The organization ID"},"createdBy":{"type":"string","description":"The user ID who created the audience"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the audience was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the audience was last updated"},"memberCount":{"type":"number","format":"double","description":"Current number of members in the audience"},"hasCampaigns":{"type":"boolean","description":"Whether any campaigns are currently using this audience"},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/AudienceGetResponsesContentApplicationJsonSchemaDataItemsCampaignsItems"},"description":"Active campaigns using this audience"}},"title":"AudienceGetResponsesContentApplicationJsonSchemaDataItems"},"audience_list_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AudienceGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"audience_list_Response_200"},"AudiencePostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the audience"},"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"phoneNumberColumnName":{"type":"string","description":"The name of the column in the CSV that contains phone numbers"},"identifierColumnName":{"type":"string","description":"The name of the column in the CSV that contains identifiers"},"organization":{"type":"string","description":"The organization ID"},"createdBy":{"type":"string","description":"The user ID who created the audience"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the audience was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the audience was last updated"}},"title":"AudiencePostResponsesContentApplicationJsonSchemaData"},"Audience_createAudienceWithCsvUpload_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AudiencePostResponsesContentApplicationJsonSchemaData"}},"title":"Audience_createAudienceWithCsvUpload_Response_200"},"CreateAudienceWithCsvUploadRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"CreateAudienceWithCsvUploadRequestBadRequestError"},"AudienceIdGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the audience"},"name":{"type":"string","description":"The name of the audience"},"description":{"type":"string","description":"The description of the audience"},"phoneNumberColumnName":{"type":"string","description":"The name of the column in the CSV that contains phone numbers"},"organization":{"type":"string","description":"The organization ID"},"createdBy":{"type":"string","description":"The user ID who created the audience"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the audience was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the audience was last updated"}},"title":"AudienceIdGetResponsesContentApplicationJsonSchemaData"},"audience_get_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AudienceIdGetResponsesContentApplicationJsonSchemaData"}},"title":"audience_get_Response_200"},"GetAudienceByIdRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"GetAudienceByIdRequestBadRequestError"},"Audience_deleteAudience_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"description":"Any type"}}},"title":"Audience_deleteAudience_Response_200"},"DeleteAudienceRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"DeleteAudienceRequestBadRequestError"},"AudienceIdMembersGetResponsesContentApplicationJsonSchemaDataMembersItemsData":{"type":"object","properties":{},"description":"Dynamic data from CSV, structure depends on uploaded file","title":"AudienceIdMembersGetResponsesContentApplicationJsonSchemaDataMembersItemsData"},"AudienceIdMembersGetResponsesContentApplicationJsonSchemaDataMembersItems":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the audience member"},"data":{"$ref":"#/components/schemas/AudienceIdMembersGetResponsesContentApplicationJsonSchemaDataMembersItemsData","description":"Dynamic data from CSV, structure depends on uploaded file"}},"title":"AudienceIdMembersGetResponsesContentApplicationJsonSchemaDataMembersItems"},"AudienceIdMembersGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AudienceIdMembersGetResponsesContentApplicationJsonSchemaDataMembersItems"}},"totalCount":{"type":"integer","description":"Total number of members in the audience"},"totalPages":{"type":"integer","description":"Total number of pages available"},"hasMore":{"type":"boolean","description":"Whether there are more pages available"}},"title":"AudienceIdMembersGetResponsesContentApplicationJsonSchemaData"},"Audience_getAudienceMembers_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AudienceIdMembersGetResponsesContentApplicationJsonSchemaData"}},"title":"Audience_getAudienceMembers_Response_200"},"GetAudienceMembersRequestBadRequestError":{"type":"object","properties":{"status":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"title":"GetAudienceMembersRequestBadRequestError"},"GetAudienceMembersRequestInternalServerError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"GetAudienceMembersRequestInternalServerError"},"AudienceIdMembersPostRequestBodyContentApplicationJsonSchemaMembersItems":{"type":"object","properties":{},"description":"Member data with keys matching the audience's CSV structure. Must include the phone number column.","title":"AudienceIdMembersPostRequestBodyContentApplicationJsonSchemaMembersItems"},"AudienceIdMembersPostResponsesContentApplicationJsonSchemaDataItemsData":{"type":"object","properties":{"added":{"type":"integer","description":"Number of members successfully added"},"skipped":{"type":"integer","description":"Number of members skipped (e.g., duplicates)"}},"title":"AudienceIdMembersPostResponsesContentApplicationJsonSchemaDataItemsData"},"AudienceIdMembersPostResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/AudienceIdMembersPostResponsesContentApplicationJsonSchemaDataItemsData"}},"title":"AudienceIdMembersPostResponsesContentApplicationJsonSchemaDataItems"},"Audience_addAudienceMembers_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AudienceIdMembersPostResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Audience_addAudienceMembers_Response_200"},"AddAudienceMembersRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"AddAudienceMembersRequestBadRequestError"},"AudienceIdMembersDeleteResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"Number of members successfully deleted"}},"title":"AudienceIdMembersDeleteResponsesContentApplicationJsonSchemaData"},"Audience_deleteAudienceMembers_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AudienceIdMembersDeleteResponsesContentApplicationJsonSchemaData"}},"title":"Audience_deleteAudienceMembers_Response_200"},"DeleteAudienceMembersRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"DeleteAudienceMembersRequestBadRequestError"},"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataMembersItemsData":{"type":"object","properties":{},"description":"Dynamic data from CSV, structure depends on uploaded file","title":"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataMembersItemsData"},"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataMembersItems":{"type":"object","properties":{"_id":{"type":"string","description":"The unique identifier for the audience member"},"data":{"$ref":"#/components/schemas/AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataMembersItemsData","description":"Dynamic data from CSV, structure depends on uploaded file"}},"title":"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataMembersItems"},"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataSearchInfoSearchType":{"type":"string","enum":["general","multiple"],"description":"The type of search performed","title":"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataSearchInfoSearchType"},"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataSearchInfo":{"type":"object","properties":{"searchType":{"$ref":"#/components/schemas/AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataSearchInfoSearchType","description":"The type of search performed"},"searchTerm":{"type":"string","description":"The search term(s) used"},"searchFields":{"type":"array","items":{"type":"string"},"description":"The specific fields searched (for field-specific searches)"},"totalResults":{"type":"integer","description":"The number of results returned"}},"description":"Information about the search performed","title":"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataSearchInfo"},"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataMembersItems"}},"searchInfo":{"$ref":"#/components/schemas/AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaDataSearchInfo","description":"Information about the search performed"}},"title":"AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaData"},"Audience_searchAudienceMembers_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AudienceIdMembersSearchGetResponsesContentApplicationJsonSchemaData"}},"title":"Audience_searchAudienceMembers_Response_200"},"SearchAudienceMembersRequestBadRequestError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"SearchAudienceMembersRequestBadRequestError"},"SearchAudienceMembersRequestInternalServerError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"SearchAudienceMembersRequestInternalServerError"},"AnalyticsCallCountsLogGetResponsesContentApplicationJsonSchemaDataCallsItems":{"type":"object","properties":{"orgId":{"type":"string"},"callId":{"type":"string"},"agentId":{"type":"string"},"agentName":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string"},"callType":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"callDurationMs":{"type":"number","format":"double"},"callLatencyMs":{"type":"number","format":"double"},"costSpent":{"type":"number","format":"double"},"disconnectionReason":{"type":"string"},"source":{"type":"string"},"recordingUrl":{"type":"string"},"callStatus":{"type":"string"},"fromNumber":{"type":"string"},"toNumber":{"type":"string"}},"title":"AnalyticsCallCountsLogGetResponsesContentApplicationJsonSchemaDataCallsItems"},"AnalyticsCallCountsLogGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"calls":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCallCountsLogGetResponsesContentApplicationJsonSchemaDataCallsItems"}},"totalCalls":{"type":"number","format":"double"},"totalPages":{"type":"number","format":"double"},"currentPage":{"type":"number","format":"double"},"limit":{"type":"number","format":"double"}},"title":"AnalyticsCallCountsLogGetResponsesContentApplicationJsonSchemaData"},"Analytics_getCallCountsLog_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsCallCountsLogGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getCallCountsLog_Response_200"},"AnalyticsCallCountsByDayGetResponsesContentApplicationJsonSchemaDataCallCountsByDayItems":{"type":"object","properties":{"day":{"type":"string","format":"date"},"count":{"type":"number","format":"double"}},"title":"AnalyticsCallCountsByDayGetResponsesContentApplicationJsonSchemaDataCallCountsByDayItems"},"AnalyticsCallCountsByDayGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"callCountsByDay":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCallCountsByDayGetResponsesContentApplicationJsonSchemaDataCallCountsByDayItems"}}},"title":"AnalyticsCallCountsByDayGetResponsesContentApplicationJsonSchemaData"},"Analytics_getCallCountsByDay_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsCallCountsByDayGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getCallCountsByDay_Response_200"},"AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaDataTranscriptItems":{"type":"object","properties":{"role":{"type":"string"},"text":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"title":"AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaDataTranscriptItems"},"AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaDataEventsItems":{"type":"object","properties":{"eventType":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"title":"AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaDataEventsItems"},"AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"callId":{"type":"string"},"agentName":{"type":"string"},"workflowType":{"type":"string"},"transcript":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaDataTranscriptItems"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaDataEventsItems"}},"fromNumber":{"type":"string"},"toNumber":{"type":"string"},"callDurationMs":{"type":"number","format":"double"}},"title":"AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaData"},"Analytics_getConversationDetails_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsConversationDetailsCallIdGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getConversationDetails_Response_200"},"AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaDataDateRange":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"title":"AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaDataDateRange"},"AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaDataDayWiseCreditsItems":{"type":"object","properties":{"date":{"type":"string","format":"date"},"credits":{"type":"number","format":"double"}},"title":"AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaDataDayWiseCreditsItems"},"AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"dateRange":{"$ref":"#/components/schemas/AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaDataDateRange"},"dayWiseCredits":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaDataDayWiseCreditsItems"}},"totalCredits":{"type":"number","format":"double"}},"title":"AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaData"},"Analytics_getUsageTimeseries_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsUsageTimeseriesGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getUsageTimeseries_Response_200"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataSummary":{"type":"object","properties":{},"description":"See GET /analytics/summary","title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataSummary"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataCallVolumeTimeseries":{"type":"object","properties":{},"description":"See GET /analytics/call-volume-timeseries","title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataCallVolumeTimeseries"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataCallOutcomesTimeseries":{"type":"object","properties":{},"description":"See GET /analytics/call-outcomes-timeseries","title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataCallOutcomesTimeseries"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataPickupRateByNumber":{"type":"object","properties":{},"description":"See GET /analytics/pickup-rate-by-number","title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataPickupRateByNumber"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataHourlyPerformance":{"type":"object","properties":{},"description":"See GET /analytics/hourly-performance","title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataHourlyPerformance"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataDurationStats":{"type":"object","properties":{},"description":"See GET /analytics/duration-stats","title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataDurationStats"},"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataSummary","description":"See GET /analytics/summary"},"callVolumeTimeseries":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataCallVolumeTimeseries","description":"See GET /analytics/call-volume-timeseries"},"callOutcomesTimeseries":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataCallOutcomesTimeseries","description":"See GET /analytics/call-outcomes-timeseries"},"pickupRateByNumber":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataPickupRateByNumber","description":"See GET /analytics/pickup-rate-by-number"},"hourlyPerformance":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataHourlyPerformance","description":"See GET /analytics/hourly-performance"},"durationStats":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaDataDurationStats","description":"See GET /analytics/duration-stats"}},"title":"AnalyticsDashboardGetResponsesContentApplicationJsonSchemaData"},"Analytics_getDashboard_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsDashboardGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getDashboard_Response_200"},"AnalyticsTrendMetric":{"type":"object","properties":{"current":{"type":"number","format":"double"},"previous":{"type":"number","format":"double"},"percentChange":{"type":"number","format":"double"}},"description":"A metric value with current and previous period values and percent change","title":"AnalyticsTrendMetric"},"AnalyticsDateRange":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"title":"AnalyticsDateRange"},"AnalyticsSummaryGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"totalCalls":{"$ref":"#/components/schemas/AnalyticsTrendMetric"},"pickupRate":{"$ref":"#/components/schemas/AnalyticsTrendMetric"},"avgDurationMs":{"$ref":"#/components/schemas/AnalyticsTrendMetric"},"medianDurationMs":{"type":"number","format":"double"},"totalDurationMs":{"$ref":"#/components/schemas/AnalyticsTrendMetric"},"uniqueUsersReached":{"$ref":"#/components/schemas/AnalyticsTrendMetric"},"totalCost":{"$ref":"#/components/schemas/AnalyticsTrendMetric"},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"},"previousPeriod":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsSummaryGetResponsesContentApplicationJsonSchemaData"},"Analytics_getAnalyticsSummary_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsSummaryGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getAnalyticsSummary_Response_200"},"AnalyticsCallVolumeTimeseriesGetResponsesContentApplicationJsonSchemaDataDataPointsItems":{"type":"object","properties":{"date":{"type":"string","format":"date"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"noAnswerCalls":{"type":"number","format":"double"},"failedCalls":{"type":"number","format":"double"},"cancelledCalls":{"type":"number","format":"double"},"totalDurationMs":{"type":"number","format":"double"}},"title":"AnalyticsCallVolumeTimeseriesGetResponsesContentApplicationJsonSchemaDataDataPointsItems"},"AnalyticsCallVolumeTimeseriesGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCallVolumeTimeseriesGetResponsesContentApplicationJsonSchemaDataDataPointsItems"}},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsCallVolumeTimeseriesGetResponsesContentApplicationJsonSchemaData"},"Analytics_getCallVolumeTimeseries_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsCallVolumeTimeseriesGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getCallVolumeTimeseries_Response_200"},"AnalyticsPickupRateByNumberGetResponsesContentApplicationJsonSchemaDataNumbersItems":{"type":"object","properties":{"phoneNumber":{"type":"string"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"},"lastActiveDate":{"type":"string","format":"date"}},"title":"AnalyticsPickupRateByNumberGetResponsesContentApplicationJsonSchemaDataNumbersItems"},"AnalyticsPickupRateByNumberGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsPickupRateByNumberGetResponsesContentApplicationJsonSchemaDataNumbersItems"}},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsPickupRateByNumberGetResponsesContentApplicationJsonSchemaData"},"Analytics_getPickupRateByNumber_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsPickupRateByNumberGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getPickupRateByNumber_Response_200"},"AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaDataTrendsItemsDataPointsItems":{"type":"object","properties":{"date":{"type":"string","format":"date"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"}},"title":"AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaDataTrendsItemsDataPointsItems"},"AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaDataTrendsItems":{"type":"object","properties":{"phoneNumber":{"type":"string"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaDataTrendsItemsDataPointsItems"}}},"title":"AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaDataTrendsItems"},"AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"trends":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaDataTrendsItems"}},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaData"},"Analytics_getPhoneNumberTrends_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsPhoneNumberTrendsGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getPhoneNumberTrends_Response_200"},"AnalyticsHourlyPerformanceGetResponsesContentApplicationJsonSchemaDataHoursItems":{"type":"object","properties":{"hour":{"type":"integer","description":"Hour of day (0–23)"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"},"totalDurationMs":{"type":"number","format":"double"},"avgDurationMs":{"type":"number","format":"double"}},"title":"AnalyticsHourlyPerformanceGetResponsesContentApplicationJsonSchemaDataHoursItems"},"AnalyticsHourlyPerformanceGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"hours":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsHourlyPerformanceGetResponsesContentApplicationJsonSchemaDataHoursItems"}},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsHourlyPerformanceGetResponsesContentApplicationJsonSchemaData"},"Analytics_getHourlyPerformance_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsHourlyPerformanceGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getHourlyPerformance_Response_200"},"AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaDataDataPointsItems":{"type":"object","properties":{"date":{"type":"string","format":"date"},"answered":{"type":"number","format":"double"},"noAnswer":{"type":"number","format":"double"},"failed":{"type":"number","format":"double"},"cancelled":{"type":"number","format":"double"},"total":{"type":"number","format":"double"}},"title":"AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaDataDataPointsItems"},"AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaDataTotals":{"type":"object","properties":{"answered":{"type":"number","format":"double"},"noAnswer":{"type":"number","format":"double"},"failed":{"type":"number","format":"double"},"cancelled":{"type":"number","format":"double"},"total":{"type":"number","format":"double"}},"title":"AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaDataTotals"},"AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaDataDataPointsItems"}},"totals":{"$ref":"#/components/schemas/AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaDataTotals"},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaData"},"Analytics_getCallOutcomesTimeseries_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsCallOutcomesTimeseriesGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getCallOutcomesTimeseries_Response_200"},"AnalyticsDurationStatsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"avgDurationMs":{"type":"number","format":"double"},"medianDurationMs":{"type":"number","format":"double"},"p90DurationMs":{"type":"number","format":"double"},"p95DurationMs":{"type":"number","format":"double"},"shortCallsPercent":{"type":"number","format":"double"},"longCallsPercent":{"type":"number","format":"double"},"totalCalls":{"type":"number","format":"double"},"totalDurationMs":{"type":"number","format":"double"},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsDurationStatsGetResponsesContentApplicationJsonSchemaData"},"Analytics_getDurationStats_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsDurationStatsGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getDurationStats_Response_200"},"AnalyticsWeeklyTrendsGetResponsesContentApplicationJsonSchemaDataWeeksItems":{"type":"object","properties":{"weekStart":{"type":"string","format":"date","description":"Monday that starts this week"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"},"avgDuration":{"type":"number","format":"double","description":"Average call duration in seconds"},"medianDuration":{"type":"number","format":"double","description":"Median call duration in seconds"},"p90Duration":{"type":"number","format":"double","description":"p90 call duration in seconds"},"shortCallsPercent":{"type":"number","format":"double"},"longCallsPercent":{"type":"number","format":"double"}},"title":"AnalyticsWeeklyTrendsGetResponsesContentApplicationJsonSchemaDataWeeksItems"},"AnalyticsWeeklyTrendsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"weeks":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsWeeklyTrendsGetResponsesContentApplicationJsonSchemaDataWeeksItems"}},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsWeeklyTrendsGetResponsesContentApplicationJsonSchemaData"},"Analytics_getWeeklyTrends_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsWeeklyTrendsGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getWeeklyTrends_Response_200"},"AnalyticsAgentPerformanceGetParametersSortOrder":{"type":"string","enum":["asc","desc"],"title":"AnalyticsAgentPerformanceGetParametersSortOrder"},"AnalyticsAgentPerformanceGetResponsesContentApplicationJsonSchemaDataAgentsItems":{"type":"object","properties":{"agentId":{"type":"string"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"},"avgDuration":{"type":"number","format":"double","description":"Average call duration in seconds"},"totalCost":{"type":"number","format":"double"}},"title":"AnalyticsAgentPerformanceGetResponsesContentApplicationJsonSchemaDataAgentsItems"},"AnalyticsAgentPerformanceGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsAgentPerformanceGetResponsesContentApplicationJsonSchemaDataAgentsItems"}},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsAgentPerformanceGetResponsesContentApplicationJsonSchemaData"},"Analytics_getAgentPerformance_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsAgentPerformanceGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getAgentPerformance_Response_200"},"AnalyticsConcurrencyGetParametersIncludeAgents":{"type":"string","enum":["true","false"],"title":"AnalyticsConcurrencyGetParametersIncludeAgents"},"AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaDataDataPointsItems":{"type":"object","properties":{"minute":{"type":"string","description":"Time in HH:MM format"},"concurrentCalls":{"type":"number","format":"double"}},"title":"AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaDataDataPointsItems"},"AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaDataByAgentItems":{"type":"object","properties":{"agentId":{"type":"string"},"peakConcurrent":{"type":"number","format":"double"},"avgConcurrent":{"type":"number","format":"double"},"totalCalls":{"type":"number","format":"double"}},"title":"AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaDataByAgentItems"},"AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"date":{"type":"string","format":"date"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaDataDataPointsItems"}},"peakConcurrent":{"type":"number","format":"double"},"avgConcurrent":{"type":"number","format":"double"},"totalMinutes":{"type":"number","format":"double"},"byAgent":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaDataByAgentItems"},"description":"Only present when `includeAgents=true`"}},"title":"AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaData"},"Analytics_getAnalyticsConcurrency_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsConcurrencyGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getAnalyticsConcurrency_Response_200"},"AnalyticsCallStartDistributionGetResponsesContentApplicationJsonSchemaDataDataPointsItems":{"type":"object","properties":{"minute":{"type":"string","description":"Time in HH:MM format"},"callCount":{"type":"number","format":"double"}},"title":"AnalyticsCallStartDistributionGetResponsesContentApplicationJsonSchemaDataDataPointsItems"},"AnalyticsCallStartDistributionGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"date":{"type":"string","format":"date"},"dataPoints":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCallStartDistributionGetResponsesContentApplicationJsonSchemaDataDataPointsItems"}},"totalCalls":{"type":"number","format":"double"}},"title":"AnalyticsCallStartDistributionGetResponsesContentApplicationJsonSchemaData"},"Analytics_getCallStartDistribution_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsCallStartDistributionGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getCallStartDistribution_Response_200"},"AnalyticsDailyCallSummaryGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"date":{"type":"string","format":"date"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"unansweredCalls":{"type":"number","format":"double"},"failedCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"},"inProgressCalls":{"type":"number","format":"double"},"inQueueCalls":{"type":"number","format":"double"},"totalDurationMs":{"type":"number","format":"double"}},"title":"AnalyticsDailyCallSummaryGetResponsesContentApplicationJsonSchemaData"},"Analytics_getDailyCallSummary_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsDailyCallSummaryGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getDailyCallSummary_Response_200"},"AnalyticsAttemptCohortGetResponsesContentApplicationJsonSchemaDataCohortsItems":{"type":"object","properties":{"attemptNumber":{"type":"number","format":"double"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"pickupRate":{"type":"number","format":"double"},"cumulativeAnswered":{"type":"number","format":"double"},"cumulativeRate":{"type":"number","format":"double"},"marginalGain":{"type":"number","format":"double"}},"title":"AnalyticsAttemptCohortGetResponsesContentApplicationJsonSchemaDataCohortsItems"},"AnalyticsAttemptCohortGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"orgId":{"type":"string"},"cohorts":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsAttemptCohortGetResponsesContentApplicationJsonSchemaDataCohortsItems"}},"totalUniqueNumbers":{"type":"number","format":"double"},"maxAttemptsSeen":{"type":"number","format":"double"},"avgAttemptsToPickup":{"type":"number","format":"double"},"period":{"$ref":"#/components/schemas/AnalyticsDateRange"}},"title":"AnalyticsAttemptCohortGetResponsesContentApplicationJsonSchemaData"},"Analytics_getAttemptCohort_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AnalyticsAttemptCohortGetResponsesContentApplicationJsonSchemaData"}},"title":"Analytics_getAttemptCohort_Response_200"},"DispositionMetricTemplatesGetResponsesContentApplicationJsonSchemaDataItemsDispositionMetricType":{"type":"string","enum":["STRING","BOOLEAN","INTEGER","ENUM","DATETIME"],"description":"How the extracted value is interpreted:\n- `STRING` — free-text output\n- `BOOLEAN` — true/false outcome\n- `INTEGER` — whole number value\n- `ENUM` — one of a predefined set of choices\n- `DATETIME` — a date/time value\n","title":"DispositionMetricTemplatesGetResponsesContentApplicationJsonSchemaDataItemsDispositionMetricType"},"DispositionMetricTemplatesGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"identifier":{"type":"string","description":"Unique snake_case key (lowercase letters, digits, and underscores only)"},"dispositionMetricPrompt":{"type":"string","description":"AI prompt used to extract this metric from the call transcript"},"dispositionMetricType":{"$ref":"#/components/schemas/DispositionMetricTemplatesGetResponsesContentApplicationJsonSchemaDataItemsDispositionMetricType","description":"How the extracted value is interpreted:\n- `STRING` — free-text output\n- `BOOLEAN` — true/false outcome\n- `INTEGER` — whole number value\n- `ENUM` — one of a predefined set of choices\n- `DATETIME` — a date/time value\n"}},"title":"DispositionMetricTemplatesGetResponsesContentApplicationJsonSchemaDataItems"},"Disposition Metric Templates_listDispositionMetricTemplates_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DispositionMetricTemplatesGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Disposition Metric Templates_listDispositionMetricTemplates_Response_200"},"ConversationRegisterCallPostRequestBodyContentApplicationJsonSchemaMode":{"type":"string","enum":["webcall","chat"],"default":"webcall","description":"Session mode. `webcall` = full voice pipeline (audio in +\naudio out). `chat` = text-only pipeline. Defaults to `webcall`.\n","title":"ConversationRegisterCallPostRequestBodyContentApplicationJsonSchemaMode"},"ConversationRegisterCallPostRequestBodyContentApplicationJsonSchemaVariables":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"title":"ConversationRegisterCallPostRequestBodyContentApplicationJsonSchemaVariables"},"ConversationRegisterCallPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"access_token":{"type":"string","description":"Short-lived, single-use token (prefixed `wct_`). Pass it\nas the `token` query param when opening the Agent\nWebSocket.\n"},"expires_in":{"type":"integer","description":"Token lifetime in seconds."},"sample_rate":{"type":"integer","description":"Negotiated audio sample rate (Hz) for the session. Echoed\nback in the WebSocket `session.created` event.\n"}},"title":"ConversationRegisterCallPostResponsesContentApplicationJsonSchemaData"},"realtime_register_call_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationRegisterCallPostResponsesContentApplicationJsonSchemaData"}},"title":"realtime_register_call_Response_201"},"RegisterARealtimeAgentCallRequestNotFoundError":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"title":"RegisterARealtimeAgentCallRequestNotFoundError"},"ConversationCallIdRecordingDownloadUrlGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"presignedUrl":{"type":"string","format":"uri","description":"Time-limited HTTPS URL pointing at the recording in S3. The URL expires after a short window; request a fresh one if needed."}},"title":"ConversationCallIdRecordingDownloadUrlGetResponsesContentApplicationJsonSchemaData"},"Conversations_getATimeLimitedRecordingDownloadUrl_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationCallIdRecordingDownloadUrlGetResponsesContentApplicationJsonSchemaData"}},"title":"Conversations_getATimeLimitedRecordingDownloadUrl_Response_200"},"ConversationCallIdRetriesGetResponsesContentApplicationJsonSchemaDataRetriesItems":{"type":"object","properties":{},"description":"A call log entry. Mirrors the per-row shape in `GET /conversation`.","title":"ConversationCallIdRetriesGetResponsesContentApplicationJsonSchemaDataRetriesItems"},"ConversationCallIdRetriesGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"retries":{"type":"array","items":{"$ref":"#/components/schemas/ConversationCallIdRetriesGetResponsesContentApplicationJsonSchemaDataRetriesItems"},"description":"All calls in the retry family — parent first, then retries in attempt order. Each entry has the same shape as a single call log returned by `GET /conversation`."}},"title":"ConversationCallIdRetriesGetResponsesContentApplicationJsonSchemaData"},"conversations_list_retry_attempts_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationCallIdRetriesGetResponsesContentApplicationJsonSchemaData"}},"title":"conversations_list_retry_attempts_Response_200"},"ConversationCancelPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"callId":{"type":"string"},"status":{"type":"string"},"previousStatus":{"type":"string","description":"The call's status immediately before cancellation (e.g. `queued`, `ringing`, `in-progress`)."}},"title":"ConversationCancelPostResponsesContentApplicationJsonSchemaData"},"conversations_cancel_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationCancelPostResponsesContentApplicationJsonSchemaData"}},"title":"conversations_cancel_Response_200"},"ConversationCallIdCancelPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"callId":{"type":"string"},"status":{"type":"string"}},"title":"ConversationCallIdCancelPostResponsesContentApplicationJsonSchemaData"},"conversations_cancel_queued_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ConversationCallIdCancelPostResponsesContentApplicationJsonSchemaData"}},"title":"conversations_cancel_queued_Response_200"},"EventsGetResponsesContentSseSchemaEventType":{"type":"string","enum":["sse_init","call_start","call_end","turn_latency","user_interim_transcription","user_transcription","tts_completed","metrics","agent_node_state","hopping","knowledgebase","variable_extraction","pre_call_api","post_call_api","agent_error","agent_log","tool_call_start","tool_call_end","tool_call_error","call_cancelled","call_recording","sse_close"],"description":"The type of event","title":"EventsGetResponsesContentSseSchemaEventType"},"EventsGetResponsesContentSseSchemaMetricsItems":{"type":"object","properties":{"processor":{"type":"string","description":"Pipeline stage that produced the metric (e.g. `pulse_stt`, `electron_llm`, `lightning_tts`)."},"model":{"type":"string","description":"Concrete model/version identifier within the processor (e.g. `pulse-large english_v4.1`)."},"value":{"type":"number","format":"double","description":"Metric value — typically milliseconds for latency metrics."}},"title":"EventsGetResponsesContentSseSchemaMetricsItems"},"live_transcripts_subscribe_to_live_events_Response_200":{"type":"object","properties":{"event_type":{"$ref":"#/components/schemas/EventsGetResponsesContentSseSchemaEventType","description":"The type of event"},"event_id":{"type":"string","description":"Unique identifier for the event"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the event"},"call_id":{"type":"string","description":"The call ID this event belongs to"},"event_time":{"type":"string","format":"date-time","description":"Timestamp used by `sse_init` and `sse_close`"},"telephony_id":{"type":"string","description":"Telephony ID for `call_start`"},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Metadata for `call_end`, `agent_error`, or `agent_log`"},"turn_latency":{"type":"number","format":"double","description":"Turn latency value for `turn_latency`"},"stt_api_ms":{"type":"number","format":"double","description":"STT API latency in milliseconds for `turn_latency`"},"stt_to_llm_ms":{"type":"number","format":"double","description":"STT-to-LLM latency in milliseconds for `turn_latency`"},"smart_turn_ms":{"type":"number","format":"double","description":"Smart-turn latency in milliseconds for `turn_latency`"},"llm_api_ms":{"type":"number","format":"double","description":"LLM API latency in milliseconds for `turn_latency`"},"llm_to_tts_ms":{"type":"number","format":"double","description":"LLM-to-TTS latency in milliseconds for `turn_latency`"},"tts_api_ms":{"type":"number","format":"double","description":"TTS API latency in milliseconds for `turn_latency`"},"tts_to_audio_ms":{"type":"number","format":"double","description":"TTS-to-audio latency in milliseconds for `turn_latency`"},"total_turn_ms":{"type":"number","format":"double","description":"Total turn latency in milliseconds for `turn_latency`"},"turn_index":{"type":"integer","description":"Turn index for `turn_latency`"},"interrupted":{"type":"boolean","description":"Whether the turn was interrupted for `turn_latency`"},"smart_turn_enabled":{"type":"boolean","description":"Whether smart turn was enabled for `turn_latency`"},"interim_transcription_text":{"type":"string","description":"Partial transcription text (only for `user_interim_transcription`)"},"user_transcription_text":{"type":"string","description":"Final transcription text (only for `user_transcription`)"},"tts_text":{"type":"string","description":"Text spoken by the agent (only for `tts_completed`)"},"tts_latency":{"type":"integer","description":"TTS latency in milliseconds (only for `tts_completed`)"},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/EventsGetResponsesContentSseSchemaMetricsItems"},"description":"Per-turn metrics payload for `metrics` events. Server emits an\n**array** of `{processor, model, value}` entries (one per\npipeline stage), not a single object. The SDK previously\ndropped every `metrics` SSE event with a pydantic\nValidationError when this was typed as an object (122\nevents on a 40s call); typing it as an array of objects\nfixes the decode.\n"},"node_id":{"type":"string","description":"Node ID for `agent_node_state`"},"node_name":{"type":"string","description":"Node name for `agent_node_state`"},"node_type":{"type":"string","description":"Node type for `agent_node_state`"},"context":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Context payload for agent-node and tool-call events"},"from_node_id":{"type":"string","description":"Source node ID for `hopping`"},"to_node_id":{"type":"string","description":"Destination node ID for `hopping`"},"knowledge_base_id":{"type":"string","description":"Knowledge base ID for `knowledgebase`"},"user_transcript":{"type":"string","description":"User transcript for `knowledgebase`"},"response":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Response payload for knowledgebase, API, or tool-call events"},"latency":{"type":"number","format":"double","description":"Latency for `knowledgebase` or `variable_extraction`"},"error":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Error payload for knowledgebase, variable extraction, API, tool, or agent error events"},"variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Variables extracted by `variable_extraction`"},"variable_extraction_prompt":{"type":"string","description":"Prompt used for `variable_extraction`"},"method":{"type":"string","description":"HTTP method for `pre_call_api` or `post_call_api`"},"headers":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Headers for `pre_call_api` or `post_call_api`"},"body":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Body for `pre_call_api` or `post_call_api`"},"timeout":{"type":"number","format":"double","description":"Timeout for `pre_call_api` or `post_call_api`"},"extracted_variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Extracted variables for `pre_call_api` or `post_call_api`"},"next_node_id":{"type":"string","description":"Next node ID for `pre_call_api` or `post_call_api`"},"success":{"type":"boolean","description":"Success status for API and tool-call events"},"turn_id":{"type":"string","description":"Turn ID for tool-call events"},"tool_call_id":{"type":"string","description":"Tool call ID for tool-call events"},"function_name":{"type":"string","description":"Function name for tool-call events"},"latency_ms":{"type":"number","format":"double","description":"Latency in milliseconds for `tool_call_end`"},"recording_url":{"type":"string","description":"Recording URL for `call_recording`"},"status":{"type":"string","description":"Recording status for `call_recording`"}},"description":"Events are sent as `data: <JSON>\\n\\n`. Forwarded runtime events commonly include\n`event_type`, `event_id`, `timestamp`, and `call_id`. `sse_init` and `sse_close`\ninclude `event_type` and `event_time`.\n","title":"live_transcripts_subscribe_to_live_events_Response_200"},"ComplianceStatusGetParametersNumberType":{"type":"string","enum":["local","mobile","tollfree"],"title":"ComplianceStatusGetParametersNumberType"},"ComplianceStatusGetParametersUserType":{"type":"string","enum":["individual","business"],"title":"ComplianceStatusGetParametersUserType"},"ComplianceStatusGetResponsesContentApplicationJsonSchemaDataStep":{"type":"string","enum":["form","submitted","accepted","rejected","expired","suspended"],"description":"The current compliance step:\n- `form` — no application exists, user should submit one\n- `submitted` — application is under review\n- `accepted` — approved, user can rent numbers\n- `rejected` — rejected, user can resubmit with corrected documents\n- `expired` — compliance expired\n- `suspended` — compliance suspended\n","title":"ComplianceStatusGetResponsesContentApplicationJsonSchemaDataStep"},"ComplianceApplicationStatus":{"type":"string","enum":["draft","submitted","accepted","rejected","suspended","expired"],"description":"Current status of the compliance application","title":"ComplianceApplicationStatus"},"ComplianceApplicationNumberType":{"type":"string","enum":["local","mobile","tollfree"],"title":"ComplianceApplicationNumberType"},"ComplianceApplicationUserType":{"type":"string","enum":["individual","business"],"title":"ComplianceApplicationUserType"},"ComplianceApplication":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier"},"organizationId":{"type":"string","description":"The organization this application belongs to"},"plivoComplianceId":{"type":"string","description":"Plivo's compliance application identifier"},"alias":{"type":"string","description":"Auto-generated alias (orgId-countryIso-env)"},"status":{"$ref":"#/components/schemas/ComplianceApplicationStatus","description":"Current status of the compliance application"},"countryIso":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"numberType":{"$ref":"#/components/schemas/ComplianceApplicationNumberType"},"userType":{"$ref":"#/components/schemas/ComplianceApplicationUserType"},"endUserName":{"type":"string","description":"Legal business or individual name"},"endUserLastName":{"type":["string","null"]},"endUserEmail":{"type":["string","null"]},"endUserCountry":{"type":["string","null"]},"documentFileNames":{"type":"array","items":{"type":"string"},"description":"Names of uploaded document files"},"rejectionReason":{"type":["string","null"],"description":"Reason for rejection, if applicable"},"createdBy":{"type":"string","description":"User ID of the person who created this application"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"A compliance application for a specific country, number type, and user type","title":"ComplianceApplication"},"RequiredDocumentTypeRequiredFieldsItems":{"type":"object","properties":{"fieldName":{"type":"string"},"friendlyName":{"type":"string"},"helpText":{"type":"string"},"fieldType":{"type":"string"},"required":{"type":"boolean"}},"title":"RequiredDocumentTypeRequiredFieldsItems"},"RequiredDocumentType":{"type":"object","properties":{"documentTypeId":{"type":"string","description":"Identifier to use when submitting this document type"},"name":{"type":"string","description":"Human-readable name"},"description":{"type":"string","description":"Description of what this document should contain"},"proofRequired":{"type":"boolean","description":"Whether a file upload is required for this document type"},"requiredFields":{"type":"array","items":{"$ref":"#/components/schemas/RequiredDocumentTypeRequiredFieldsItems"},"description":"Data fields that must be provided alongside the document"}},"description":"A document type required for compliance","title":"RequiredDocumentType"},"ComplianceStatusGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"step":{"$ref":"#/components/schemas/ComplianceStatusGetResponsesContentApplicationJsonSchemaDataStep","description":"The current compliance step:\n- `form` — no application exists, user should submit one\n- `submitted` — application is under review\n- `accepted` — approved, user can rent numbers\n- `rejected` — rejected, user can resubmit with corrected documents\n- `expired` — compliance expired\n- `suspended` — compliance suspended\n"},"application":{"oneOf":[{"$ref":"#/components/schemas/ComplianceApplication"},{"type":"null"}],"description":"The existing compliance application, or null if none exists"},"requiredDocuments":{"type":"array","items":{"$ref":"#/components/schemas/RequiredDocumentType"},"description":"Document types required for this country/numberType/userType combination"}},"title":"ComplianceStatusGetResponsesContentApplicationJsonSchemaData"},"Compliance_getComplianceStatus_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ComplianceStatusGetResponsesContentApplicationJsonSchemaData"}},"title":"Compliance_getComplianceStatus_Response_200"},"ComplianceRequirementsGetParametersNumberType":{"type":"string","enum":["local","mobile","tollfree"],"title":"ComplianceRequirementsGetParametersNumberType"},"ComplianceRequirementsGetParametersUserType":{"type":"string","enum":["individual","business"],"title":"ComplianceRequirementsGetParametersUserType"},"ComplianceRequirement":{"type":"object","properties":{"requirementId":{"type":"string","description":"Plivo's requirement identifier"},"countryIso":{"type":"string"},"numberType":{"type":"string"},"userType":{"type":"string"},"documentTypes":{"type":"array","items":{"$ref":"#/components/schemas/RequiredDocumentType"},"description":"Required document types. Empty array means no compliance is needed."}},"description":"Compliance requirements for a country/numberType/userType combination","title":"ComplianceRequirement"},"Compliance_getComplianceRequirements_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ComplianceRequirement"}},"title":"Compliance_getComplianceRequirements_Response_200"},"ComplianceApplicationsPostRequestBodyContentMultipartFormDataSchemaNumberType":{"type":"string","enum":["local","mobile","tollfree"],"description":"The type of phone number","title":"ComplianceApplicationsPostRequestBodyContentMultipartFormDataSchemaNumberType"},"ComplianceApplicationsPostRequestBodyContentMultipartFormDataSchemaUserType":{"type":"string","enum":["individual","business"],"description":"The type of end user","title":"ComplianceApplicationsPostRequestBodyContentMultipartFormDataSchemaUserType"},"compliance_submit_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ComplianceApplication"}},"title":"compliance_submit_Response_201"},"compliance_resubmit_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ComplianceApplication"}},"title":"compliance_resubmit_Response_200"},"Compliance_refreshComplianceApplicationStatus_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ComplianceApplication"}},"title":"Compliance_refreshComplianceApplicationStatus_Response_200"},"AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsStatus":{"type":"string","enum":["published","draft","archived"],"description":"Current status of the version record","title":"AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsBlocks":{"type":"object","properties":{"workflow_prompt":{"type":"string"},"workflow_tools":{"type":"string"},"workflow_graph":{"type":"string"},"llm":{"type":"string"},"voice":{"type":"string"},"language":{"type":"string"},"call_handling":{"type":"string"},"detection":{"type":"string"},"analytics":{"type":"string"},"timeouts":{"type":"string"},"audio":{"type":"string"},"privacy":{"type":"string"},"widget":{"type":"string"}},"description":"References to the 13 config section blocks","title":"AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsBlocks"},"AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier"},"agent":{"type":"string","description":"The agent this version belongs to"},"status":{"$ref":"#/components/schemas/AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsStatus","description":"Current status of the version record"},"versionNumber":{"type":["integer","null"],"description":"Auto-incremented version number (published versions only)"},"label":{"type":["string","null"],"description":"Human-readable label for the version"},"description":{"type":["string","null"],"description":"Description of what changed in this version"},"isPinned":{"type":"boolean","default":false,"description":"Whether the version is pinned for quick access"},"publishedBy":{"type":["string","null"],"description":"User ID of who published this version"},"publishedAt":{"type":["string","null"],"format":"date-time","description":"When this version was published"},"activatedBy":{"type":["string","null"],"description":"User ID of who activated this version"},"activatedAt":{"type":["string","null"],"format":"date-time","description":"When this version was activated"},"draftId":{"type":["string","null"],"description":"Unique draft identifier (drafts only)"},"draftName":{"type":["string","null"],"description":"Human-readable draft name"},"draftRevision":{"type":["integer","null"],"description":"Revision number within the draft (drafts only)"},"sourceVersionId":{"type":["string","null"],"description":"The published version this draft was branched from"},"blocks":{"$ref":"#/components/schemas/AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItemsBlocks","description":"References to the 13 config section blocks"},"workflowType":{"$ref":"#/components/schemas/WorkflowType"},"parentVersion":{"type":["string","null"],"description":"The version this was derived from"},"isActive":{"type":"boolean","description":"Whether this is the currently active version for the agent"},"createdBy":{"type":"string","description":"User ID of who created this record"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastEditorName":{"type":["string","null"],"description":"Display name of the last editor"}},"description":"Represents either a draft revision or a published version of an agent's configuration.","title":"AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItems"},"Agent Versioning - Drafts_listActiveDrafts_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentIdDraftsGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Agent Versioning - Drafts_listActiveDrafts_Response_200"},"CreateDraftRequest":{"type":"object","properties":{"sourceVersionId":{"type":"string","description":"ID of a published version to branch from. Must be a valid MongoDB ObjectId (24-char hex).\nSending a non-ObjectId format returns 400.\n"},"sourceDraftId":{"type":"string","description":"ID of an existing draft to branch from"},"draftName":{"type":"string","description":"Optional name for the draft (1–100 characters)"}},"title":"CreateDraftRequest"},"AgentVersionStatus":{"type":"string","enum":["published","draft","archived"],"description":"Current status of the version record","title":"AgentVersionStatus"},"AgentVersionBlocks":{"type":"object","properties":{"workflow_prompt":{"type":"string"},"workflow_tools":{"type":"string"},"workflow_graph":{"type":"string"},"llm":{"type":"string"},"voice":{"type":"string"},"language":{"type":"string"},"call_handling":{"type":"string"},"detection":{"type":"string"},"analytics":{"type":"string"},"timeouts":{"type":"string"},"audio":{"type":"string"},"privacy":{"type":"string"},"widget":{"type":"string"}},"description":"References to the 13 config section blocks","title":"AgentVersionBlocks"},"AgentVersion":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier"},"agent":{"type":"string","description":"The agent this version belongs to"},"status":{"$ref":"#/components/schemas/AgentVersionStatus","description":"Current status of the version record"},"versionNumber":{"type":["integer","null"],"description":"Auto-incremented version number (published versions only)"},"label":{"type":["string","null"],"description":"Human-readable label for the version"},"description":{"type":["string","null"],"description":"Description of what changed in this version"},"isPinned":{"type":"boolean","default":false,"description":"Whether the version is pinned for quick access"},"publishedBy":{"type":["string","null"],"description":"User ID of who published this version"},"publishedAt":{"type":["string","null"],"format":"date-time","description":"When this version was published"},"activatedBy":{"type":["string","null"],"description":"User ID of who activated this version"},"activatedAt":{"type":["string","null"],"format":"date-time","description":"When this version was activated"},"draftId":{"type":["string","null"],"description":"Unique draft identifier (drafts only)"},"draftName":{"type":["string","null"],"description":"Human-readable draft name"},"draftRevision":{"type":["integer","null"],"description":"Revision number within the draft (drafts only)"},"sourceVersionId":{"type":["string","null"],"description":"The published version this draft was branched from"},"blocks":{"$ref":"#/components/schemas/AgentVersionBlocks","description":"References to the 13 config section blocks"},"workflowType":{"$ref":"#/components/schemas/WorkflowType"},"parentVersion":{"type":["string","null"],"description":"The version this was derived from"},"isActive":{"type":"boolean","description":"Whether this is the currently active version for the agent"},"createdBy":{"type":"string","description":"User ID of who created this record"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"Represents either a draft revision or a published version of an agent's configuration.","title":"AgentVersion"},"agent_versioning_drafts_create_draft_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersion"}},"title":"agent_versioning_drafts_create_draft_Response_201"},"DraftEditHistoryEntry":{"type":"object","properties":{"revision":{"type":"integer","description":"Draft revision number"},"changedSections":{"type":"array","items":{"type":"string"},"description":"List of config sections that changed in this revision"},"editorName":{"type":["string","null"],"description":"Display name of the editor"},"editorId":{"type":["string","null"],"description":"User ID of the editor"},"timestamp":{"type":"string","format":"date-time","description":"When the edit was made"}},"title":"DraftEditHistoryEntry"},"AgentIdDraftsDraftIdGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"latest":{"$ref":"#/components/schemas/AgentVersion"},"editHistory":{"type":"array","items":{"$ref":"#/components/schemas/DraftEditHistoryEntry"}},"editCount":{"type":"integer","description":"Total number of edits on this draft"}},"title":"AgentIdDraftsDraftIdGetResponsesContentApplicationJsonSchemaData"},"Agent Versioning - Drafts_getDraftDetail_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdDraftsDraftIdGetResponsesContentApplicationJsonSchemaData"}},"title":"Agent Versioning - Drafts_getDraftDetail_Response_200"},"agent_versioning_drafts_discard_draft_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"description":"Any type"}},"title":"agent_versioning_drafts_discard_draft_Response_200"},"AgentIdDraftsDraftIdPatchResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"draftName":{"type":"string"}},"title":"AgentIdDraftsDraftIdPatchResponsesContentApplicationJsonSchemaData"},"agent_versioning_drafts_rename_draft_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdDraftsDraftIdPatchResponsesContentApplicationJsonSchemaData"}},"title":"agent_versioning_drafts_rename_draft_Response_200"},"AgentIdDraftsDraftIdDiffGetResponsesContentApplicationJsonSchemaDataSections":{"type":"object","properties":{"before":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Section value in the comparison target (null if section did not exist)"},"after":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Section value in the draft (null if section was removed)"},"changed":{"type":"boolean","description":"Whether the section differs between the draft and the comparison target"}},"title":"AgentIdDraftsDraftIdDiffGetResponsesContentApplicationJsonSchemaDataSections"},"AgentIdDraftsDraftIdDiffGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"sections":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AgentIdDraftsDraftIdDiffGetResponsesContentApplicationJsonSchemaDataSections"},"description":"Keyed by config section name. Each entry shows the before/after state of that section."},"hasChanges":{"type":"boolean","description":"True if at least one section differs"}},"title":"AgentIdDraftsDraftIdDiffGetResponsesContentApplicationJsonSchemaData"},"Agent Versioning - Drafts_getDraftDiff_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdDraftsDraftIdDiffGetResponsesContentApplicationJsonSchemaData"}},"title":"Agent Versioning - Drafts_getDraftDiff_Response_200"},"PublishDraftRequest":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Label for the published version"},"description":{"type":["string","null"],"description":"Description of the published version"},"activate":{"type":"boolean","default":false,"description":"Whether to immediately activate the version after publishing"}},"title":"PublishDraftRequest"},"agent_versioning_drafts_publish_draft_Response_201":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersion"}},"title":"agent_versioning_drafts_publish_draft_Response_201"},"TestCallRequestMode":{"type":"string","enum":["webcall","chat","telephony"],"default":"webcall","description":"Test call mode. Defaults to `webcall` when omitted.","title":"TestCallRequestMode"},"TestCallRequest":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/TestCallRequestMode","default":"webcall","description":"Test call mode. Defaults to `webcall` when omitted."},"toPhone":{"type":"string","description":"Phone number to call. Required only when `mode` is `telephony`. Omit for `webcall` and `chat`.\n"}},"title":"TestCallRequest"},"AgentIdDraftsDraftIdTestCallPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"callId":{"type":"string","description":"The call ID of the initiated test call. Use with GET /conversation/{id} to fetch the call log."}},"description":"Test call result details","title":"AgentIdDraftsDraftIdTestCallPostResponsesContentApplicationJsonSchemaData"},"Agent Versioning - Drafts_testCallWithDraftConfig_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdDraftsDraftIdTestCallPostResponsesContentApplicationJsonSchemaData","description":"Test call result details"}},"title":"Agent Versioning - Drafts_testCallWithDraftConfig_Response_200"},"DraftConfigRequestLanguage":{"type":"object","properties":{},"description":"Language configuration. See CreateAgentRequest for full shape.","title":"DraftConfigRequestLanguage"},"DraftConfigRequestSynthesizer":{"type":"object","properties":{},"description":"Synthesizer (TTS) configuration. See CreateAgentRequest for full shape.","title":"DraftConfigRequestSynthesizer"},"DraftConfigRequestSlmModel":{"type":"string","enum":["electron","electron-kogta","electron-kogta-v2","gpt-4o","gpt-4.1","gpt-5.2","gpt-realtime","gpt-realtime-mini"],"description":"LLM model for this draft","title":"DraftConfigRequestSlmModel"},"DraftConfigRequestWidgetConfig":{"type":"object","properties":{},"description":"Widget configuration for chat-mode agents","title":"DraftConfigRequestWidgetConfig"},"DraftConfigRequestDefaultVariables":{"type":"object","properties":{},"description":"Default prompt variables","title":"DraftConfigRequestDefaultVariables"},"DraftConfigRequestPreCallApi":{"type":"object","properties":{},"description":"Pre-call API configuration. See CreateAgentRequest for full shape.","title":"DraftConfigRequestPreCallApi"},"DraftConfigRequestBackgroundSound":{"type":"string","enum":["","office","cafe","call_center","static"],"title":"DraftConfigRequestBackgroundSound"},"DraftConfigRequestSmartTurnConfig":{"type":"object","properties":{},"title":"DraftConfigRequestSmartTurnConfig"},"DraftConfigRequestVoiceDetectionConfig":{"type":"object","properties":{},"title":"DraftConfigRequestVoiceDetectionConfig"},"DraftConfigRequestVoiceMailDetectionConfig":{"type":"object","properties":{},"title":"DraftConfigRequestVoiceMailDetectionConfig"},"DraftConfigRequestDenoisingConfig":{"type":"object","properties":{},"title":"DraftConfigRequestDenoisingConfig"},"DraftConfigRequestRedactionConfig":{"type":"object","properties":{},"title":"DraftConfigRequestRedactionConfig"},"DraftConfigRequestPronunciationDictsItems":{"type":"object","properties":{},"title":"DraftConfigRequestPronunciationDictsItems"},"DraftConfigRequestLlmIdleTimeoutConfig":{"type":"object","properties":{},"title":"DraftConfigRequestLlmIdleTimeoutConfig"},"DraftConfigRequestSessionTimeoutConfig":{"type":"object","properties":{},"title":"DraftConfigRequestSessionTimeoutConfig"},"DraftConfigRequestTimezone":{"type":"object","properties":{},"title":"DraftConfigRequestTimezone"},"DraftConfigRequest":{"type":"object","properties":{"singlePromptConfig":{"$ref":"#/components/schemas/SinglePromptConfig"},"postCallAnalyticsConfig":{"$ref":"#/components/schemas/PostCallAnalyticsConfig"},"language":{"$ref":"#/components/schemas/DraftConfigRequestLanguage","description":"Language configuration. See CreateAgentRequest for full shape."},"synthesizer":{"$ref":"#/components/schemas/DraftConfigRequestSynthesizer","description":"Synthesizer (TTS) configuration. See CreateAgentRequest for full shape."},"slmModel":{"$ref":"#/components/schemas/DraftConfigRequestSlmModel","description":"LLM model for this draft"},"transcriberType":{"type":"string","description":"STT engine to use for this draft"},"customLLMWebSocketUrl":{"type":"string","description":"Custom LLM WebSocket URL (overrides slmModel)"},"widgetConfig":{"$ref":"#/components/schemas/DraftConfigRequestWidgetConfig","description":"Widget configuration for chat-mode agents"},"defaultVariables":{"$ref":"#/components/schemas/DraftConfigRequestDefaultVariables","description":"Default prompt variables"},"preCallAPI":{"$ref":"#/components/schemas/DraftConfigRequestPreCallApi","description":"Pre-call API configuration. See CreateAgentRequest for full shape."},"globalPrompt":{"type":"string","description":"Global prompt for workflow_graph agents (max 4000 characters)"},"globalKnowledgeBaseId":{"type":"string","description":"Knowledge base ID to attach to this draft"},"firstMessage":{"type":"string","description":"Opening message for this draft"},"allowInterruptions":{"type":"boolean"},"waitForUserToSpeakFirst":{"type":"boolean"},"muteUserUntilFirstBotResponse":{"type":"boolean"},"interruptionBackoffTimer":{"type":"number","format":"double"},"backgroundSound":{"$ref":"#/components/schemas/DraftConfigRequestBackgroundSound"},"smartTurnConfig":{"$ref":"#/components/schemas/DraftConfigRequestSmartTurnConfig"},"voiceDetectionConfig":{"$ref":"#/components/schemas/DraftConfigRequestVoiceDetectionConfig"},"voiceMailDetectionConfig":{"$ref":"#/components/schemas/DraftConfigRequestVoiceMailDetectionConfig"},"denoisingConfig":{"$ref":"#/components/schemas/DraftConfigRequestDenoisingConfig"},"redactionConfig":{"$ref":"#/components/schemas/DraftConfigRequestRedactionConfig"},"pronunciationDicts":{"type":"array","items":{"$ref":"#/components/schemas/DraftConfigRequestPronunciationDictsItems"}},"llmIdleTimeoutConfig":{"$ref":"#/components/schemas/DraftConfigRequestLlmIdleTimeoutConfig"},"sessionTimeoutConfig":{"$ref":"#/components/schemas/DraftConfigRequestSessionTimeoutConfig"},"workflowType":{"$ref":"#/components/schemas/WorkflowType"},"timezone":{"$ref":"#/components/schemas/DraftConfigRequestTimezone"},"callDispositionConfig":{"type":"string"},"enableStyleGuide":{"type":"boolean"},"speechFormatting":{"type":"boolean"}},"description":"Config payload for editing a draft via `PATCH /agent/{id}/drafts/{draftId}/config`.\nAll fields are optional — only the fields provided are updated. A subset of\nconfig fields from `CreateAgentRequest` is accepted, plus two versioning-era fields.\n\n**Fields NOT accepted here** (use `PATCH /agent/{id}` instead):\n- `name` — agent metadata, not a config field; sending it alone returns 400 \"No recognized config fields\"\n- `telephonyProductId` — agent metadata, not a config field\n","title":"DraftConfigRequest"},"agent_versioning_drafts_update_draft_config_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersion"}},"title":"agent_versioning_drafts_update_draft_config_Response_200"},"AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsStatus":{"type":"string","enum":["published","draft","archived"],"description":"Current status of the version record","title":"AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsStatus"},"AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsBlocks":{"type":"object","properties":{"workflow_prompt":{"type":"string"},"workflow_tools":{"type":"string"},"workflow_graph":{"type":"string"},"llm":{"type":"string"},"voice":{"type":"string"},"language":{"type":"string"},"call_handling":{"type":"string"},"detection":{"type":"string"},"analytics":{"type":"string"},"timeouts":{"type":"string"},"audio":{"type":"string"},"privacy":{"type":"string"},"widget":{"type":"string"}},"description":"References to the 13 config section blocks","title":"AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsBlocks"},"AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItems":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier"},"agent":{"type":"string","description":"The agent this version belongs to"},"status":{"$ref":"#/components/schemas/AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsStatus","description":"Current status of the version record"},"versionNumber":{"type":["integer","null"],"description":"Auto-incremented version number (published versions only)"},"label":{"type":["string","null"],"description":"Human-readable label for the version"},"description":{"type":["string","null"],"description":"Description of what changed in this version"},"isPinned":{"type":"boolean","default":false,"description":"Whether the version is pinned for quick access"},"publishedBy":{"type":["string","null"],"description":"User ID of who published this version"},"publishedAt":{"type":["string","null"],"format":"date-time","description":"When this version was published"},"activatedBy":{"type":["string","null"],"description":"User ID of who activated this version"},"activatedAt":{"type":["string","null"],"format":"date-time","description":"When this version was activated"},"draftId":{"type":["string","null"],"description":"Unique draft identifier (drafts only)"},"draftName":{"type":["string","null"],"description":"Human-readable draft name"},"draftRevision":{"type":["integer","null"],"description":"Revision number within the draft (drafts only)"},"sourceVersionId":{"type":["string","null"],"description":"The published version this draft was branched from"},"blocks":{"$ref":"#/components/schemas/AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItemsBlocks","description":"References to the 13 config section blocks"},"workflowType":{"$ref":"#/components/schemas/WorkflowType"},"parentVersion":{"type":["string","null"],"description":"The version this was derived from"},"isActive":{"type":"boolean","description":"Whether this is the currently active version for the agent"},"createdBy":{"type":"string","description":"User ID of who created this record"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"publishedByName":{"type":["string","null"],"description":"Display name of the user who published"},"activatedByName":{"type":["string","null"],"description":"Display name of the user who activated the version"}},"description":"Represents either a draft revision or a published version of an agent's configuration.","title":"AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItems"},"AgentIdVersionsGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/AgentIdVersionsGetResponsesContentApplicationJsonSchemaDataVersionsItems"}},"total":{"type":"integer","description":"Total published versions for the agent. When `isPinned` is used, this may not equal the filtered result count."}},"title":"AgentIdVersionsGetResponsesContentApplicationJsonSchemaData"},"Agent Versioning - Versions_listPublishedVersions_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdVersionsGetResponsesContentApplicationJsonSchemaData"}},"title":"Agent Versioning - Versions_listPublishedVersions_Response_200"},"AgentVersionDiffDiffsItemsChangesItemsOldValue":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}}],"description":"Previous value. Can be any JSON value or null.","title":"AgentVersionDiffDiffsItemsChangesItemsOldValue"},"AgentVersionDiffDiffsItemsChangesItemsNewValue":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}}],"description":"New value. Can be any JSON value or null.","title":"AgentVersionDiffDiffsItemsChangesItemsNewValue"},"AgentVersionDiffDiffsItemsChangesItems":{"type":"object","properties":{"path":{"type":"string","description":"Path to the changed value within the section."},"oldValue":{"oneOf":[{"$ref":"#/components/schemas/AgentVersionDiffDiffsItemsChangesItemsOldValue"},{"type":"null"}],"description":"Previous value. Can be any JSON value or null."},"newValue":{"oneOf":[{"$ref":"#/components/schemas/AgentVersionDiffDiffsItemsChangesItemsNewValue"},{"type":"null"}],"description":"New value. Can be any JSON value or null."}},"title":"AgentVersionDiffDiffsItemsChangesItems"},"AgentVersionDiffDiffsItems":{"type":"object","properties":{"section":{"type":"string","description":"Config section name."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersionDiffDiffsItemsChangesItems"}}},"title":"AgentVersionDiffDiffsItems"},"AgentVersionDiff":{"type":"object","properties":{"unchangedSections":{"type":"array","items":{"type":"string"},"description":"Config sections that did not change."},"diffs":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersionDiffDiffsItems"},"description":"Config sections with one or more changes."}},"description":"Section-by-section diff between two version or draft revision records.","title":"AgentVersionDiff"},"Agent Versioning - Versions_diffTwoVersions_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersionDiff"}},"title":"Agent Versioning - Versions_diffTwoVersions_Response_200"},"AgentVersionMetrics":{"type":"object","properties":{"orgId":{"type":"string"},"agentId":{"type":"string"},"versionId":{"type":"string"},"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"avgDurationMs":{"type":"number","format":"double"},"completionRate":{"type":"number","format":"double"},"totalCost":{"type":"number","format":"double"},"hangupSourceDistribution":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"period":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Date range used for the metric aggregation."}},"title":"AgentVersionMetrics"},"AgentVersionMetricsComparisonMetricsDeltas":{"type":"object","properties":{"totalCalls":{"type":"number","format":"double"},"answeredCalls":{"type":"number","format":"double"},"avgDurationMs":{"type":"number","format":"double"},"completionRate":{"type":"number","format":"double"},"totalCost":{"type":"number","format":"double"}},"title":"AgentVersionMetricsComparisonMetricsDeltas"},"AgentVersionMetricsComparisonMetrics":{"type":"object","properties":{"versionA":{"$ref":"#/components/schemas/AgentVersionMetrics"},"versionB":{"$ref":"#/components/schemas/AgentVersionMetrics"},"deltas":{"$ref":"#/components/schemas/AgentVersionMetricsComparisonMetricsDeltas"}},"title":"AgentVersionMetricsComparisonMetrics"},"AgentVersionMetricsComparison":{"type":"object","properties":{"configDiff":{"$ref":"#/components/schemas/AgentVersionDiff"},"metrics":{"$ref":"#/components/schemas/AgentVersionMetricsComparisonMetrics"}},"title":"AgentVersionMetricsComparison"},"agent_versioning_versions_compare_version_metrics_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersionMetricsComparison"}},"title":"agent_versioning_versions_compare_version_metrics_Response_200"},"AgentIdVersionsVersionIdGetResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/AgentVersion"},"resolvedConfig":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Resolved agent configuration keyed by config section."}},"title":"AgentIdVersionsVersionIdGetResponsesContentApplicationJsonSchemaData"},"Agent Versioning - Versions_getVersionDetail_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdVersionsVersionIdGetResponsesContentApplicationJsonSchemaData"}},"title":"Agent Versioning - Versions_getVersionDetail_Response_200"},"UpdateVersionMetaRequest":{"type":"object","properties":{"label":{"type":["string","null"],"description":"Version label"},"description":{"type":["string","null"],"description":"Version description"},"isPinned":{"type":"boolean","description":"Pin or unpin the version"}},"description":"At least one of label, description, or isPinned must be provided.","title":"UpdateVersionMetaRequest"},"agent_versioning_versions_update_version_metadata_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersion"}},"title":"agent_versioning_versions_update_version_metadata_Response_200"},"agent_versioning_versions_activate_version_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentVersion"}},"title":"agent_versioning_versions_activate_version_Response_200"},"AgentIdVersionsVersionIdTestCallPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"conversationId":{"type":"string","description":"Conversation ID created for the test call"},"callId":{"type":"string","description":"Call ID created for the test call"},"token":{"type":"string","description":"Returned for webcall and chat modes only"},"roomName":{"type":"string","description":"Returned for webcall and chat modes only"},"host":{"type":"string","description":"Returned for webcall and chat modes only"}},"required":["conversationId","callId"],"title":"AgentIdVersionsVersionIdTestCallPostResponsesContentApplicationJsonSchemaData"},"Agent Versioning - Versions_testCallWithVersionConfig_Response_200":{"type":"object","properties":{"status":{"type":"boolean"},"data":{"$ref":"#/components/schemas/AgentIdVersionsVersionIdTestCallPostResponsesContentApplicationJsonSchemaData"}},"title":"Agent Versioning - Versions_testCallWithVersionConfig_Response_200"},"WebhookEventPreConversationMetadataEventType":{"type":"string","enum":["pre-conversation"],"title":"WebhookEventPreConversationMetadataEventType"},"WebhookEventPreConversationMetadata":{"type":"object","properties":{"agentId":{"type":"string","description":"The Atoms agent ID that handled the call."},"eventType":{"$ref":"#/components/schemas/WebhookEventPreConversationMetadataEventType"},"conversationType":{"type":"string","description":"Channel type. Known values: `telephonyOutbound`, `telephonyInbound`."},"toPhone":{"type":"string","description":"Destination phone number in E.164 format."},"fromPhone":{"type":"string","description":"Originating phone number in E.164 format."},"callId":{"type":"string","description":"Unique call identifier."}},"required":["agentId","eventType","conversationType","toPhone","fromPhone","callId"],"title":"WebhookEventPreConversationMetadata"},"WebhookEventPreConversation":{"type":"object","properties":{"url":{"type":"string","description":"The webhook URL endpoint that received the event."},"description":{"type":"string","description":"Human-readable label configured on the webhook (e.g. \"Debt Collection Agent's Endpoint\")."},"event":{"type":"string","description":"Event identifier in the form `{agentId}.{eventType}`."},"id":{"type":"string","description":"Unique webhook delivery ID (separate from `metadata.callId`)."},"metadata":{"$ref":"#/components/schemas/WebhookEventPreConversationMetadata"}},"required":["url","description","event","id","metadata"],"description":"Fired **before** the agent begins speaking. Use this to enrich CRM data,\nlog call attempts, or gate outbound calls.\n\nDoes **not** contain `callData`, `transcript`, `variables`, `analytics`,\nor `recordingUrl`. `callData` is on `post-conversation` and\n`analytics-completed`; `transcript`, `variables`, and `recordingUrl`\nare only on `post-conversation`; `analytics` is only on\n`analytics-completed`.\n","title":"WebhookEventPreConversation"},"WebhookEventPostConversationMetadataEventType":{"type":"string","enum":["post-conversation"],"title":"WebhookEventPostConversationMetadataEventType"},"WebhookEventCallDataCallStatus":{"type":"string","enum":["completed","no_answer","failed","cancelled"],"description":"Terminal status.","title":"WebhookEventCallDataCallStatus"},"WebhookEventCallDataCallDirection":{"type":"string","enum":["telephony_outbound","telephony_inbound"],"description":"Call direction. Present on `post-conversation`; may be absent on\n`analytics-completed`.\n","title":"WebhookEventCallDataCallDirection"},"WebhookEventCallData":{"type":"object","properties":{"fromNumber":{"type":"string","description":"Originating phone number in E.164 format."},"toNumber":{"type":"string","description":"Destination phone number in E.164 format."},"callDuration":{"type":"number","format":"double","description":"Total call duration in **seconds** (float)."},"callStatus":{"$ref":"#/components/schemas/WebhookEventCallDataCallStatus","description":"Terminal status."},"callDirection":{"$ref":"#/components/schemas/WebhookEventCallDataCallDirection","description":"Call direction. Present on `post-conversation`; may be absent on\n`analytics-completed`.\n"},"answerTime":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the call was answered (UTC)."},"endTime":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the call ended (UTC)."}},"required":["fromNumber","toNumber","callDuration","callStatus","answerTime","endTime"],"description":"Call-level metadata shared by `post-conversation` and\n`analytics-completed` events. In `analytics-completed`, the\n`callDirection` field may be absent.\n","title":"WebhookEventCallData"},"WebhookEventTranscriptTurnRole":{"type":"string","enum":["agent","user"],"description":"Speaker role.","title":"WebhookEventTranscriptTurnRole"},"WebhookEventTranscriptTurn":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/WebhookEventTranscriptTurnRole","description":"Speaker role."},"content":{"type":"string","description":"The spoken text for this turn."},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when this turn began (UTC)."}},"required":["role","content","timestamp"],"description":"One speaking turn in a `post-conversation` transcript.","title":"WebhookEventTranscriptTurn"},"WebhookEventPostConversationMetadata":{"type":"object","properties":{"agentId":{"type":"string"},"eventType":{"$ref":"#/components/schemas/WebhookEventPostConversationMetadataEventType"},"conversationType":{"type":"string"},"callId":{"type":"string"},"recordingUrl":{"type":"string","format":"uri","description":"URL to the composite call recording (`.wav`)."},"callData":{"$ref":"#/components/schemas/WebhookEventCallData"},"transcript":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventTranscriptTurn"},"description":"Ordered list of transcript turns."},"variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Flat key-value map of all agent variables in scope during the call.\n\n**This object is fully dynamic.** Keys and values are entirely determined by\nthe agent's configuration; they are not fixed by the platform. New keys can\nappear at any time. Store as JSON and iterate keys — do not hard-code column\nmappings. Common platform keys include `agent_name`, `customer_name`,\n`current_date`, `default_language`; domain-specific keys (e.g. `due_amount`,\n`bank_name`) come from your agent's prompt configuration.\n"}},"required":["agentId","eventType","conversationType","callId","recordingUrl","callData","transcript","variables"],"title":"WebhookEventPostConversationMetadata"},"WebhookEventPostConversation":{"type":"object","properties":{"url":{"type":"string","description":"The webhook URL endpoint that received the event."},"description":{"type":"string","description":"Human-readable label configured on the webhook (e.g. \"Debt Collection Agent's Endpoint\")."},"event":{"type":"string","description":"Event identifier in the form `{agentId}.{eventType}`."},"id":{"type":"string","description":"Unique webhook delivery ID (separate from `metadata.callId`)."},"metadata":{"$ref":"#/components/schemas/WebhookEventPostConversationMetadata"}},"required":["url","description","event","id","metadata"],"description":"Fired **after** the call ends. Contains the full transcript, call\nmetadata, recording URL, and all agent variables that were in scope\nduring the conversation.\n","title":"WebhookEventPostConversation"},"WebhookEventAnalyticsCompletedMetadataEventType":{"type":"string","enum":["analytics-completed"],"title":"WebhookEventAnalyticsCompletedMetadataEventType"},"WebhookEventAnalyticsMetricValue":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"boolean"}],"description":"The evaluated result. Type depends on `dispositionMetricType`.\n","title":"WebhookEventAnalyticsMetricValue"},"WebhookEventAnalyticsMetricDispositionMetricType":{"type":"string","enum":["STRING","BOOLEAN","INTEGER","ENUM","DATETIME"],"description":"Data type of `value`.","title":"WebhookEventAnalyticsMetricDispositionMetricType"},"WebhookEventAnalyticsMetric":{"type":"object","properties":{"identifier":{"type":"string","description":"Machine-readable metric name (e.g. `turn_taking_balance`, `escalation_needed`)."},"value":{"$ref":"#/components/schemas/WebhookEventAnalyticsMetricValue","description":"The evaluated result. Type depends on `dispositionMetricType`.\n"},"confidence":{"type":"number","format":"double","description":"Confidence score (0–1)."},"reasoning":{"type":"string","description":"LLM-generated explanation for the assigned value."},"dispositionMetricPrompt":{"type":"string","description":"The prompt/question that was used to evaluate this metric."},"dispositionMetricType":{"$ref":"#/components/schemas/WebhookEventAnalyticsMetricDispositionMetricType","description":"Data type of `value`."}},"required":["identifier","value","confidence","reasoning","dispositionMetricPrompt","dispositionMetricType"],"description":"A single disposition or success metric computed by the\n`analytics-completed` event. The set of metrics is configured\nper-agent and can vary.\n","title":"WebhookEventAnalyticsMetric"},"WebhookEventAnalyticsCompletedMetadataAnalytics":{"type":"object","properties":{"summary":{"type":"string","description":"LLM-generated plain-text summary of the call."},"dispositionMetrics":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventAnalyticsMetric"}},"successMetrics":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventAnalyticsMetric"},"description":"Same schema as `dispositionMetrics`. May be empty."}},"required":["summary","dispositionMetrics","successMetrics"],"title":"WebhookEventAnalyticsCompletedMetadataAnalytics"},"WebhookEventAnalyticsCompletedMetadata":{"type":"object","properties":{"agentId":{"type":"string"},"eventType":{"$ref":"#/components/schemas/WebhookEventAnalyticsCompletedMetadataEventType"},"conversationType":{"type":"string"},"callId":{"type":"string"},"analytics":{"$ref":"#/components/schemas/WebhookEventAnalyticsCompletedMetadataAnalytics"},"callData":{"$ref":"#/components/schemas/WebhookEventCallData"}},"required":["agentId","eventType","conversationType","callId","analytics","callData"],"title":"WebhookEventAnalyticsCompletedMetadata"},"WebhookEventAnalyticsCompleted":{"type":"object","properties":{"url":{"type":"string","description":"The webhook URL endpoint that received the event."},"description":{"type":"string","description":"Human-readable label configured on the webhook (e.g. \"Debt Collection Agent's Endpoint\")."},"event":{"type":"string","description":"Event identifier in the form `{agentId}.{eventType}`."},"id":{"type":"string","description":"Unique webhook delivery ID (separate from `metadata.callId`)."},"metadata":{"$ref":"#/components/schemas/WebhookEventAnalyticsCompletedMetadata"}},"required":["url","description","event","id","metadata"],"description":"Fired **after** Atoms finishes running the configured disposition and\nsuccess metrics on the transcript. Arrives some time after\n`post-conversation`.\n","title":"WebhookEventAnalyticsCompleted"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth."}}}}