{"openapi":"3.1.0","info":{"title":"Atendia REST API","version":"2026-07","description":"Interactive OpenAPI reference for Atendia REST operations. In Ask AI flows, answer questions using the selected operation description first instead of giving a broad overview of the full API catalog."},"servers":[{"url":"https://api.atendia.pt/api/v1","description":"Atendia production API"}],"tags":[{"name":"Agents","description":"Create agents, read configuration, launch preview sessions, and manage voice/model settings."},{"name":"Phone numbers","description":"Search, purchase, assign, and release inbound/outbound phone numbers."},{"name":"Calls and logs","description":"Ingest completed calls, inspect historical logs, read transcripts, and control live calls."},{"name":"Dashboard","description":"Summaries used by the operations dashboard."},{"name":"Outbound calls","description":"Request calls by API key, start quick calls, upload batches, manage campaigns, and inspect outbound status."},{"name":"Knowledge base","description":"Upload and manage agent knowledge sources."},{"name":"Tools","description":"Configure HTTP tools that agents can call during conversations."},{"name":"Secrets","description":"Store redacted secret values for webhook headers, bodies, and tool configuration."},{"name":"Website widgets","description":"Manage agent widgets and public browser sessions."},{"name":"Billing","description":"Read the organization's balance and billing history. Top-ups, the saved card, automatic top-up and tax details are session only (owners and admins); API keys only read."}],"paths":{"/agents":{"post":{"tags":["Agents"],"summary":"Create an agent from a template or blank setup.","description":"Selected endpoint: POST /agents.\n\nWhat it does: Create an agent from a template or blank setup.\n\nWhen to use it: Use this when an admin or integration needs to create a new voice agent programmatically from a template or blank setup.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: agent:create.\n\nRequest body: name: string, minimum 2 characters; isActive: boolean; templateId: uuid | business | medical | support | blank | null.\n\nResponse: 201 { success, message, data: Agent }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /agents. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /agents Create an agent from a template or blank setup. Use case: Use this when an admin or integration needs to create a new voice agent programmatically from a template or blank setup. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"post-agents","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"name: string, minimum 2 characters"},"isActive":{"type":"string","description":"isActive: boolean"},"templateId":{"type":"string","description":"templateId: uuid | business | medical | support | blank | null"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: Agent }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agent:create","x-atendia-ai-context":"POST /agents Create an agent from a template or blank setup. Use case: Use this when an admin or integration needs to create a new voice agent programmatically from a template or blank setup. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this when an admin or integration needs to create a new voice agent programmatically from a template or blank setup.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."},"get":{"tags":["Agents"],"summary":"List agents in the active organization.","description":"Selected endpoint: GET /agents.\n\nWhat it does: List agents in the active organization.\n\nWhen to use it: Use this to populate agent lists, let users select an agent, or sync agent inventory into another system.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: agent:read.\n\nResponse: 200 { success, message, data: Agent[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /agents. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /agents List agents in the active organization. Use case: Use this to populate agent lists, let users select an agent, or sync agent inventory into another system. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"get-agents","security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: Agent[] }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agent:read","x-atendia-ai-context":"GET /agents List agents in the active organization. Use case: Use this to populate agent lists, let users select an agent, or sync agent inventory into another system. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to populate agent lists, let users select an agent, or sync agent inventory into another system.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/agents/voice/catalog":{"get":{"tags":["Agents"],"summary":"List available STT, LLM, TTS, and voice options.","description":"Selected endpoint: GET /agents/voice/catalog.\n\nWhat it does: List available STT, LLM, TTS, and voice options.\n\nWhen to use it: Use this before saving voice configuration so the UI or integration can offer only supported model and voice choices.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: agentConfiguration:read.\n\nResponse: 200 { success, message, data: VoiceCatalog }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /agents/voice/catalog. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /agents/voice/catalog List available STT, LLM, TTS, and voice options. Use case: Use this before saving voice configuration so the UI or integration can offer only supported model and voice choices. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"get-agents-voice-catalog","security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: VoiceCatalog }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agentConfiguration:read","x-atendia-ai-context":"GET /agents/voice/catalog List available STT, LLM, TTS, and voice options. Use case: Use this before saving voice configuration so the UI or integration can offer only supported model and voice choices. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this before saving voice configuration so the UI or integration can offer only supported model and voice choices.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/agents/{agentId}/preview-session":{"post":{"tags":["Agents"],"summary":"Create a browser preview session for the selected agent. Console only: API keys get 403.","description":"Selected endpoint: POST /agents/{agentId}/preview-session.\n\nWhat it does: Create a browser preview session for the selected agent. Console only: API keys get 403.\n\nWhen to use it: Use this to test an agent in the browser before assigning a phone number or launching real calls.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: agentConfiguration:read.\n\nPath parameters: agentId: uuid.\n\nRequest body: dynamicVariables?: Record<string, string>.\n\nResponse: 200 { success, message, data: PreviewSession }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /agents/{agentId}/preview-session. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /agents/{agentId}/preview-session Create a browser preview session for the selected agent. Console only: API keys get 403. Use case: Use this to test an agent in the browser before assigning a phone number or launching real calls. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"post-agents-by-agentid-preview-session","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"dynamicVariables":{"type":"string","description":"dynamicVariables?: Record<string, string>"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: PreviewSession }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agentConfiguration:read","x-atendia-ai-context":"POST /agents/{agentId}/preview-session Create a browser preview session for the selected agent. Console only: API keys get 403. Use case: Use this to test an agent in the browser before assigning a phone number or launching real calls. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to test an agent in the browser before assigning a phone number or launching real calls.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/agents/{id}":{"patch":{"tags":["Agents"],"summary":"Update agent metadata such as name, active state, or template.","description":"Selected endpoint: PATCH /agents/{id}.\n\nWhat it does: Update agent metadata such as name, active state, or template.\n\nWhen to use it: Use this for lightweight agent metadata changes such as renaming or activating/deactivating an agent.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: agent:update.\n\nPath parameters: id: uuid.\n\nRequest body: name?: string; isActive?: boolean; templateId?: uuid | template slug | null.\n\nResponse: 200 { success, message, data: Agent }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about PATCH /agents/{id}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: PATCH /agents/{id} Update agent metadata such as name, active state, or template. Use case: Use this for lightweight agent metadata changes such as renaming or activating/deactivating an agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"patch-agents-by-id","parameters":[{"name":"id","in":"path","required":true,"description":"id: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"name?: string"},"isActive":{"type":"string","description":"isActive?: boolean"},"templateId":{"type":"string","description":"templateId?: uuid | template slug | null"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: Agent }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agent:update","x-atendia-ai-context":"PATCH /agents/{id} Update agent metadata such as name, active state, or template. Use case: Use this for lightweight agent metadata changes such as renaming or activating/deactivating an agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this for lightweight agent metadata changes such as renaming or activating/deactivating an agent.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/agents/{agentId}":{"delete":{"tags":["Agents"],"summary":"Delete an agent from the organization.","description":"Selected endpoint: DELETE /agents/{agentId}.\n\nWhat it does: Delete an agent from the organization.\n\nWhen to use it: Use this when an agent should be permanently removed from the organization.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: agent:delete.\n\nPath parameters: agentId: uuid.\n\nResponse: 200 { success, message, data: null }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /agents/{agentId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /agents/{agentId} Delete an agent from the organization. Use case: Use this when an agent should be permanently removed from the organization. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"delete-agents-by-agentid","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: null }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agent:delete","x-atendia-ai-context":"DELETE /agents/{agentId} Delete an agent from the organization. Use case: Use this when an agent should be permanently removed from the organization. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this when an agent should be permanently removed from the organization.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/agents/{agentId}/config":{"post":{"tags":["Agents"],"summary":"Save complete voice-agent configuration.","description":"Selected endpoint: POST /agents/{agentId}/config.\n\nWhat it does: Save complete voice-agent configuration.\n\nWhen to use it: Use this to save the complete behavior and runtime configuration for an agent.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: agentConfiguration:create/update.\n\nPath parameters: agentId: uuid.\n\nRequest body: agent_language, firstMessage, systemPrompt; llmModel, sttModel, ttsModel, voiceId; realtimeModel? and realtimeVoice? together (the natural voice: a model and a voice from the server catalog, e.g. google/gemini-3.8-live; a closed list, null and any other value are refused; sending neither keeps the choice); data_needed[], data_evaluation[]; initiation_webhook?, post_call_webhook?; variables?, preemptive_generation, ivr_navigation_enabled, timezone; max_call_duration_minutes?: integer from 1 to 240 or null (the call's maximum length in minutes, counted from the answer; when it is reached the agent says one closing sentence and ends the call; a call already passed to a person is not cut; null turns it off; default 60; left out, the stored value stays); transferEnabled? and transferDestination? together (a Portuguese fixed or mobile number, e.g. 912 345 678), transferDestination2? and transferDestination3? (the 2nd and 3rd numbers, dialed in order; never repeated, never without transferDestination), transferInstructions? (max 1000 chars), transferMode? (transfer, ask or both: pass the call, ask the person, or let the person choose; default transfer).\n\nResponse: 200 { success, message, data: AgentConfiguration }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /agents/{agentId}/config. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /agents/{agentId}/config Save complete voice-agent configuration. Use case: Use this to save the complete behavior and runtime configuration for an agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"post-agents-by-agentid-config","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"agent_language":{"type":"string","description":"agent_language, firstMessage, systemPrompt"},"llmModel":{"type":"string","description":"llmModel, sttModel, ttsModel, voiceId"},"realtimeModel? and realtimeVoice? together (the natural voice":{"type":"string","description":"realtimeModel? and realtimeVoice? together (the natural voice: a model and a voice from the server catalog, e.g. google/gemini-3.8-live; a closed list, null and any other value are refused; sending neither keeps the choice)"},"data_needed[]":{"type":"string","description":"data_needed[], data_evaluation[]"},"initiation_webhook":{"type":"string","description":"initiation_webhook?, post_call_webhook?"},"variables":{"type":"string","description":"variables?, preemptive_generation, ivr_navigation_enabled, timezone"},"max_call_duration_minutes":{"type":"string","description":"max_call_duration_minutes?: integer from 1 to 240 or null (the call's maximum length in minutes, counted from the answer; when it is reached the agent says one closing sentence and ends the call; a call already passed to a person is not cut; null turns it off; default 60; left out, the stored value stays)"},"transferEnabled? and transferDestination? together (a Portuguese fixed or mobile number":{"type":"string","description":"transferEnabled? and transferDestination? together (a Portuguese fixed or mobile number, e.g. 912 345 678), transferDestination2? and transferDestination3? (the 2nd and 3rd numbers, dialed in order; never repeated, never without transferDestination), transferInstructions? (max 1000 chars), transferMode? (transfer, ask or both: pass the call, ask the person, or let the person choose; default transfer)"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: AgentConfiguration }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agentConfiguration:create/update","x-atendia-ai-context":"POST /agents/{agentId}/config Save complete voice-agent configuration. Use case: Use this to save the complete behavior and runtime configuration for an agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to save the complete behavior and runtime configuration for an agent.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."},"get":{"tags":["Agents"],"summary":"Read saved voice-agent configuration.","description":"Selected endpoint: GET /agents/{agentId}/config.\n\nWhat it does: Read saved voice-agent configuration.\n\nWhen to use it: Use this to load an agent's saved configuration into an editor or audit workflow.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: agentConfiguration:read.\n\nPath parameters: agentId: uuid.\n\nResponse: 200 { success, message, data: AgentConfiguration }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /agents/{agentId}/config. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /agents/{agentId}/config Read saved voice-agent configuration. Use case: Use this to load an agent's saved configuration into an editor or audit workflow. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/agent/agent.route.ts.","operationId":"get-agents-by-agentid-config","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: AgentConfiguration }"}},"x-atendia-source":"apps/server/src/modules/agent/agent.route.ts","x-atendia-permission":"agentConfiguration:read","x-atendia-ai-context":"GET /agents/{agentId}/config Read saved voice-agent configuration. Use case: Use this to load an agent's saved configuration into an editor or audit workflow. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to load an agent's saved configuration into an editor or audit workflow.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/agents/{agentId}/outbound-pending":{"get":{"tags":["Agents"],"summary":"Count one agent's outbound calls that are still waiting: held by its calling hours (hoursWaiting), callbacks still to make (callbacksPending) and calls waiting for an automatic new attempt (retriesPending). voicemailSuspended is true while voicemail recognition is suspended.","description":"Selected endpoint: GET /agents/{agentId}/outbound-pending.\n\nWhat it does: Count one agent's outbound calls that are still waiting: held by its calling hours (hoursWaiting), callbacks still to make (callbacksPending) and calls waiting for an automatic new attempt (retriesPending). voicemailSuspended is true while voicemail recognition is suspended.\n\nWhen to use it: Use this to see how many of one agent's outbound calls are still waiting, and why.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: agentConfiguration:read.\n\nPath parameters: agentId: uuid.\n\nResponse: 200 { success, data: { hoursWaiting, callbacksPending, voicemailSuspended, retriesPending } }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /agents/{agentId}/outbound-pending. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /agents/{agentId}/outbound-pending Count one agent's outbound calls that are still waiting: held by its calling hours (hoursWaiting), callbacks still to make (callbacksPending) and calls waiting for an automatic new attempt (retriesPending). voicemailSuspended is true while voicemail recognition is suspended. Use case: Use this to see how many of one agent's outbound calls are still waiting, and why. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-pending.route.ts.","operationId":"get-agents-by-agentid-outbound-pending","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, data: { hoursWaiting, callbacksPending, voicemailSuspended, retriesPending } }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-pending.route.ts","x-atendia-permission":"agentConfiguration:read","x-atendia-ai-context":"GET /agents/{agentId}/outbound-pending Count one agent's outbound calls that are still waiting: held by its calling hours (hoursWaiting), callbacks still to make (callbacksPending) and calls waiting for an automatic new attempt (retriesPending). voicemailSuspended is true while voicemail recognition is suspended. Use case: Use this to see how many of one agent's outbound calls are still waiting, and why. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to see how many of one agent's outbound calls are still waiting, and why.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/numbers/search":{"get":{"tags":["Phone numbers"],"summary":"Search available provider numbers and obtain a signed hosted-billing quote before purchase.","description":"Selected endpoint: GET /numbers/search.\n\nWhat it does: Search available provider numbers and obtain a signed hosted-billing quote before purchase.\n\nWhen to use it: Use this when a user needs to discover available phone numbers before purchase.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session only.\n\nPermission: phoneNumber:create.\n\nQuery parameters: provider: TELNYX; country: ISO-3166 alpha-2; areaCode?: positive integer; limit?: 1-50.\n\nResponse: 200 { success, message, data: Array<{ phoneNumber, friendlyName, locality?, region?, isoCountry?, providerMonthlyCostMicros, monthlyPriceMicros, quoteId, quoteExpiresAt, rateCatalogVersion }> }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /numbers/search. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /numbers/search Search available provider numbers and obtain a signed hosted-billing quote before purchase. Use case: Use this when a user needs to discover available phone numbers before purchase. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/numbers/phone.route.ts.","operationId":"get-numbers-search","parameters":[{"name":"provider","in":"query","required":true,"description":"provider: TELNYX","schema":{"type":"string"}},{"name":"country","in":"query","required":true,"description":"country: ISO-3166 alpha-2","schema":{"type":"string"}},{"name":"areaCode","in":"query","required":false,"description":"areaCode?: positive integer","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"limit?: 1-50","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: Array<{ phoneNumber, friendlyName, locality?, region?, isoCountry?, providerMonthlyCostMicros, monthlyPriceMicros, quoteId, quoteExpiresAt, rateCatalogVersion }> }"}},"x-atendia-source":"apps/server/src/modules/numbers/phone.route.ts","x-atendia-permission":"phoneNumber:create","x-atendia-ai-context":"GET /numbers/search Search available provider numbers and obtain a signed hosted-billing quote before purchase. Use case: Use this when a user needs to discover available phone numbers before purchase. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this when a user needs to discover available phone numbers before purchase.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/numbers":{"get":{"tags":["Phone numbers"],"summary":"List purchased numbers for the active organization.","description":"Selected endpoint: GET /numbers.\n\nWhat it does: List purchased numbers for the active organization.\n\nWhen to use it: Use this to show all phone numbers owned by the organization and their agent assignments.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: phoneNumber:read.\n\nResponse: 200 { success, message, data: PhoneNumber[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /numbers. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /numbers List purchased numbers for the active organization. Use case: Use this to show all phone numbers owned by the organization and their agent assignments. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/numbers/phone.route.ts.","operationId":"get-numbers","security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: PhoneNumber[] }"}},"x-atendia-source":"apps/server/src/modules/numbers/phone.route.ts","x-atendia-permission":"phoneNumber:read","x-atendia-ai-context":"GET /numbers List purchased numbers for the active organization. Use case: Use this to show all phone numbers owned by the organization and their agent assignments. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to show all phone numbers owned by the organization and their agent assignments.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"post":{"tags":["Phone numbers"],"summary":"Purchase a selected provider number using the current signed search quote. In hosted mode, quoteId is mandatory, organization-bound, and expires at quoteExpiresAt.","description":"Selected endpoint: POST /numbers.\n\nWhat it does: Purchase a selected provider number using the current signed search quote. In hosted mode, quoteId is mandatory, organization-bound, and expires at quoteExpiresAt.\n\nWhen to use it: Use this to purchase or provision a selected provider phone number.\n\nSide effects and risk: Can provision billable telephony resources; confirm before use.\n\nAuthentication: Owner/admin session only.\n\nPermission: phoneNumber:create + billing:manage.\n\nRequest body: provider: TELNYX; phoneNumber: E.164 string; quoteId: signed quoteId returned by GET /numbers/search (required in hosted mode).\n\nResponse: 201 { success, message, data: PhoneNumber }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /numbers. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /numbers Purchase a selected provider number using the current signed search quote. In hosted mode, quoteId is mandatory, organization-bound, and expires at quoteExpiresAt. Use case: Use this to purchase or provision a selected provider phone number. Side effects: Can provision billable telephony resources; confirm before use.\n\nSource: apps/server/src/modules/numbers/phone.route.ts.","operationId":"post-numbers","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"provider":{"type":"string","description":"provider: TELNYX"},"phoneNumber":{"type":"string","description":"phoneNumber: E.164 string"},"quoteId":{"type":"string","description":"quoteId: signed quoteId returned by GET /numbers/search (required in hosted mode)"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: PhoneNumber }"}},"x-atendia-source":"apps/server/src/modules/numbers/phone.route.ts","x-atendia-permission":"phoneNumber:create + billing:manage","x-atendia-ai-context":"POST /numbers Purchase a selected provider number using the current signed search quote. In hosted mode, quoteId is mandatory, organization-bound, and expires at quoteExpiresAt. Use case: Use this to purchase or provision a selected provider phone number. Side effects: Can provision billable telephony resources; confirm before use.","x-atendia-use-case":"Use this to purchase or provision a selected provider phone number.","x-atendia-side-effects":"Can provision billable telephony resources; confirm before use."}},"/numbers/{phId}":{"patch":{"tags":["Phone numbers"],"summary":"Assign or unassign a phone number to an agent.","description":"Selected endpoint: PATCH /numbers/{phId}.\n\nWhat it does: Assign or unassign a phone number to an agent.\n\nWhen to use it: Use this to route a phone number to a different agent or unassign it.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Owner/admin session only.\n\nPermission: phoneNumber:update + billing:manage.\n\nPath parameters: phId: uuid.\n\nRequest body: agentId: uuid | null.\n\nResponse: 200 { success, message, data: PhoneNumber }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about PATCH /numbers/{phId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: PATCH /numbers/{phId} Assign or unassign a phone number to an agent. Use case: Use this to route a phone number to a different agent or unassign it. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/numbers/phone.route.ts.","operationId":"patch-numbers-by-phid","parameters":[{"name":"phId","in":"path","required":true,"description":"phId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"agentId":{"type":"string","description":"agentId: uuid | null"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: PhoneNumber }"}},"x-atendia-source":"apps/server/src/modules/numbers/phone.route.ts","x-atendia-permission":"phoneNumber:update + billing:manage","x-atendia-ai-context":"PATCH /numbers/{phId} Assign or unassign a phone number to an agent. Use case: Use this to route a phone number to a different agent or unassign it. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to route a phone number to a different agent or unassign it.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."},"delete":{"tags":["Phone numbers"],"summary":"Immediately release a purchased phone number at the provider. This is permanent and the number may not be recoverable.","description":"Selected endpoint: DELETE /numbers/{phId}.\n\nWhat it does: Immediately release a purchased phone number at the provider. This is permanent and the number may not be recoverable.\n\nWhen to use it: Use this to release a phone number that is no longer needed.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Owner/admin session only.\n\nPermission: phoneNumber:delete + billing:manage.\n\nPath parameters: phId: uuid.\n\nResponse: 200 { success, message }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /numbers/{phId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /numbers/{phId} Immediately release a purchased phone number at the provider. This is permanent and the number may not be recoverable. Use case: Use this to release a phone number that is no longer needed. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/numbers/phone.route.ts.","operationId":"delete-numbers-by-phid","parameters":[{"name":"phId","in":"path","required":true,"description":"phId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message }"}},"x-atendia-source":"apps/server/src/modules/numbers/phone.route.ts","x-atendia-permission":"phoneNumber:delete + billing:manage","x-atendia-ai-context":"DELETE /numbers/{phId} Immediately release a purchased phone number at the provider. This is permanent and the number may not be recoverable. Use case: Use this to release a phone number that is no longer needed. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this to release a phone number that is no longer needed.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/calls":{"get":{"tags":["Calls and logs"],"summary":"List call logs with filters and cursor pagination.","description":"Selected endpoint: GET /calls.\n\nWhat it does: List call logs with filters and cursor pagination.\n\nWhen to use it: Use this to build call-history views, export call activity, or audit call outcomes with filters.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: callLogs:read.\n\nQuery parameters: agentId?: uuid; status?: CallStatus; direction?: inbound | outbound; from?: ISO datetime; to?: ISO datetime; limit?: 1-100; cursor?: string.\n\nResponse: 200 { success, message, data: CallLog[], nextCursor?, total? }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /calls. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /calls List call logs with filters and cursor pagination. Use case: Use this to build call-history views, export call activity, or audit call outcomes with filters. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/calllogs/calllog.route.ts.","operationId":"get-calls","parameters":[{"name":"agentId","in":"query","required":false,"description":"agentId?: uuid","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"status?: CallStatus","schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"description":"direction?: inbound | outbound","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"from?: ISO datetime","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"to?: ISO datetime","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"limit?: 1-100","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"cursor?: string","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: CallLog[], nextCursor?, total? }"}},"x-atendia-source":"apps/server/src/modules/calllogs/calllog.route.ts","x-atendia-permission":"callLogs:read","x-atendia-ai-context":"GET /calls List call logs with filters and cursor pagination. Use case: Use this to build call-history views, export call activity, or audit call outcomes with filters. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to build call-history views, export call activity, or audit call outcomes with filters.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/calls/live":{"get":{"tags":["Calls and logs"],"summary":"List currently live calls.","description":"Selected endpoint: GET /calls/live.\n\nWhat it does: List currently live calls.\n\nWhen to use it: Use this to show currently active calls in an operations console.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: callLogs:read.\n\nResponse: 200 { success, message, data: LiveCall[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /calls/live. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /calls/live List currently live calls. Use case: Use this to show currently active calls in an operations console. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/calllogs/calllog.route.ts.","operationId":"get-calls-live","security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: LiveCall[] }"}},"x-atendia-source":"apps/server/src/modules/calllogs/calllog.route.ts","x-atendia-permission":"callLogs:read","x-atendia-ai-context":"GET /calls/live List currently live calls. Use case: Use this to show currently active calls in an operations console. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to show currently active calls in an operations console.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/calls/live/end":{"post":{"tags":["Calls and logs"],"summary":"End a live call by LiveKit room name.","description":"Selected endpoint: POST /calls/live/end.\n\nWhat it does: End a live call by LiveKit room name.\n\nWhen to use it: Use this when an operator needs to force-end a stuck or unwanted live call.\n\nSide effects and risk: Stops active or scheduled work; confirm before use.\n\nAuthentication: Session only.\n\nPermission: callLogs:delete.\n\nRequest body: roomName: string.\n\nResponse: 200 { success, message, data: EndLiveCallResult }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /calls/live/end. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /calls/live/end End a live call by LiveKit room name. Use case: Use this when an operator needs to force-end a stuck or unwanted live call. Side effects: Stops active or scheduled work; confirm before use.\n\nSource: apps/server/src/modules/calllogs/calllog.route.ts.","operationId":"post-calls-live-end","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"roomName":{"type":"string","description":"roomName: string"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: EndLiveCallResult }"}},"x-atendia-source":"apps/server/src/modules/calllogs/calllog.route.ts","x-atendia-permission":"callLogs:delete","x-atendia-ai-context":"POST /calls/live/end End a live call by LiveKit room name. Use case: Use this when an operator needs to force-end a stuck or unwanted live call. Side effects: Stops active or scheduled work; confirm before use.","x-atendia-use-case":"Use this when an operator needs to force-end a stuck or unwanted live call.","x-atendia-side-effects":"Stops active or scheduled work; confirm before use."}},"/calls/{callId}":{"get":{"tags":["Calls and logs"],"summary":"Fetch one call log including call metadata.","description":"Selected endpoint: GET /calls/{callId}.\n\nWhat it does: Fetch one call log including call metadata.\n\nWhen to use it: Use this to inspect one call's metadata, status, recording, and routing information.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: callLogs:read.\n\nPath parameters: callId: string.\n\nResponse: 200 { success, message, data: CallLog }. data.metadata.closeReason says how the call ended, as one code: agent_ended (the agent ended the call), hung_up (the person hung up or left), caller_silent (the other person stayed silent; on an outbound call, nobody spoke), max_duration (the maximum length was reached), transferred (passed to a person, then ended), answered_by_recording (voicemail or a recording answered), no_answer (nobody answered), declined (rejected or busy), line_failed (the phone line failed before the answer), worker_error (internal error) or session_ended (no more specific reason); a FAILED call may carry session_start_failed or a billing_ code instead. Older calls have no closeReason.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /calls/{callId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /calls/{callId} Fetch one call log including call metadata. Use case: Use this to inspect one call's metadata, status, recording, and routing information. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/calllogs/calllog.route.ts.","operationId":"get-calls-by-callid","parameters":[{"name":"callId","in":"path","required":true,"description":"callId: string","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: CallLog }. data.metadata.closeReason says how the call ended, as one code: agent_ended (the agent ended the call), hung_up (the person hung up or left), caller_silent (the other person stayed silent; on an outbound call, nobody spoke), max_duration (the maximum length was reached), transferred (passed to a person, then ended), answered_by_recording (voicemail or a recording answered), no_answer (nobody answered), declined (rejected or busy), line_failed (the phone line failed before the answer), worker_error (internal error) or session_ended (no more specific reason); a FAILED call may carry session_start_failed or a billing_ code instead. Older calls have no closeReason"}},"x-atendia-source":"apps/server/src/modules/calllogs/calllog.route.ts","x-atendia-permission":"callLogs:read","x-atendia-ai-context":"GET /calls/{callId} Fetch one call log including call metadata. Use case: Use this to inspect one call's metadata, status, recording, and routing information. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to inspect one call's metadata, status, recording, and routing information.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"delete":{"tags":["Calls and logs"],"summary":"Delete a call log.","description":"Selected endpoint: DELETE /calls/{callId}.\n\nWhat it does: Delete a call log.\n\nWhen to use it: Use this for privacy, retention, or cleanup workflows that remove a call record.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: callLogs:delete.\n\nPath parameters: callId: string.\n\nResponse: 200 { success, message }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /calls/{callId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /calls/{callId} Delete a call log. Use case: Use this for privacy, retention, or cleanup workflows that remove a call record. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/calllogs/calllog.route.ts.","operationId":"delete-calls-by-callid","parameters":[{"name":"callId","in":"path","required":true,"description":"callId: string","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message }"}},"x-atendia-source":"apps/server/src/modules/calllogs/calllog.route.ts","x-atendia-permission":"callLogs:delete","x-atendia-ai-context":"DELETE /calls/{callId} Delete a call log. Use case: Use this for privacy, retention, or cleanup workflows that remove a call record. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this for privacy, retention, or cleanup workflows that remove a call record.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/calls/{callId}/transcripts":{"get":{"tags":["Calls and logs"],"summary":"Fetch transcript messages for one call.","description":"Selected endpoint: GET /calls/{callId}/transcripts.\n\nWhat it does: Fetch transcript messages for one call.\n\nWhen to use it: Use this to page through transcript messages for one call without loading every call log field.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: callLogs:read.\n\nPath parameters: callId: string.\n\nQuery parameters: limit?: 1-100; cursor?: string.\n\nResponse: 200 { success, message, data: Transcript[], nextCursor? }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /calls/{callId}/transcripts. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /calls/{callId}/transcripts Fetch transcript messages for one call. Use case: Use this to page through transcript messages for one call without loading every call log field. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/calllogs/calllog.route.ts.","operationId":"get-calls-by-callid-transcripts","parameters":[{"name":"callId","in":"path","required":true,"description":"callId: string","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"limit?: 1-100","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"cursor?: string","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: Transcript[], nextCursor? }"}},"x-atendia-source":"apps/server/src/modules/calllogs/calllog.route.ts","x-atendia-permission":"callLogs:read","x-atendia-ai-context":"GET /calls/{callId}/transcripts Fetch transcript messages for one call. Use case: Use this to page through transcript messages for one call without loading every call log field. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to page through transcript messages for one call without loading every call log field.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/dashboard/summary":{"get":{"tags":["Dashboard"],"summary":"Return KPI and time-range data for the dashboard.","description":"Selected endpoint: GET /dashboard/summary.\n\nWhat it does: Return KPI and time-range data for the dashboard.\n\nWhen to use it: Use this to power dashboard KPIs and charts without manually aggregating raw call logs.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: callLogs:read.\n\nQuery parameters: range?: 24h | 7d | 30d | custom; from?: date, required for custom; to?: date, required for custom; custom range maximum: 90 days.\n\nResponse: 200 { success, message, data: DashboardSummary }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /dashboard/summary. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /dashboard/summary Return KPI and time-range data for the dashboard. Use case: Use this to power dashboard KPIs and charts without manually aggregating raw call logs. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/dashboard/dashboard.route.ts.","operationId":"get-dashboard-summary","parameters":[{"name":"range","in":"query","required":false,"description":"range?: 24h | 7d | 30d | custom","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"from?: date, required for custom","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"to?: date, required for custom","schema":{"type":"string"}},{"name":"custom range maximum","in":"query","required":true,"description":"custom range maximum: 90 days","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: DashboardSummary }"}},"x-atendia-source":"apps/server/src/modules/dashboard/dashboard.route.ts","x-atendia-permission":"callLogs:read","x-atendia-ai-context":"GET /dashboard/summary Return KPI and time-range data for the dashboard. Use case: Use this to power dashboard KPIs and charts without manually aggregating raw call logs. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to power dashboard KPIs and charts without manually aggregating raw call logs.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls":{"get":{"tags":["Outbound calls"],"summary":"List outbound calls with filters.","description":"Selected endpoint: GET /outbound-calls.\n\nWhat it does: List outbound calls with filters.\n\nWhen to use it: Use this to list outbound attempts and campaign calls with operational filters.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nQuery parameters: agentId?: uuid; status?: CallStatus; mode?: OutboundCallMode; limit?: 1-100; cursor?: string; reference?: string (your reference, exact); search?: string, max 200 (part of the reference, key or agent name, start of the outboundId, or 3+ digits of a number).\n\nResponse: 200 { success, message, data: OutboundCallList }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls List outbound calls with filters. Use case: Use this to list outbound attempts and campaign calls with operational filters. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls","parameters":[{"name":"agentId","in":"query","required":false,"description":"agentId?: uuid","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"status?: CallStatus","schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"description":"mode?: OutboundCallMode","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"limit?: 1-100","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"cursor?: string","schema":{"type":"string"}},{"name":"reference","in":"query","required":false,"description":"reference?: string (your reference, exact)","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"search?: string, max 200 (part of the reference, key or agent name, start of the outboundId, or 3+ digits of a number)","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: OutboundCallList }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"GET /outbound-calls List outbound calls with filters. Use case: Use this to list outbound attempts and campaign calls with operational filters. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to list outbound attempts and campaign calls with operational filters.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"post":{"tags":["Outbound calls"],"summary":"Request one outbound call by API key. It waits for its time and for a free line; the result goes to the agent's post-call webhook.","description":"Selected endpoint: POST /outbound-calls.\n\nWhat it does: Request one outbound call by API key. It waits for its time and for a free line; the result goes to the agent's post-call webhook.\n\nWhen to use it: Use this from your own program, with a «Read and calls» key, to ask for one outbound call now or from a given time, with your own reference.\n\nSide effects and risk: Places real calls to people; it spends minutes and credit. Confirm intent before use.\n\nAuthentication: API key (read and calls).\n\nPermission: outboundCalls:create.\n\nRequest body: Idempotency-Key header?: up to 200 characters; agentId: uuid; phoneNumber: string; fromNumber?: string (needed only when the agent has more than one number); scheduledAt?: ISO date-time with offset, from 5 minutes ago to 90 days ahead (absent: now); notAfter?: ISO date-time with offset; no call of the request starts after it (400 NOT_AFTER_IN_PAST when already past, 400 SCHEDULED_AT_AFTER_NOT_AFTER when scheduledAt is equal or later); firstMessage?, systemPrompt?; dynamicVariables?: Record<string, string>; reference?: string, max 200 characters, no personal data.\n\nResponse: 201 { success, message, data: { outboundId, status, reason, waitReason (line, credit, hours or retry), nextAttemptAt, scheduledAt, notAfter, callbackScheduled, callbackOf, answeredBy, messageLeft, reference, origin, attempt, maxAttempts, endedByDeadline } }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls Request one outbound call by API key. It waits for its time and for a free line; the result goes to the agent's post-call webhook. Use case: Use this from your own program, with a «Read and calls» key, to ask for one outbound call now or from a given time, with your own reference. Side effects: Places real calls to people; it spends minutes and credit. Confirm intent before use.\n\nSource: apps/server/src/modules/outbound/outbound-api.route.ts.","operationId":"post-outbound-calls","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"Idempotency-Key header":{"type":"string","description":"Idempotency-Key header?: up to 200 characters"},"agentId":{"type":"string","description":"agentId: uuid"},"phoneNumber":{"type":"string","description":"phoneNumber: string"},"fromNumber":{"type":"string","description":"fromNumber?: string (needed only when the agent has more than one number)"},"scheduledAt":{"type":"string","description":"scheduledAt?: ISO date-time with offset, from 5 minutes ago to 90 days ahead (absent: now)"},"notAfter":{"type":"string","description":"notAfter?: ISO date-time with offset; no call of the request starts after it (400 NOT_AFTER_IN_PAST when already past, 400 SCHEDULED_AT_AFTER_NOT_AFTER when scheduledAt is equal or later)"},"firstMessage":{"type":"string","description":"firstMessage?, systemPrompt?"},"dynamicVariables":{"type":"string","description":"dynamicVariables?: Record<string, string>"},"reference":{"type":"string","description":"reference?: string, max 200 characters, no personal data"}}}}}},"security":[{"apiKey":[]}],"responses":{"201":{"description":"{ success, message, data: { outboundId, status, reason, waitReason (line, credit, hours or retry), nextAttemptAt, scheduledAt, notAfter, callbackScheduled, callbackOf, answeredBy, messageLeft, reference, origin, attempt, maxAttempts, endedByDeadline } }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-api.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls Request one outbound call by API key. It waits for its time and for a free line; the result goes to the agent's post-call webhook. Use case: Use this from your own program, with a «Read and calls» key, to ask for one outbound call now or from a given time, with your own reference. Side effects: Places real calls to people; it spends minutes and credit. Confirm intent before use.","x-atendia-use-case":"Use this from your own program, with a «Read and calls» key, to ask for one outbound call now or from a given time, with your own reference.","x-atendia-side-effects":"Places real calls to people; it spends minutes and credit. Confirm intent before use."}},"/outbound-calls/quick":{"post":{"tags":["Outbound calls"],"summary":"Dispatch one outbound call immediately.","description":"Selected endpoint: POST /outbound-calls/quick.\n\nWhat it does: Dispatch one outbound call immediately.\n\nWhen to use it: Use this to place one immediate outbound call from a chosen agent and caller ID.\n\nSide effects and risk: Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it.\n\nAuthentication: Session only.\n\nPermission: outboundCalls:create.\n\nRequest body: agentId: uuid; phoneNumber: string; fromNumber: string; firstMessage?, systemPrompt?, username?; dynamicVariables?: Record<string, string>; agentSpeaksFirst?: boolean (default false).\n\nResponse: 201 { success, message, data: OutboundCall }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/quick. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/quick Dispatch one outbound call immediately. Use case: Use this to place one immediate outbound call from a chosen agent and caller ID. Side effects: Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-quick","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"agentId":{"type":"string","description":"agentId: uuid"},"phoneNumber":{"type":"string","description":"phoneNumber: string"},"fromNumber":{"type":"string","description":"fromNumber: string"},"firstMessage":{"type":"string","description":"firstMessage?, systemPrompt?, username?"},"dynamicVariables":{"type":"string","description":"dynamicVariables?: Record<string, string>"},"agentSpeaksFirst":{"type":"string","description":"agentSpeaksFirst?: boolean (default false)"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: OutboundCall }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls/quick Dispatch one outbound call immediately. Use case: Use this to place one immediate outbound call from a chosen agent and caller ID. Side effects: Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it.","x-atendia-use-case":"Use this to place one immediate outbound call from a chosen agent and caller ID.","x-atendia-side-effects":"Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it."}},"/outbound-calls/batch-upload-url":{"get":{"tags":["Outbound calls"],"summary":"Create a presigned upload URL for CSV/XLSX campaign source files.","description":"Selected endpoint: GET /outbound-calls/batch-upload-url.\n\nWhat it does: Create a presigned upload URL for CSV/XLSX campaign source files.\n\nWhen to use it: Use this before creating a campaign so the source CSV/XLSX file can be uploaded directly to storage. The PUT must send the returned requiredHeaders (If-None-Match: *).\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key (read and calls).\n\nPermission: outboundCalls:create.\n\nQuery parameters: fileName: .csv or .xlsx; contentType: string.\n\nResponse: 200 { success, message, data: { uploadUrl, s3Key, contentType, maxUploadBytes, requiredHeaders } } — PUT the file with requiredHeaders (If-None-Match: *).\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls/batch-upload-url. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls/batch-upload-url Create a presigned upload URL for CSV/XLSX campaign source files. Use case: Use this before creating a campaign so the source CSV/XLSX file can be uploaded directly to storage. The PUT must send the returned requiredHeaders (If-None-Match: *). Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls-batch-upload-url","parameters":[{"name":"fileName","in":"query","required":true,"description":"fileName: .csv or .xlsx","schema":{"type":"string"}},{"name":"contentType","in":"query","required":true,"description":"contentType: string","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: { uploadUrl, s3Key, contentType, maxUploadBytes, requiredHeaders } } — PUT the file with requiredHeaders (If-None-Match: *)"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"GET /outbound-calls/batch-upload-url Create a presigned upload URL for CSV/XLSX campaign source files. Use case: Use this before creating a campaign so the source CSV/XLSX file can be uploaded directly to storage. The PUT must send the returned requiredHeaders (If-None-Match: *). Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this before creating a campaign so the source CSV/XLSX file can be uploaded directly to storage. The PUT must send the returned requiredHeaders (If-None-Match: *).","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls/batches":{"post":{"tags":["Outbound calls"],"summary":"Create a batch campaign from an uploaded source file.","description":"Selected endpoint: POST /outbound-calls/batches.\n\nWhat it does: Create a batch campaign from an uploaded source file.\n\nWhen to use it: Use this to create a scheduled or immediate outbound campaign from an uploaded source file.\n\nSide effects and risk: Places real calls to people; it spends minutes and credit. Confirm intent before use.\n\nAuthentication: Session or API key (read and calls).\n\nPermission: outboundCalls:create.\n\nRequest body: name: string; agentId: uuid; fromNumber: string; sourceFileKey: string; sourceFileName: string; scheduledAt?: date | null; timezone?: string; ringingTimeoutSeconds?: 10-70; agentSpeaksFirst?: boolean (default false).\n\nResponse: 201 { success, message, data: BatchCampaign }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches Create a batch campaign from an uploaded source file. Use case: Use this to create a scheduled or immediate outbound campaign from an uploaded source file. Side effects: Places real calls to people; it spends minutes and credit. Confirm intent before use.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-batches","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"name: string"},"agentId":{"type":"string","description":"agentId: uuid"},"fromNumber":{"type":"string","description":"fromNumber: string"},"sourceFileKey":{"type":"string","description":"sourceFileKey: string"},"sourceFileName":{"type":"string","description":"sourceFileName: string"},"scheduledAt":{"type":"string","description":"scheduledAt?: date | null"},"timezone":{"type":"string","description":"timezone?: string"},"ringingTimeoutSeconds":{"type":"string","description":"ringingTimeoutSeconds?: 10-70"},"agentSpeaksFirst":{"type":"string","description":"agentSpeaksFirst?: boolean (default false)"}}}}}},"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"201":{"description":"{ success, message, data: BatchCampaign }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls/batches Create a batch campaign from an uploaded source file. Use case: Use this to create a scheduled or immediate outbound campaign from an uploaded source file. Side effects: Places real calls to people; it spends minutes and credit. Confirm intent before use.","x-atendia-use-case":"Use this to create a scheduled or immediate outbound campaign from an uploaded source file.","x-atendia-side-effects":"Places real calls to people; it spends minutes and credit. Confirm intent before use."},"get":{"tags":["Outbound calls"],"summary":"List batch campaigns.","description":"Selected endpoint: GET /outbound-calls/batches.\n\nWhat it does: List batch campaigns.\n\nWhen to use it: Use this to show campaign history and campaign-level status.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nQuery parameters: agentId?: uuid.\n\nResponse: 200 { success, message, data: BatchCampaign[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls/batches. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls/batches List batch campaigns. Use case: Use this to show campaign history and campaign-level status. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls-batches","parameters":[{"name":"agentId","in":"query","required":false,"description":"agentId?: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: BatchCampaign[] }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"GET /outbound-calls/batches List batch campaigns. Use case: Use this to show campaign history and campaign-level status. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to show campaign history and campaign-level status.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls/batches/list":{"post":{"tags":["Outbound calls"],"summary":"Create a campaign by API key from a list of up to 5000 contacts in the request (2 MB at most).","description":"Selected endpoint: POST /outbound-calls/batches/list.\n\nWhat it does: Create a campaign by API key from a list of up to 5000 contacts in the request (2 MB at most).\n\nWhen to use it: Use this from your own program, with a «Read and calls» key, to start a campaign from a list of contacts sent in the request.\n\nSide effects and risk: Places real calls to people; it spends minutes and credit. Confirm intent before use.\n\nAuthentication: API key (read and calls).\n\nPermission: outboundCalls:create.\n\nRequest body: Idempotency-Key header?: up to 200 characters; name: string, max 120; agentId: uuid; fromNumber?: string; scheduledAt?: ISO date-time with offset (absent: now); contacts: { phoneNumber, firstMessage?, systemPrompt?, dynamicVariables?, reference? }[], 1-5000.\n\nResponse: 201 { success, message, data: { campaignId, accepted, rejectedCount, rejected (first 100: position, reference, reason) } }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches/list. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches/list Create a campaign by API key from a list of up to 5000 contacts in the request (2 MB at most). Use case: Use this from your own program, with a «Read and calls» key, to start a campaign from a list of contacts sent in the request. Side effects: Places real calls to people; it spends minutes and credit. Confirm intent before use.\n\nSource: apps/server/src/modules/outbound/outbound-api-list.route.ts.","operationId":"post-outbound-calls-batches-list","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"Idempotency-Key header":{"type":"string","description":"Idempotency-Key header?: up to 200 characters"},"name":{"type":"string","description":"name: string, max 120"},"agentId":{"type":"string","description":"agentId: uuid"},"fromNumber":{"type":"string","description":"fromNumber?: string"},"scheduledAt":{"type":"string","description":"scheduledAt?: ISO date-time with offset (absent: now)"},"contacts":{"type":"string","description":"contacts: { phoneNumber, firstMessage?, systemPrompt?, dynamicVariables?, reference? }[], 1-5000"}}}}}},"security":[{"apiKey":[]}],"responses":{"201":{"description":"{ success, message, data: { campaignId, accepted, rejectedCount, rejected (first 100: position, reference, reason) } }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-api-list.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls/batches/list Create a campaign by API key from a list of up to 5000 contacts in the request (2 MB at most). Use case: Use this from your own program, with a «Read and calls» key, to start a campaign from a list of contacts sent in the request. Side effects: Places real calls to people; it spends minutes and credit. Confirm intent before use.","x-atendia-use-case":"Use this from your own program, with a «Read and calls» key, to start a campaign from a list of contacts sent in the request.","x-atendia-side-effects":"Places real calls to people; it spends minutes and credit. Confirm intent before use."}},"/outbound-calls/batches/{campaignId}":{"get":{"tags":["Outbound calls"],"summary":"Fetch one batch campaign with one page of its recipients in file order. Pass nextCursor back as cursor for the next page.","description":"Selected endpoint: GET /outbound-calls/batches/{campaignId}.\n\nWhat it does: Fetch one batch campaign with one page of its recipients in file order. Pass nextCursor back as cursor for the next page.\n\nWhen to use it: Use this to inspect one campaign's details and progress, one page of recipients at a time.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nPath parameters: campaignId: uuid.\n\nQuery parameters: limit?: 1-100 (default 50); cursor?: string (nextCursor of the previous page).\n\nResponse: 200 { success, message, data: BatchCampaignDetail { ...campaign, outboundCalls (one page), nextCursor (null on the last page), callCounts { total, byStatus, retriesPending } } }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls/batches/{campaignId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls/batches/{campaignId} Fetch one batch campaign with one page of its recipients in file order. Pass nextCursor back as cursor for the next page. Use case: Use this to inspect one campaign's details and progress, one page of recipients at a time. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls-batches-by-campaignid","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"limit?: 1-100 (default 50)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"cursor?: string (nextCursor of the previous page)","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: BatchCampaignDetail { ...campaign, outboundCalls (one page), nextCursor (null on the last page), callCounts { total, byStatus, retriesPending } } }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"GET /outbound-calls/batches/{campaignId} Fetch one batch campaign with one page of its recipients in file order. Pass nextCursor back as cursor for the next page. Use case: Use this to inspect one campaign's details and progress, one page of recipients at a time. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to inspect one campaign's details and progress, one page of recipients at a time.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls/batches/{campaignId}/results.csv":{"get":{"tags":["Outbound calls"],"summary":"Download the results of one campaign as a CSV file, one line per recipient in file order. With an API key, failure_reason is a code from the closed list of failure reasons, never the stored text. A download cut before the end is incomplete.","description":"Selected endpoint: GET /outbound-calls/batches/{campaignId}/results.csv.\n\nWhat it does: Download the results of one campaign as a CSV file, one line per recipient in file order. With an API key, failure_reason is a code from the closed list of failure reasons, never the stored text. A download cut before the end is incomplete.\n\nWhen to use it: Use this to download every result of one campaign in a single CSV file.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nPath parameters: campaignId: uuid.\n\nResponse: 200 text/csv attachment, not JSON: row_number, phone_number, outbound_status, call_status, call_id, outbound_id, duration_seconds, failure_reason, started_at, ended_at, then the file's columns and the collected data.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls/batches/{campaignId}/results.csv. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls/batches/{campaignId}/results.csv Download the results of one campaign as a CSV file, one line per recipient in file order. With an API key, failure_reason is a code from the closed list of failure reasons, never the stored text. A download cut before the end is incomplete. Use case: Use this to download every result of one campaign in a single CSV file. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls-batches-by-campaignid-results-csv","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"text/csv attachment, not JSON: row_number, phone_number, outbound_status, call_status, call_id, outbound_id, duration_seconds, failure_reason, started_at, ended_at, then the file's columns and the collected data"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"GET /outbound-calls/batches/{campaignId}/results.csv Download the results of one campaign as a CSV file, one line per recipient in file order. With an API key, failure_reason is a code from the closed list of failure reasons, never the stored text. A download cut before the end is incomplete. Use case: Use this to download every result of one campaign in a single CSV file. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to download every result of one campaign in a single CSV file.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls/batches/{campaignId}/personalization/preflight":{"post":{"tags":["Outbound calls"],"summary":"Validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch.","description":"Selected endpoint: POST /outbound-calls/batches/{campaignId}/personalization/preflight.\n\nWhat it does: Validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch.\n\nWhen to use it: Use this operation for the validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nPath parameters: campaignId: uuid.\n\nRequest body: schema: { version, fields, templates }; recipients: { recipientKey, rowNumber?, values }[]; includeSensitivePreview?: boolean.\n\nResponse: 200 { success, message, data: CampaignPersonalizationPreflight }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches/{campaignId}/personalization/preflight. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches/{campaignId}/personalization/preflight Validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch. Use case: Use this operation for the validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-batches-by-campaignid-personalization-preflight","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"schema":{"type":"string","description":"schema: { version, fields, templates }"},"recipients":{"type":"string","description":"recipients: { recipientKey, rowNumber?, values }[]"},"includeSensitivePreview":{"type":"string","description":"includeSensitivePreview?: boolean"}}}}}},"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: CampaignPersonalizationPreflight }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"POST /outbound-calls/batches/{campaignId}/personalization/preflight Validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch. Use case: Use this operation for the validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this operation for the validate typed per-recipient personalization, fallback behavior, rendered previews, and snapshot digests before dispatch.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/outbound-calls/batches/{campaignId}/experiments/assignments":{"post":{"tags":["Outbound calls"],"summary":"Compute deterministic experiment variant assignments for recipients.","description":"Selected endpoint: POST /outbound-calls/batches/{campaignId}/experiments/assignments.\n\nWhat it does: Compute deterministic experiment variant assignments for recipients.\n\nWhen to use it: Use this operation for the compute deterministic experiment variant assignments for recipients.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: outboundCalls:create.\n\nPath parameters: campaignId: uuid.\n\nRequest body: experiment: { experimentId, version, hypothesis, primaryMetric, unit, stoppingPolicy, variants }; unitKeys: string[]; excludedUnitKeys?: Record<string, string>.\n\nResponse: 200 { success, message, data: CampaignExperimentAssignments }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches/{campaignId}/experiments/assignments. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches/{campaignId}/experiments/assignments Compute deterministic experiment variant assignments for recipients. Use case: Use this operation for the compute deterministic experiment variant assignments for recipients. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-batches-by-campaignid-experiments-assignments","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"experiment":{"type":"string","description":"experiment: { experimentId, version, hypothesis, primaryMetric, unit, stoppingPolicy, variants }"},"unitKeys":{"type":"string","description":"unitKeys: string[]"},"excludedUnitKeys":{"type":"string","description":"excludedUnitKeys?: Record<string, string>"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: CampaignExperimentAssignments }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls/batches/{campaignId}/experiments/assignments Compute deterministic experiment variant assignments for recipients. Use case: Use this operation for the compute deterministic experiment variant assignments for recipients. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this operation for the compute deterministic experiment variant assignments for recipients.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/outbound-calls/batches/{campaignId}/conversions/validate":{"post":{"tags":["Outbound calls"],"summary":"Validate a conversion event before idempotent ingestion and attribution. In a campaign that keeps no personal data, a phone number as externalCustomerId is rejected (code CUSTOMER_ID_IS_PHONE_NUMBER); send the customer's own key, the file's recipient_key.","description":"Selected endpoint: POST /outbound-calls/batches/{campaignId}/conversions/validate.\n\nWhat it does: Validate a conversion event before idempotent ingestion and attribution. In a campaign that keeps no personal data, a phone number as externalCustomerId is rejected (code CUSTOMER_ID_IS_PHONE_NUMBER); send the customer's own key, the file's recipient_key.\n\nWhen to use it: Use this operation for the validate a conversion event before idempotent ingestion and attribution. in a campaign that keeps no personal data, a phone number as externalcustomerid is rejected (code customer_id_is_phone_number); send the customer's own key, the file's recipient_key.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: outboundCalls:create.\n\nPath parameters: campaignId: uuid.\n\nRequest body: goalKey: string; dedupeKey: string; externalCustomerId: string; occurredAt: date; valueCents?: integer; currency?: ISO 4217; source: string; evidence?: object.\n\nResponse: 200 { success, message, data: CampaignConversionValidation } or 400 validation rejection.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches/{campaignId}/conversions/validate. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches/{campaignId}/conversions/validate Validate a conversion event before idempotent ingestion and attribution. In a campaign that keeps no personal data, a phone number as externalCustomerId is rejected (code CUSTOMER_ID_IS_PHONE_NUMBER); send the customer's own key, the file's recipient_key. Use case: Use this operation for the validate a conversion event before idempotent ingestion and attribution. in a campaign that keeps no personal data, a phone number as externalcustomerid is rejected (code customer_id_is_phone_number); send the customer's own key, the file's recipient_key. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-batches-by-campaignid-conversions-validate","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"goalKey":{"type":"string","description":"goalKey: string"},"dedupeKey":{"type":"string","description":"dedupeKey: string"},"externalCustomerId":{"type":"string","description":"externalCustomerId: string"},"occurredAt":{"type":"string","description":"occurredAt: date"},"valueCents":{"type":"string","description":"valueCents?: integer"},"currency":{"type":"string","description":"currency?: ISO 4217"},"source":{"type":"string","description":"source: string"},"evidence":{"type":"string","description":"evidence?: object"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: CampaignConversionValidation } or 400 validation rejection"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls/batches/{campaignId}/conversions/validate Validate a conversion event before idempotent ingestion and attribution. In a campaign that keeps no personal data, a phone number as externalCustomerId is rejected (code CUSTOMER_ID_IS_PHONE_NUMBER); send the customer's own key, the file's recipient_key. Use case: Use this operation for the validate a conversion event before idempotent ingestion and attribution. in a campaign that keeps no personal data, a phone number as externalcustomerid is rejected (code customer_id_is_phone_number); send the customer's own key, the file's recipient_key. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this operation for the validate a conversion event before idempotent ingestion and attribution. in a campaign that keeps no personal data, a phone number as externalcustomerid is rejected (code customer_id_is_phone_number); send the customer's own key, the file's recipient_key.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/outbound-calls/batches/{campaignId}/reports/preview":{"post":{"tags":["Outbound calls"],"summary":"Generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign.","description":"Selected endpoint: POST /outbound-calls/batches/{campaignId}/reports/preview.\n\nWhat it does: Generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign.\n\nWhen to use it: Use this operation for the generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nPath parameters: campaignId: uuid.\n\nRequest body: randomized?: boolean; persistReport?: boolean.\n\nResponse: 200 { success, message, data: CampaignReportPreview }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches/{campaignId}/reports/preview. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches/{campaignId}/reports/preview Generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign. Use case: Use this operation for the generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-batches-by-campaignid-reports-preview","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"randomized":{"type":"string","description":"randomized?: boolean"},"persistReport":{"type":"string","description":"persistReport?: boolean"}}}}}},"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: CampaignReportPreview }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"POST /outbound-calls/batches/{campaignId}/reports/preview Generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign. Use case: Use this operation for the generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this operation for the generate variant-level campaign reporting with denominators, cost, uncertainty, and observational/randomized evidence labels, over every recipient and non-rejected conversion of the campaign.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/outbound-calls/batches/{campaignId}/cancel":{"post":{"tags":["Outbound calls"],"summary":"Cancel a batch campaign, scheduled or already running (ACTIVE). Calls already placed end on their own; recipients not yet called are not called. An API key cancels only campaigns created by API keys.","description":"Selected endpoint: POST /outbound-calls/batches/{campaignId}/cancel.\n\nWhat it does: Cancel a batch campaign, scheduled or already running (ACTIVE). Calls already placed end on their own; recipients not yet called are not called. An API key cancels only campaigns created by API keys.\n\nWhen to use it: Use this to stop an outbound batch campaign, scheduled or already running (ACTIVE): calls already placed end on their own and the recipients not yet called are not called.\n\nSide effects and risk: Stops active or scheduled work; confirm before use.\n\nAuthentication: Session or API key (read and calls).\n\nPermission: outboundCalls:delete.\n\nPath parameters: campaignId: uuid.\n\nResponse: 200 { success, message, data: BatchCampaign }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/batches/{campaignId}/cancel. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/batches/{campaignId}/cancel Cancel a batch campaign, scheduled or already running (ACTIVE). Calls already placed end on their own; recipients not yet called are not called. An API key cancels only campaigns created by API keys. Use case: Use this to stop an outbound batch campaign, scheduled or already running (ACTIVE): calls already placed end on their own and the recipients not yet called are not called. Side effects: Stops active or scheduled work; confirm before use.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-batches-by-campaignid-cancel","parameters":[{"name":"campaignId","in":"path","required":true,"description":"campaignId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: BatchCampaign }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:delete","x-atendia-ai-context":"POST /outbound-calls/batches/{campaignId}/cancel Cancel a batch campaign, scheduled or already running (ACTIVE). Calls already placed end on their own; recipients not yet called are not called. An API key cancels only campaigns created by API keys. Use case: Use this to stop an outbound batch campaign, scheduled or already running (ACTIVE): calls already placed end on their own and the recipients not yet called are not called. Side effects: Stops active or scheduled work; confirm before use.","x-atendia-use-case":"Use this to stop an outbound batch campaign, scheduled or already running (ACTIVE): calls already placed end on their own and the recipients not yet called are not called.","x-atendia-side-effects":"Stops active or scheduled work; confirm before use."}},"/outbound-calls/{outboundId}":{"get":{"tags":["Outbound calls"],"summary":"Fetch outbound call detail, with status, reason, waitReason, nextAttemptAt (when it waits for the agent's calling hours or for its next automatic attempt), notAfter, callbackScheduled ({ at, outboundId } of the callback booked on this call, or null), callbackOf (the outboundId of the call a callback came from, or null), answeredBy (person, voicemail, operator_recording or nobody_spoke; only when recognition ran, nobody_spoke always), messageLeft (true when the agent left the voicemail message), attempt (the attempt it is on, 1 for the first call), maxAttempts (the most calls of the request), endedByDeadline (true when notAfter ended it between attempts), reference, origin, durationSeconds and, with callLogs:read, the collected data.","description":"Selected endpoint: GET /outbound-calls/{outboundId}.\n\nWhat it does: Fetch outbound call detail, with status, reason, waitReason, nextAttemptAt (when it waits for the agent's calling hours or for its next automatic attempt), notAfter, callbackScheduled ({ at, outboundId } of the callback booked on this call, or null), callbackOf (the outboundId of the call a callback came from, or null), answeredBy (person, voicemail, operator_recording or nobody_spoke; only when recognition ran, nobody_spoke always), messageLeft (true when the agent left the voicemail message), attempt (the attempt it is on, 1 for the first call), maxAttempts (the most calls of the request), endedByDeadline (true when notAfter ended it between attempts), reference, origin, durationSeconds and, with callLogs:read, the collected data.\n\nWhen to use it: Use this to inspect full details for one outbound call attempt.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nPath parameters: outboundId: uuid.\n\nResponse: 200 { success, message, data: OutboundCall }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls/{outboundId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls/{outboundId} Fetch outbound call detail, with status, reason, waitReason, nextAttemptAt (when it waits for the agent's calling hours or for its next automatic attempt), notAfter, callbackScheduled ({ at, outboundId } of the callback booked on this call, or null), callbackOf (the outboundId of the call a callback came from, or null), answeredBy (person, voicemail, operator_recording or nobody_spoke; only when recognition ran, nobody_spoke always), messageLeft (true when the agent left the voicemail message), attempt (the attempt it is on, 1 for the first call), maxAttempts (the most calls of the request), endedByDeadline (true when notAfter ended it between attempts), reference, origin, durationSeconds and, with callLogs:read, the collected data. Use case: Use this to inspect full details for one outbound call attempt. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls-by-outboundid","parameters":[{"name":"outboundId","in":"path","required":true,"description":"outboundId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: OutboundCall }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"GET /outbound-calls/{outboundId} Fetch outbound call detail, with status, reason, waitReason, nextAttemptAt (when it waits for the agent's calling hours or for its next automatic attempt), notAfter, callbackScheduled ({ at, outboundId } of the callback booked on this call, or null), callbackOf (the outboundId of the call a callback came from, or null), answeredBy (person, voicemail, operator_recording or nobody_spoke; only when recognition ran, nobody_spoke always), messageLeft (true when the agent left the voicemail message), attempt (the attempt it is on, 1 for the first call), maxAttempts (the most calls of the request), endedByDeadline (true when notAfter ended it between attempts), reference, origin, durationSeconds and, with callLogs:read, the collected data. Use case: Use this to inspect full details for one outbound call attempt. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to inspect full details for one outbound call attempt.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls/{outboundId}/status":{"get":{"tags":["Outbound calls"],"summary":"Fetch the compact status of one outbound call for polling.","description":"Selected endpoint: GET /outbound-calls/{outboundId}/status.\n\nWhat it does: Fetch the compact status of one outbound call for polling.\n\nWhen to use it: Use this operation for the fetch the compact status of one outbound call for polling.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: outboundCalls:read.\n\nPath parameters: outboundId: uuid.\n\nResponse: 200 { success, message, data: { outboundId, status, failureReason, updatedAt } }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /outbound-calls/{outboundId}/status. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /outbound-calls/{outboundId}/status Fetch the compact status of one outbound call for polling. Use case: Use this operation for the fetch the compact status of one outbound call for polling. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"get-outbound-calls-by-outboundid-status","parameters":[{"name":"outboundId","in":"path","required":true,"description":"outboundId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: { outboundId, status, failureReason, updatedAt } }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:read","x-atendia-ai-context":"GET /outbound-calls/{outboundId}/status Fetch the compact status of one outbound call for polling. Use case: Use this operation for the fetch the compact status of one outbound call for polling. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this operation for the fetch the compact status of one outbound call for polling.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/outbound-calls/{outboundId}/cancel":{"post":{"tags":["Outbound calls"],"summary":"Cancel one outbound call. An API key cancels only the single calls asked by API keys, before they start dialing; a repeated cancel answers the same. While the conversation is in progress it is refused with 400 and details.furtherAttempts false: no callback follows.","description":"Selected endpoint: POST /outbound-calls/{outboundId}/cancel.\n\nWhat it does: Cancel one outbound call. An API key cancels only the single calls asked by API keys, before they start dialing; a repeated cancel answers the same. While the conversation is in progress it is refused with 400 and details.furtherAttempts false: no callback follows.\n\nWhen to use it: Use this to cancel an individual scheduled outbound call before it completes.\n\nSide effects and risk: Stops active or scheduled work; confirm before use.\n\nAuthentication: Session or API key (read and calls).\n\nPermission: outboundCalls:delete.\n\nPath parameters: outboundId: uuid.\n\nRequest body: reason?: string, max 500 chars.\n\nResponse: 200 { success, message, data: OutboundCall }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/{outboundId}/cancel. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/{outboundId}/cancel Cancel one outbound call. An API key cancels only the single calls asked by API keys, before they start dialing; a repeated cancel answers the same. While the conversation is in progress it is refused with 400 and details.furtherAttempts false: no callback follows. Use case: Use this to cancel an individual scheduled outbound call before it completes. Side effects: Stops active or scheduled work; confirm before use.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-by-outboundid-cancel","parameters":[{"name":"outboundId","in":"path","required":true,"description":"outboundId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"reason":{"type":"string","description":"reason?: string, max 500 chars"}}}}}},"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: OutboundCall }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:delete","x-atendia-ai-context":"POST /outbound-calls/{outboundId}/cancel Cancel one outbound call. An API key cancels only the single calls asked by API keys, before they start dialing; a repeated cancel answers the same. While the conversation is in progress it is refused with 400 and details.furtherAttempts false: no callback follows. Use case: Use this to cancel an individual scheduled outbound call before it completes. Side effects: Stops active or scheduled work; confirm before use.","x-atendia-use-case":"Use this to cancel an individual scheduled outbound call before it completes.","x-atendia-side-effects":"Stops active or scheduled work; confirm before use."}},"/outbound-calls/{outboundId}/retry":{"post":{"tags":["Outbound calls"],"summary":"Retry a failed or cancelled outbound call.","description":"Selected endpoint: POST /outbound-calls/{outboundId}/retry.\n\nWhat it does: Retry a failed or cancelled outbound call.\n\nWhen to use it: Use this to retry a failed or unanswered outbound call without rebuilding the original request.\n\nSide effects and risk: Can re-run a call or workflow; confirm before use because it may contact a person or consume resources.\n\nAuthentication: Session only.\n\nPermission: outboundCalls:create.\n\nPath parameters: outboundId: uuid.\n\nResponse: 201 { success, message, data: OutboundCall }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /outbound-calls/{outboundId}/retry. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /outbound-calls/{outboundId}/retry Retry a failed or cancelled outbound call. Use case: Use this to retry a failed or unanswered outbound call without rebuilding the original request. Side effects: Can re-run a call or workflow; confirm before use because it may contact a person or consume resources.\n\nSource: apps/server/src/modules/outbound/outbound-call.route.ts.","operationId":"post-outbound-calls-by-outboundid-retry","parameters":[{"name":"outboundId","in":"path","required":true,"description":"outboundId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: OutboundCall }"}},"x-atendia-source":"apps/server/src/modules/outbound/outbound-call.route.ts","x-atendia-permission":"outboundCalls:create","x-atendia-ai-context":"POST /outbound-calls/{outboundId}/retry Retry a failed or cancelled outbound call. Use case: Use this to retry a failed or unanswered outbound call without rebuilding the original request. Side effects: Can re-run a call or workflow; confirm before use because it may contact a person or consume resources.","x-atendia-use-case":"Use this to retry a failed or unanswered outbound call without rebuilding the original request.","x-atendia-side-effects":"Can re-run a call or workflow; confirm before use because it may contact a person or consume resources."}},"/kb":{"post":{"tags":["Knowledge base"],"summary":"Create knowledge sources for an agent.","description":"Selected endpoint: POST /kb.\n\nWhat it does: Create knowledge sources for an agent.\n\nWhen to use it: Use this to register uploaded or URL-based documents as agent knowledge sources.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: knowledgeSource:create.\n\nRequest body: agentId: uuid; documents: Array<{ name, sourceType, url?, s3Key?, originalFileName? }>.\n\nResponse: 201 { success, message, data: KnowledgeSource[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /kb. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /kb Create knowledge sources for an agent. Use case: Use this to register uploaded or URL-based documents as agent knowledge sources. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/kb/kb.route.ts.","operationId":"post-kb","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"agentId":{"type":"string","description":"agentId: uuid"},"documents":{"type":"string","description":"documents: Array<{ name, sourceType, url?, s3Key?, originalFileName? }>"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: KnowledgeSource[] }"}},"x-atendia-source":"apps/server/src/modules/kb/kb.route.ts","x-atendia-permission":"knowledgeSource:create","x-atendia-ai-context":"POST /kb Create knowledge sources for an agent. Use case: Use this to register uploaded or URL-based documents as agent knowledge sources. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to register uploaded or URL-based documents as agent knowledge sources.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."},"get":{"tags":["Knowledge base"],"summary":"List knowledge sources, optionally scoped to an agent.","description":"Selected endpoint: GET /kb.\n\nWhat it does: List knowledge sources, optionally scoped to an agent.\n\nWhen to use it: Use this to list knowledge sources and processing status for an organization or agent.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: knowledgeSource:read.\n\nQuery parameters: agentId?: uuid.\n\nResponse: 200 { success, message, data: KnowledgeSource[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /kb. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /kb List knowledge sources, optionally scoped to an agent. Use case: Use this to list knowledge sources and processing status for an organization or agent. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/kb/kb.route.ts.","operationId":"get-kb","parameters":[{"name":"agentId","in":"query","required":false,"description":"agentId?: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: KnowledgeSource[] }"}},"x-atendia-source":"apps/server/src/modules/kb/kb.route.ts","x-atendia-permission":"knowledgeSource:read","x-atendia-ai-context":"GET /kb List knowledge sources, optionally scoped to an agent. Use case: Use this to list knowledge sources and processing status for an organization or agent. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to list knowledge sources and processing status for an organization or agent.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/kb/upload-url":{"get":{"tags":["Knowledge base"],"summary":"Create a presigned S3 upload URL for a knowledge file.","description":"Selected endpoint: GET /kb/upload-url.\n\nWhat it does: Create a presigned S3 upload URL for a knowledge file.\n\nWhen to use it: Use this to securely upload a knowledge file through a presigned storage URL.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session only.\n\nPermission: knowledgeSource:create.\n\nQuery parameters: fileName: string; contentType: MIME string.\n\nResponse: 200 { success, message, data: { uploadUrl, s3Key } }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /kb/upload-url. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /kb/upload-url Create a presigned S3 upload URL for a knowledge file. Use case: Use this to securely upload a knowledge file through a presigned storage URL. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/kb/kb.route.ts.","operationId":"get-kb-upload-url","parameters":[{"name":"fileName","in":"query","required":true,"description":"fileName: string","schema":{"type":"string"}},{"name":"contentType","in":"query","required":true,"description":"contentType: MIME string","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: { uploadUrl, s3Key } }"}},"x-atendia-source":"apps/server/src/modules/kb/kb.route.ts","x-atendia-permission":"knowledgeSource:create","x-atendia-ai-context":"GET /kb/upload-url Create a presigned S3 upload URL for a knowledge file. Use case: Use this to securely upload a knowledge file through a presigned storage URL. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to securely upload a knowledge file through a presigned storage URL.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/kb/{kbId}":{"delete":{"tags":["Knowledge base"],"summary":"Delete a knowledge source.","description":"Selected endpoint: DELETE /kb/{kbId}.\n\nWhat it does: Delete a knowledge source.\n\nWhen to use it: Use this to remove a knowledge source from an agent's retrievable context.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: knowledgeSource:delete.\n\nPath parameters: kbId: uuid.\n\nResponse: 200 { success, message }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /kb/{kbId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /kb/{kbId} Delete a knowledge source. Use case: Use this to remove a knowledge source from an agent's retrievable context. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/kb/kb.route.ts.","operationId":"delete-kb-by-kbid","parameters":[{"name":"kbId","in":"path","required":true,"description":"kbId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message }"}},"x-atendia-source":"apps/server/src/modules/kb/kb.route.ts","x-atendia-permission":"knowledgeSource:delete","x-atendia-ai-context":"DELETE /kb/{kbId} Delete a knowledge source. Use case: Use this to remove a knowledge source from an agent's retrievable context. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this to remove a knowledge source from an agent's retrievable context.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/tools":{"get":{"tags":["Tools"],"summary":"List organization tools.","description":"Selected endpoint: GET /tools.\n\nWhat it does: List organization tools.\n\nWhen to use it: Use this to list reusable HTTP tools configured for the organization.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: tools:read.\n\nResponse: 200 { success, message, data: Tool[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /tools. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /tools List organization tools. Use case: Use this to list reusable HTTP tools configured for the organization. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"get-tools","security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: Tool[] }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:read","x-atendia-ai-context":"GET /tools List organization tools. Use case: Use this to list reusable HTTP tools configured for the organization. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to list reusable HTTP tools configured for the organization.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"post":{"tags":["Tools"],"summary":"Create an HTTP tool definition.","description":"Selected endpoint: POST /tools.\n\nWhat it does: Create an HTTP tool definition.\n\nWhen to use it: Use this to create a callable HTTP tool that agents can use during conversations.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: tools:create.\n\nRequest body: name, description, api_url; api_method?: GET|POST|PUT|PATCH|DELETE; api_headers?, api_body?, api_query_params?, api_path_params?; api_body[].path?: where the value goes in the JSON body, e.g. cliente.nome or servicos[0].id (body only; letters, digits and _ $ @ : -, max 8 steps and 200 characters; empty means none); A Static Value in api_body, api_query_params or api_path_params is stored encrypted; whoever can edit tools reads it back in clear. A value that starts with qvsec: is refused (400); response_fields?: the fields the agent reads from the reply, [{ name, path }], 0 to 20, null or empty for the whole reply. name: letters, digits and _ (up to 64), unique, not secret-like (token, password, webhook...); path: e.g. cliente.nome or servicos[*].id. The reply is cleaned before the fields are chosen. Returned on every Tool read; response_timeout_secs?, dynamic_variables?; disable_interruptions?, force_pre_tool_speech?.\n\nResponse: 201 { success, message, data: Tool }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /tools. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /tools Create an HTTP tool definition. Use case: Use this to create a callable HTTP tool that agents can use during conversations. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"post-tools","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"name, description, api_url"},"api_method":{"type":"string","description":"api_method?: GET|POST|PUT|PATCH|DELETE"},"api_headers":{"type":"string","description":"api_headers?, api_body?, api_query_params?, api_path_params?"},"api_body[].path":{"type":"string","description":"api_body[].path?: where the value goes in the JSON body, e.g. cliente.nome or servicos[0].id (body only; letters, digits and _ $ @ : -, max 8 steps and 200 characters; empty means none)"},"A Static Value in api_body":{"type":"string","description":"A Static Value in api_body, api_query_params or api_path_params is stored encrypted; whoever can edit tools reads it back in clear. A value that starts with qvsec: is refused (400)"},"response_fields":{"type":"string","description":"response_fields?: the fields the agent reads from the reply, [{ name, path }], 0 to 20, null or empty for the whole reply. name: letters, digits and _ (up to 64), unique, not secret-like (token, password, webhook...); path: e.g. cliente.nome or servicos[*].id. The reply is cleaned before the fields are chosen. Returned on every Tool read"},"response_timeout_secs":{"type":"string","description":"response_timeout_secs?, dynamic_variables?"},"disable_interruptions":{"type":"string","description":"disable_interruptions?, force_pre_tool_speech?"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: Tool }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:create","x-atendia-ai-context":"POST /tools Create an HTTP tool definition. Use case: Use this to create a callable HTTP tool that agents can use during conversations. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to create a callable HTTP tool that agents can use during conversations.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/tools/{toolId}":{"patch":{"tags":["Tools"],"summary":"Update an HTTP tool definition.","description":"Selected endpoint: PATCH /tools/{toolId}.\n\nWhat it does: Update an HTTP tool definition.\n\nWhen to use it: Use this to update a tool's endpoint, headers, parameters, timeout, or behavior.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: tools:update.\n\nPath parameters: toolId: uuid.\n\nRequest body: Any create-tool field, at least one required; A field left out keeps its stored value: no defaults apply.\n\nResponse: 200 { success, message, data: Tool }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about PATCH /tools/{toolId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: PATCH /tools/{toolId} Update an HTTP tool definition. Use case: Use this to update a tool's endpoint, headers, parameters, timeout, or behavior. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"patch-tools-by-toolid","parameters":[{"name":"toolId","in":"path","required":true,"description":"toolId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"Any create-tool field":{"type":"string","description":"Any create-tool field, at least one required"},"A field left out keeps its stored value":{"type":"string","description":"A field left out keeps its stored value: no defaults apply"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: Tool }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:update","x-atendia-ai-context":"PATCH /tools/{toolId} Update an HTTP tool definition. Use case: Use this to update a tool's endpoint, headers, parameters, timeout, or behavior. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to update a tool's endpoint, headers, parameters, timeout, or behavior.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."},"delete":{"tags":["Tools"],"summary":"Delete an HTTP tool.","description":"Selected endpoint: DELETE /tools/{toolId}.\n\nWhat it does: Delete an HTTP tool.\n\nWhen to use it: Use this to remove a tool that should no longer be available.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: tools:delete.\n\nPath parameters: toolId: uuid.\n\nResponse: 200 { success, message, data: null }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /tools/{toolId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /tools/{toolId} Delete an HTTP tool. Use case: Use this to remove a tool that should no longer be available. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"delete-tools-by-toolid","parameters":[{"name":"toolId","in":"path","required":true,"description":"toolId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: null }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:delete","x-atendia-ai-context":"DELETE /tools/{toolId} Delete an HTTP tool. Use case: Use this to remove a tool that should no longer be available. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this to remove a tool that should no longer be available.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/tools/agent/{agentId}":{"get":{"tags":["Tools"],"summary":"List tools attached to an agent.","description":"Selected endpoint: GET /tools/agent/{agentId}.\n\nWhat it does: List tools attached to an agent.\n\nWhen to use it: Use this to show which tools are currently available to a specific agent.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: tools:read.\n\nPath parameters: agentId: uuid.\n\nResponse: 200 { success, message, data: Tool[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /tools/agent/{agentId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /tools/agent/{agentId} List tools attached to an agent. Use case: Use this to show which tools are currently available to a specific agent. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"get-tools-agent-by-agentid","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: Tool[] }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:read","x-atendia-ai-context":"GET /tools/agent/{agentId} List tools attached to an agent. Use case: Use this to show which tools are currently available to a specific agent. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to show which tools are currently available to a specific agent.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/tools/{toolId}/attach/{agentId}":{"post":{"tags":["Tools"],"summary":"Attach a tool to an agent.","description":"Selected endpoint: POST /tools/{toolId}/attach/{agentId}.\n\nWhat it does: Attach a tool to an agent.\n\nWhen to use it: Use this to enable one existing tool for one agent.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: tools:update.\n\nPath parameters: toolId: uuid; agentId: uuid.\n\nResponse: 200 { success, message, data: null }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /tools/{toolId}/attach/{agentId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /tools/{toolId}/attach/{agentId} Attach a tool to an agent. Use case: Use this to enable one existing tool for one agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"post-tools-by-toolid-attach-by-agentid","parameters":[{"name":"toolId","in":"path","required":true,"description":"toolId: uuid","schema":{"type":"string"}},{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: null }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:update","x-atendia-ai-context":"POST /tools/{toolId}/attach/{agentId} Attach a tool to an agent. Use case: Use this to enable one existing tool for one agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to enable one existing tool for one agent.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/tools/{toolId}/detach/{agentId}":{"delete":{"tags":["Tools"],"summary":"Detach a tool from an agent.","description":"Selected endpoint: DELETE /tools/{toolId}/detach/{agentId}.\n\nWhat it does: Detach a tool from an agent.\n\nWhen to use it: Use this to disable one tool for one agent without deleting the tool globally.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: tools:update.\n\nPath parameters: toolId: uuid; agentId: uuid.\n\nResponse: 200 { success, message, data: null }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /tools/{toolId}/detach/{agentId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /tools/{toolId}/detach/{agentId} Detach a tool from an agent. Use case: Use this to disable one tool for one agent without deleting the tool globally. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/tools/tool.route.ts.","operationId":"delete-tools-by-toolid-detach-by-agentid","parameters":[{"name":"toolId","in":"path","required":true,"description":"toolId: uuid","schema":{"type":"string"}},{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: null }"}},"x-atendia-source":"apps/server/src/modules/tools/tool.route.ts","x-atendia-permission":"tools:update","x-atendia-ai-context":"DELETE /tools/{toolId}/detach/{agentId} Detach a tool from an agent. Use case: Use this to disable one tool for one agent without deleting the tool globally. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this to disable one tool for one agent without deleting the tool globally.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/secrets":{"get":{"tags":["Secrets"],"summary":"List secret metadata. Secret values are redacted.","description":"Selected endpoint: GET /secrets.\n\nWhat it does: List secret metadata. Secret values are redacted.\n\nWhen to use it: Use this to list stored secret metadata while keeping secret values redacted.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session only.\n\nPermission: secrets:read.\n\nResponse: 200 { success, message, data: SecretMetadata[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /secrets. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /secrets List secret metadata. Secret values are redacted. Use case: Use this to list stored secret metadata while keeping secret values redacted. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/secrets/secret.route.ts.","operationId":"get-secrets","security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: SecretMetadata[] }"}},"x-atendia-source":"apps/server/src/modules/secrets/secret.route.ts","x-atendia-permission":"secrets:read","x-atendia-ai-context":"GET /secrets List secret metadata. Secret values are redacted. Use case: Use this to list stored secret metadata while keeping secret values redacted. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to list stored secret metadata while keeping secret values redacted.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"post":{"tags":["Secrets"],"summary":"Create a secret value.","description":"Selected endpoint: POST /secrets.\n\nWhat it does: Create a secret value.\n\nWhen to use it: Use this to store a secret value for tools, headers, webhooks, or integrations.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: secrets:create.\n\nRequest body: name: letters, numbers, dots, underscores, colons, hyphens; max 120; value: non-empty string.\n\nResponse: 201 { success, message, data: SecretMetadata }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /secrets. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /secrets Create a secret value. Use case: Use this to store a secret value for tools, headers, webhooks, or integrations. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/secrets/secret.route.ts.","operationId":"post-secrets","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"name: letters, numbers, dots, underscores, colons, hyphens; max 120"},"value":{"type":"string","description":"value: non-empty string"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: SecretMetadata }"}},"x-atendia-source":"apps/server/src/modules/secrets/secret.route.ts","x-atendia-permission":"secrets:create","x-atendia-ai-context":"POST /secrets Create a secret value. Use case: Use this to store a secret value for tools, headers, webhooks, or integrations. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to store a secret value for tools, headers, webhooks, or integrations.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/secrets/{secretId}":{"delete":{"tags":["Secrets"],"summary":"Delete a secret.","description":"Selected endpoint: DELETE /secrets/{secretId}.\n\nWhat it does: Delete a secret.\n\nWhen to use it: Use this to remove a rotated or unused secret.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: secrets:delete.\n\nPath parameters: secretId: uuid.\n\nResponse: 200 { success, message, data: null }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /secrets/{secretId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /secrets/{secretId} Delete a secret. Use case: Use this to remove a rotated or unused secret. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/secrets/secret.route.ts.","operationId":"delete-secrets-by-secretid","parameters":[{"name":"secretId","in":"path","required":true,"description":"secretId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: null }"}},"x-atendia-source":"apps/server/src/modules/secrets/secret.route.ts","x-atendia-permission":"secrets:delete","x-atendia-ai-context":"DELETE /secrets/{secretId} Delete a secret. Use case: Use this to remove a rotated or unused secret. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this to remove a rotated or unused secret.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/agents/{agentId}/widgets":{"get":{"tags":["Website widgets"],"summary":"List widgets for an agent.","description":"Selected endpoint: GET /agents/{agentId}/widgets.\n\nWhat it does: List widgets for an agent.\n\nWhen to use it: Use this to list website widgets configured for a specific agent.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: agentWidget:read.\n\nPath parameters: agentId: uuid.\n\nResponse: 200 { success, message, data: AgentWidget[] }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /agents/{agentId}/widgets. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /agents/{agentId}/widgets List widgets for an agent. Use case: Use this to list website widgets configured for a specific agent. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"get-agents-by-agentid-widgets","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: AgentWidget[] }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-permission":"agentWidget:read","x-atendia-ai-context":"GET /agents/{agentId}/widgets List widgets for an agent. Use case: Use this to list website widgets configured for a specific agent. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to list website widgets configured for a specific agent.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"post":{"tags":["Website widgets"],"summary":"Create a website widget for an agent.","description":"Selected endpoint: POST /agents/{agentId}/widgets.\n\nWhat it does: Create a website widget for an agent.\n\nWhen to use it: Use this to create an embeddable website voice widget for an agent.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: agentWidget:create.\n\nPath parameters: agentId: uuid.\n\nRequest body: name: 2-80 chars; enabled?: boolean; allowedOrigins?: string[] max 20; theme: widget theme object; consentRequired?: boolean; consentText?: string max 240.\n\nResponse: 201 { success, message, data: AgentWidget }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /agents/{agentId}/widgets. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /agents/{agentId}/widgets Create a website widget for an agent. Use case: Use this to create an embeddable website voice widget for an agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"post-agents-by-agentid-widgets","parameters":[{"name":"agentId","in":"path","required":true,"description":"agentId: uuid","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"name: 2-80 chars"},"enabled":{"type":"string","description":"enabled?: boolean"},"allowedOrigins":{"type":"string","description":"allowedOrigins?: string[] max 20"},"theme":{"type":"string","description":"theme: widget theme object"},"consentRequired":{"type":"string","description":"consentRequired?: boolean"},"consentText":{"type":"string","description":"consentText?: string max 240"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"201":{"description":"{ success, message, data: AgentWidget }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-permission":"agentWidget:create","x-atendia-ai-context":"POST /agents/{agentId}/widgets Create a website widget for an agent. Use case: Use this to create an embeddable website voice widget for an agent. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to create an embeddable website voice widget for an agent.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."}},"/widgets/{widgetId}":{"get":{"tags":["Website widgets"],"summary":"Read one widget configuration.","description":"Selected endpoint: GET /widgets/{widgetId}.\n\nWhat it does: Read one widget configuration.\n\nWhen to use it: Use this to read one widget's admin configuration.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: agentWidget:read.\n\nPath parameters: widgetId: string (wgt_ + 24 characters).\n\nResponse: 200 { success, message, data: AgentWidget }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /widgets/{widgetId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /widgets/{widgetId} Read one widget configuration. Use case: Use this to read one widget's admin configuration. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"get-widgets-by-widgetid","parameters":[{"name":"widgetId","in":"path","required":true,"description":"widgetId: string (wgt_ + 24 characters)","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: AgentWidget }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-permission":"agentWidget:read","x-atendia-ai-context":"GET /widgets/{widgetId} Read one widget configuration. Use case: Use this to read one widget's admin configuration. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this to read one widget's admin configuration.","x-atendia-side-effects":"Read-only; it should not change Atendia data."},"patch":{"tags":["Website widgets"],"summary":"Update one widget configuration.","description":"Selected endpoint: PATCH /widgets/{widgetId}.\n\nWhat it does: Update one widget configuration.\n\nWhen to use it: Use this to update widget theme, origin allowlist, consent text, or enabled state.\n\nSide effects and risk: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nAuthentication: Session only.\n\nPermission: agentWidget:update.\n\nPath parameters: widgetId: string (wgt_ + 24 characters).\n\nRequest body: Any create-widget field, at least one required.\n\nResponse: 200 { success, message, data: AgentWidget }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about PATCH /widgets/{widgetId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: PATCH /widgets/{widgetId} Update one widget configuration. Use case: Use this to update widget theme, origin allowlist, consent text, or enabled state. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"patch-widgets-by-widgetid","parameters":[{"name":"widgetId","in":"path","required":true,"description":"widgetId: string (wgt_ + 24 characters)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"Any create-widget field":{"type":"string","description":"Any create-widget field, at least one required"}}}}}},"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: AgentWidget }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-permission":"agentWidget:update","x-atendia-ai-context":"PATCH /widgets/{widgetId} Update one widget configuration. Use case: Use this to update widget theme, origin allowlist, consent text, or enabled state. Side effects: Writes or updates Atendia data; require appropriate authorization and user intent.","x-atendia-use-case":"Use this to update widget theme, origin allowlist, consent text, or enabled state.","x-atendia-side-effects":"Writes or updates Atendia data; require appropriate authorization and user intent."},"delete":{"tags":["Website widgets"],"summary":"Delete a website widget.","description":"Selected endpoint: DELETE /widgets/{widgetId}.\n\nWhat it does: Delete a website widget.\n\nWhen to use it: Use this to remove a website widget from service.\n\nSide effects and risk: Destructive; it removes or detaches data and should require user confirmation.\n\nAuthentication: Session only.\n\nPermission: agentWidget:delete.\n\nPath parameters: widgetId: string (wgt_ + 24 characters).\n\nResponse: 200 { success, message, data: null }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about DELETE /widgets/{widgetId}. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: DELETE /widgets/{widgetId} Delete a website widget. Use case: Use this to remove a website widget from service. Side effects: Destructive; it removes or detaches data and should require user confirmation.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"delete-widgets-by-widgetid","parameters":[{"name":"widgetId","in":"path","required":true,"description":"widgetId: string (wgt_ + 24 characters)","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"{ success, message, data: null }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-permission":"agentWidget:delete","x-atendia-ai-context":"DELETE /widgets/{widgetId} Delete a website widget. Use case: Use this to remove a website widget from service. Side effects: Destructive; it removes or detaches data and should require user confirmation.","x-atendia-use-case":"Use this to remove a website widget from service.","x-atendia-side-effects":"Destructive; it removes or detaches data and should require user confirmation."}},"/public/widgets/{widgetId}/config":{"get":{"tags":["Website widgets"],"summary":"Public config read used by the embeddable widget script.","description":"Selected endpoint: GET /public/widgets/{widgetId}/config.\n\nWhat it does: Public config read used by the embeddable widget script.\n\nWhen to use it: Use this from the embeddable browser widget to load safe public widget configuration.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Origin allowlist.\n\nPath parameters: widgetId: string (wgt_ + 24 characters).\n\nResponse: 200 { success, message, data: PublicWidgetConfig }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /public/widgets/{widgetId}/config. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /public/widgets/{widgetId}/config Public config read used by the embeddable widget script. Use case: Use this from the embeddable browser widget to load safe public widget configuration. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"get-public-widgets-by-widgetid-config","parameters":[{"name":"widgetId","in":"path","required":true,"description":"widgetId: string (wgt_ + 24 characters)","schema":{"type":"string"}}],"responses":{"200":{"description":"{ success, message, data: PublicWidgetConfig }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-ai-context":"GET /public/widgets/{widgetId}/config Public config read used by the embeddable widget script. Use case: Use this from the embeddable browser widget to load safe public widget configuration. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this from the embeddable browser widget to load safe public widget configuration.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/public/widgets/{widgetId}/sessions":{"post":{"tags":["Website widgets"],"summary":"Create a public voice-widget session.","description":"Selected endpoint: POST /public/widgets/{widgetId}/sessions.\n\nWhat it does: Create a public voice-widget session.\n\nWhen to use it: Use this from the embeddable browser widget to create a public voice session.\n\nSide effects and risk: Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it.\n\nAuthentication: Origin allowlist.\n\nPath parameters: widgetId: string (wgt_ + 24 characters).\n\nRequest body: visitorId?: string max 120; dynamicVariables?: Record<string, string>.\n\nResponse: 201 { success, message, data: PublicWidgetSession }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /public/widgets/{widgetId}/sessions. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /public/widgets/{widgetId}/sessions Create a public voice-widget session. Use case: Use this from the embeddable browser widget to create a public voice session. Side effects: Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"post-public-widgets-by-widgetid-sessions","parameters":[{"name":"widgetId","in":"path","required":true,"description":"widgetId: string (wgt_ + 24 characters)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"visitorId":{"type":"string","description":"visitorId?: string max 120"},"dynamicVariables":{"type":"string","description":"dynamicVariables?: Record<string, string>"}}}}}},"responses":{"201":{"description":"{ success, message, data: PublicWidgetSession }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-ai-context":"POST /public/widgets/{widgetId}/sessions Create a public voice-widget session. Use case: Use this from the embeddable browser widget to create a public voice session. Side effects: Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it.","x-atendia-use-case":"Use this from the embeddable browser widget to create a public voice session.","x-atendia-side-effects":"Creates a real-time call/session; it can consume minutes or contact a person, so confirm intent before using it."}},"/public/widgets/{widgetId}/sessions/{sessionId}/end":{"post":{"tags":["Website widgets"],"summary":"End a public widget session.","description":"Selected endpoint: POST /public/widgets/{widgetId}/sessions/{sessionId}/end.\n\nWhat it does: End a public widget session.\n\nWhen to use it: Use this from the embeddable browser widget to end a public session with its end token.\n\nSide effects and risk: Stops active or scheduled work; confirm before use.\n\nAuthentication: Origin allowlist + endToken.\n\nPath parameters: widgetId: string (wgt_ + 24 characters); sessionId: string (wgs_ + 24 characters).\n\nRequest body: endToken: string, 20-256 chars.\n\nResponse: 200 { success, message, data: PublicWidgetEndResult }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about POST /public/widgets/{widgetId}/sessions/{sessionId}/end. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: POST /public/widgets/{widgetId}/sessions/{sessionId}/end End a public widget session. Use case: Use this from the embeddable browser widget to end a public session with its end token. Side effects: Stops active or scheduled work; confirm before use.\n\nSource: apps/server/src/modules/widgets/widget.route.ts.","operationId":"post-public-widgets-by-widgetid-sessions-by-sessionid-end","parameters":[{"name":"widgetId","in":"path","required":true,"description":"widgetId: string (wgt_ + 24 characters)","schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"description":"sessionId: string (wgs_ + 24 characters)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"endToken":{"type":"string","description":"endToken: string, 20-256 chars"}}}}}},"responses":{"200":{"description":"{ success, message, data: PublicWidgetEndResult }"}},"x-atendia-source":"apps/server/src/modules/widgets/widget.route.ts","x-atendia-ai-context":"POST /public/widgets/{widgetId}/sessions/{sessionId}/end End a public widget session. Use case: Use this from the embeddable browser widget to end a public session with its end token. Side effects: Stops active or scheduled work; confirm before use.","x-atendia-use-case":"Use this from the embeddable browser widget to end a public session with its end token.","x-atendia-side-effects":"Stops active or scheduled work; confirm before use."}},"/billing/summary":{"get":{"tags":["Billing"],"summary":"Read the wallet: balance, reserved amounts, debt, saved card and automatic top-up.","description":"Selected endpoint: GET /billing/summary.\n\nWhat it does: Read the wallet: balance, reserved amounts, debt, saved card and automatic top-up.\n\nWhen to use it: Use this operation for the read the wallet: balance, reserved amounts, debt, saved card and automatic top-up.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: billing:read.\n\nResponse: 200 { success, message, data: { billingMode (hosted or self_hosted), currency, paidBalanceMicros, promotionalBalanceMicros, paidAvailableMicros, promotionalAvailableMicros, reservedPaidMicros, reservedPromotionalMicros, debtMicros, availableBalanceMicros, canManage, canManageBilling, paymentMethod (null, { id } or { id, type, brand, last4, expMonth, expYear }), autoRecharge { enabled, thresholdMicros, amountMicros, monthlyCapMicros, capReached (null or { capMicros, resetsAt }) } } }. Amounts are strings in micros (millionths of the currency unit).\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /billing/summary. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /billing/summary Read the wallet: balance, reserved amounts, debt, saved card and automatic top-up. Use case: Use this operation for the read the wallet: balance, reserved amounts, debt, saved card and automatic top-up. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/billing/billing.route.ts.","operationId":"get-billing-summary","security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: { billingMode (hosted or self_hosted), currency, paidBalanceMicros, promotionalBalanceMicros, paidAvailableMicros, promotionalAvailableMicros, reservedPaidMicros, reservedPromotionalMicros, debtMicros, availableBalanceMicros, canManage, canManageBilling, paymentMethod (null, { id } or { id, type, brand, last4, expMonth, expYear }), autoRecharge { enabled, thresholdMicros, amountMicros, monthlyCapMicros, capReached (null or { capMicros, resetsAt }) } } }. Amounts are strings in micros (millionths of the currency unit)"}},"x-atendia-source":"apps/server/src/modules/billing/billing.route.ts","x-atendia-permission":"billing:read","x-atendia-ai-context":"GET /billing/summary Read the wallet: balance, reserved amounts, debt, saved card and automatic top-up. Use case: Use this operation for the read the wallet: balance, reserved amounts, debt, saved card and automatic top-up. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this operation for the read the wallet: balance, reserved amounts, debt, saved card and automatic top-up.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/billing/history":{"get":{"tags":["Billing"],"summary":"List the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. Newest first.","description":"Selected endpoint: GET /billing/history.\n\nWhat it does: List the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. Newest first.\n\nWhen to use it: Use this operation for the list the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. newest first.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: billing:read.\n\nQuery parameters: limit?: 1-100, default 25; cursor?: the nextCursor of the previous page.\n\nResponse: 200 { success, message, data: [{ id, kind (call, top_up, number_purchase, number_renewal, refund, dispute, promotional_grant or adjustment), at, amountMicros (signed: in > 0, out < 0), currency, receiptUrl (top-ups only, otherwise null), and on call lines callId, durationSeconds, origin (inbound, outbound, widget, preview or null) }], nextCursor (null on the last page) }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /billing/history. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /billing/history List the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. Newest first. Use case: Use this operation for the list the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. newest first. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/billing/billing.route.ts.","operationId":"get-billing-history","parameters":[{"name":"limit","in":"query","required":false,"description":"limit?: 1-100, default 25","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"cursor?: the nextCursor of the previous page","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: [{ id, kind (call, top_up, number_purchase, number_renewal, refund, dispute, promotional_grant or adjustment), at, amountMicros (signed: in > 0, out < 0), currency, receiptUrl (top-ups only, otherwise null), and on call lines callId, durationSeconds, origin (inbound, outbound, widget, preview or null) }], nextCursor (null on the last page) }"}},"x-atendia-source":"apps/server/src/modules/billing/billing.route.ts","x-atendia-permission":"billing:read","x-atendia-ai-context":"GET /billing/history List the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. Newest first. Use case: Use this operation for the list the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. newest first. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this operation for the list the billing history a person recognises: one line per ended call with a charge, plus top-ups, number purchases and renewals, refunds, disputes, promotional credit and adjustments. newest first.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}},"/billing/transactions":{"get":{"tags":["Billing"],"summary":"List the raw wallet ledger rows, newest first.","description":"Selected endpoint: GET /billing/transactions.\n\nWhat it does: List the raw wallet ledger rows, newest first.\n\nWhen to use it: Use this operation for the list the raw wallet ledger rows, newest first.\n\nSide effects and risk: Read-only; it should not change Atendia data.\n\nAuthentication: Session or API key.\n\nPermission: billing:read.\n\nQuery parameters: limit?: 1-100, default 50; cursor?: the nextCursor of the previous page.\n\nResponse: 200 { success, message, data: [{ billingTransactionId, billingAccountId, organizationId, currency, type, idempotencyKey, grossAmountMicros, paidBalanceDeltaMicros, promotionalBalanceDeltaMicros, reservedPaidDeltaMicros, reservedPromotionalDeltaMicros, debtDeltaMicros, paidBalanceAfterMicros, promotionalBalanceAfterMicros, reservedPaidAfterMicros, reservedPromotionalAfterMicros, debtAfterMicros, referenceType, referenceId, description, metadata, createdAt }], nextCursor (null on the last page) }.\n\nAsk AI guidance: If the user asks \"what this API does\" while this operation is selected, answer only about GET /billing/transactions. Do not summarize the whole Atendia API catalog unless the user explicitly asks for the whole catalog.\n\nAI context: GET /billing/transactions List the raw wallet ledger rows, newest first. Use case: Use this operation for the list the raw wallet ledger rows, newest first. Side effects: Read-only; it should not change Atendia data.\n\nSource: apps/server/src/modules/billing/billing.route.ts.","operationId":"get-billing-transactions","parameters":[{"name":"limit","in":"query","required":false,"description":"limit?: 1-100, default 50","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"cursor?: the nextCursor of the previous page","schema":{"type":"string"}}],"security":[{"sessionCookie":[]},{"apiKey":[]}],"responses":{"200":{"description":"{ success, message, data: [{ billingTransactionId, billingAccountId, organizationId, currency, type, idempotencyKey, grossAmountMicros, paidBalanceDeltaMicros, promotionalBalanceDeltaMicros, reservedPaidDeltaMicros, reservedPromotionalDeltaMicros, debtDeltaMicros, paidBalanceAfterMicros, promotionalBalanceAfterMicros, reservedPaidAfterMicros, reservedPromotionalAfterMicros, debtAfterMicros, referenceType, referenceId, description, metadata, createdAt }], nextCursor (null on the last page) }"}},"x-atendia-source":"apps/server/src/modules/billing/billing.route.ts","x-atendia-permission":"billing:read","x-atendia-ai-context":"GET /billing/transactions List the raw wallet ledger rows, newest first. Use case: Use this operation for the list the raw wallet ledger rows, newest first. Side effects: Read-only; it should not change Atendia data.","x-atendia-use-case":"Use this operation for the list the raw wallet ledger rows, newest first.","x-atendia-side-effects":"Read-only; it should not change Atendia data."}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Better Auth session cookie from the console app. Browsers normally send it only when the docs and API share a compatible origin."},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization-scoped Atendia API key. Send the raw key in the x-api-key header."}}}}