diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 59bd996e5..bd24ed0fb 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -734,16 +734,966 @@ ] } }, - "/call/{id}": { + "/v2/call": { "get": { - "operationId": "CallController_findOne", - "summary": "Get Call", + "operationId": "CallController_findAllPaginated", + "summary": "List Calls", "parameters": [ + { + "name": "assistantId", + "required": false, + "in": "query", + "description": "This will return calls with the specified assistantId.", + "schema": { + "type": "string" + } + }, + { + "name": "assistantName", + "required": false, + "in": "query", + "description": "This will return calls where the transient assistant name exactly matches the specified value (case-insensitive).", + "schema": { + "maxLength": 40, + "type": "string" + } + }, { "name": "id", - "required": true, - "in": "path", + "required": false, + "in": "query", + "description": "This will return calls with the specified callId.", + "schema": { + "type": "string" + } + }, + { + "name": "idAny", + "required": false, + "in": "query", + "description": "This will return calls with the specified callIds.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "costLe", + "required": false, + "in": "query", + "description": "This will return calls where the cost is less than or equal to the specified value.", + "schema": { + "type": "number" + } + }, + { + "name": "costGe", + "required": false, + "in": "query", + "description": "This will return calls where the cost is greater than or equal to the specified value.", + "schema": { + "type": "number" + } + }, + { + "name": "cost", + "required": false, + "in": "query", + "description": "This will return calls with the exact specified cost.", + "schema": { + "type": "number" + } + }, + { + "name": "successEvaluation", + "required": false, + "in": "query", + "description": "This will return calls with the specified successEvaluation.", + "schema": { + "maxLength": 1000, + "type": "string" + } + }, + { + "name": "endedReason", + "required": false, + "in": "query", + "description": "This will return calls with the specified endedReason.", + "schema": { + "maxLength": 1000, + "type": "string" + } + }, + { + "required": false, + "description": "These are the options for the assistant's transcriber.", + "oneOf": [ + { + "$ref": "#/components/schemas/AssemblyAITranscriber", + "title": "AssemblyAITranscriber" + }, + { + "$ref": "#/components/schemas/AzureSpeechTranscriber", + "title": "AzureSpeechTranscriber" + }, + { + "$ref": "#/components/schemas/CustomTranscriber", + "title": "CustomTranscriber" + }, + { + "$ref": "#/components/schemas/DeepgramTranscriber", + "title": "DeepgramTranscriber" + }, + { + "$ref": "#/components/schemas/ElevenLabsTranscriber", + "title": "ElevenLabsTranscriber" + }, + { + "$ref": "#/components/schemas/GladiaTranscriber", + "title": "GladiaTranscriber" + }, + { + "$ref": "#/components/schemas/GoogleTranscriber", + "title": "GoogleTranscriber" + }, + { + "$ref": "#/components/schemas/SpeechmaticsTranscriber", + "title": "SpeechmaticsTranscriber" + }, + { + "$ref": "#/components/schemas/TalkscriberTranscriber", + "title": "TalkscriberTranscriber" + }, + { + "$ref": "#/components/schemas/OpenAITranscriber", + "title": "OpenAITranscriber" + }, + { + "$ref": "#/components/schemas/CartesiaTranscriber", + "title": "CartesiaTranscriber" + } + ], + "name": "transcriber", + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "These are the options for the assistant's LLM.", + "oneOf": [ + { + "$ref": "#/components/schemas/AnthropicModel", + "title": "Anthropic" + }, + { + "$ref": "#/components/schemas/AnyscaleModel", + "title": "Anyscale" + }, + { + "$ref": "#/components/schemas/CerebrasModel", + "title": "Cerebras" + }, + { + "$ref": "#/components/schemas/CustomLLMModel", + "title": "CustomLLM" + }, + { + "$ref": "#/components/schemas/DeepInfraModel", + "title": "DeepInfra" + }, + { + "$ref": "#/components/schemas/DeepSeekModel", + "title": "DeepSeek" + }, + { + "$ref": "#/components/schemas/GoogleModel", + "title": "Google" + }, + { + "$ref": "#/components/schemas/GroqModel", + "title": "Groq" + }, + { + "$ref": "#/components/schemas/InflectionAIModel", + "title": "InflectionAI" + }, + { + "$ref": "#/components/schemas/OpenAIModel", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/OpenRouterModel", + "title": "OpenRouter" + }, + { + "$ref": "#/components/schemas/PerplexityAIModel", + "title": "PerplexityAI" + }, + { + "$ref": "#/components/schemas/TogetherAIModel", + "title": "Together" + }, + { + "$ref": "#/components/schemas/XaiModel", + "title": "XAI" + } + ], + "name": "model", + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "These are the options for the assistant's voice.", + "oneOf": [ + { + "$ref": "#/components/schemas/AzureVoice", + "title": "AzureVoice" + }, + { + "$ref": "#/components/schemas/CartesiaVoice", + "title": "CartesiaVoice" + }, + { + "$ref": "#/components/schemas/CustomVoice", + "title": "CustomVoice" + }, + { + "$ref": "#/components/schemas/DeepgramVoice", + "title": "DeepgramVoice" + }, + { + "$ref": "#/components/schemas/ElevenLabsVoice", + "title": "ElevenLabsVoice" + }, + { + "$ref": "#/components/schemas/HumeVoice", + "title": "HumeVoice" + }, + { + "$ref": "#/components/schemas/LMNTVoice", + "title": "LMNTVoice" + }, + { + "$ref": "#/components/schemas/NeuphonicVoice", + "title": "NeuphonicVoice" + }, + { + "$ref": "#/components/schemas/OpenAIVoice", + "title": "OpenAIVoice" + }, + { + "$ref": "#/components/schemas/PlayHTVoice", + "title": "PlayHTVoice" + }, + { + "$ref": "#/components/schemas/RimeAIVoice", + "title": "RimeAIVoice" + }, + { + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAIVoice" + }, + { + "$ref": "#/components/schemas/TavusVoice", + "title": "TavusVoice" + }, + { + "$ref": "#/components/schemas/VapiVoice", + "title": "VapiVoice" + }, + { + "$ref": "#/components/schemas/SesameVoice", + "title": "SesameVoice" + }, + { + "$ref": "#/components/schemas/InworldVoice", + "title": "InworldVoice" + }, + { + "$ref": "#/components/schemas/MinimaxVoice", + "title": "MinimaxVoice" + } + ], + "name": "voice", + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", + "name": "firstMessage", + "in": "query", + "schema": { + "example": "Hello! How can I help you today?", + "type": "string" + } + }, + { + "required": false, + "name": "firstMessageInterruptionsEnabled", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "required": false, + "description": "This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).\n\n@default 'assistant-speaks-first'", + "name": "firstMessageMode", + "in": "query", + "schema": { + "example": "assistant-speaks-first", + "enum": [ + "assistant-speaks-first", + "assistant-speaks-first-with-model-generated-message", + "assistant-waits-for-user" + ], + "type": "string" + } + }, + { + "required": false, + "description": "These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nThis uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.\nYou can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.", + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", + "title": "Google" + }, + { + "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", + "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" + } + ], + "name": "voicemailDetection", + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.", + "name": "clientMessages", + "in": "query", + "schema": { + "example": [ + "conversation-update", + "function-call", + "hang", + "model-output", + "speech-update", + "status-update", + "transfer-update", + "transcript", + "tool-calls", + "user-interrupted", + "voice-input", + "workflow.node.started" + ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "conversation-update", + "function-call", + "function-call-result", + "hang", + "language-changed", + "metadata", + "model-output", + "speech-update", + "status-update", + "transcript", + "tool-calls", + "tool-calls-result", + "tool.completed", + "transfer-update", + "user-interrupted", + "voice-input", + "workflow.node.started" + ] + } + } + }, + { + "required": false, + "description": "These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.", + "name": "serverMessages", + "in": "query", + "schema": { + "example": [ + "conversation-update", + "end-of-call-report", + "function-call", + "hang", + "speech-update", + "status-update", + "tool-calls", + "transfer-destination-request", + "handoff-destination-request", + "user-interrupted" + ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "conversation-update", + "end-of-call-report", + "function-call", + "hang", + "language-changed", + "language-change-detected", + "model-output", + "phone-call-control", + "speech-update", + "status-update", + "transcript", + "transcript[transcriptType=\"final\"]", + "tool-calls", + "transfer-destination-request", + "handoff-destination-request", + "transfer-update", + "user-interrupted", + "voice-input", + "chat.created", + "chat.deleted", + "session.created", + "session.updated", + "session.deleted", + "call.deleted", + "call.delete.failed" + ] + } + } + }, + { + "required": false, + "description": "This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.\n\n@default 600 (10 minutes)", + "name": "maxDurationSeconds", + "in": "query", + "schema": { + "minimum": 10, + "maximum": 43200, + "example": 600, + "type": "number" + } + }, + { + "required": false, + "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + "oneOf": [ + { + "type": "enum", + "enum": [ + "off", + "office" + ], + "example": "office" + }, + { + "type": "string", + "format": "uri", + "example": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3" + } + ], + "name": "backgroundSound", + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\nDefault `false` while in beta.\n\n@default false", + "name": "modelOutputInMessagesEnabled", + "in": "query", + "schema": { + "example": false, + "type": "boolean" + } + }, + { + "required": false, + "description": "These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.", + "name": "transportConfigurations", + "in": "query", + "schema": { + "type": "array" + } + }, + { + "name": "observabilityPlan", + "required": false, + "description": "This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported.", + "oneOf": [ + { + "$ref": "#/components/schemas/LangfuseObservabilityPlan", + "title": "Langfuse" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/LangfuseObservabilityPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials.", + "name": "credentials", + "in": "query", + "schema": { + "type": "array" + } + }, + { + "required": false, + "description": "This is a set of actions that will be performed on certain events.", + "name": "hooks", + "in": "query", "schema": { + "type": "array" + } + }, + { + "required": false, + "description": "These are values that will be used to replace the template variables in the assistant messages and other text-based fields.\nThis uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html\n\nSo for example, `{{ name }}` will be replaced with the value of `name` in `variableValues`.\n`{{\"now\" | date: \"%b %d, %Y, %I:%M %p\", \"America/New_York\"}}` will be replaced with the current date and time in New York.\n Some VAPI reserved defaults:\n - *customer* - the customer object", + "name": "variableValues", + "in": "query", + "schema": { + "type": "object" + } + }, + { + "required": false, + "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call.", + "name": "name", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + "name": "voicemailMessage", + "in": "query", + "schema": { + "maxLength": 1000, + "type": "string" + } + }, + { + "required": false, + "description": "This is the message that the assistant will say if it ends the call.\n\nIf unspecified, it will hang up without saying anything.", + "name": "endCallMessage", + "in": "query", + "schema": { + "maxLength": 1000, + "type": "string" + } + }, + { + "required": false, + "description": "This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", + "name": "endCallPhrases", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string", + "maxLength": 140, + "minLength": 2 + } + } + }, + { + "name": "compliancePlan", + "required": false, + "in": "query", + "schema": { + "$ref": "#/components/schemas/CompliancePlan" + } + }, + { + "required": false, + "description": "This is for metadata you want to store on the assistant.", + "name": "metadata", + "in": "query", + "schema": { + "type": "object" + } + }, + { + "name": "backgroundSpeechDenoisingPlan", + "required": false, + "description": "This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", + "allOf": [ + { + "$ref": "#/components/schemas/BackgroundSpeechDenoisingPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "name": "analysisPlan", + "required": false, + "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", + "allOf": [ + { + "$ref": "#/components/schemas/AnalysisPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "name": "artifactPlan", + "required": false, + "description": "This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.", + "allOf": [ + { + "$ref": "#/components/schemas/ArtifactPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "name": "startSpeakingPlan", + "required": false, + "description": "This is the plan for when the assistant should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + "allOf": [ + { + "$ref": "#/components/schemas/StartSpeakingPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "name": "stopSpeakingPlan", + "required": false, + "description": "This is the plan for when assistant should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + "allOf": [ + { + "$ref": "#/components/schemas/StopSpeakingPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "name": "monitorPlan", + "required": false, + "description": "This is the plan for real-time monitoring of the assistant's calls.\n\nUsage:\n- To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/MonitorPlan" + } + ], + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + "name": "credentialIds", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "server", + "required": false, + "description": "This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.\n\nThe order of precedence is:\n\n1. assistant.server.url\n2. phoneNumber.serverUrl\n3. org.serverUrl", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ], + "in": "query", + "schema": {} + }, + { + "name": "keypadInputPlan", + "required": false, + "in": "query", + "schema": { + "$ref": "#/components/schemas/KeypadInputPlan" + } + }, + { + "name": "phoneNumberId", + "required": false, + "in": "query", + "description": "This will return calls with the specified phoneNumberId.", + "schema": { + "type": "string" + } + }, + { + "required": false, + "description": "This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + "name": "numberE164CheckEnabled", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "required": false, + "description": "This is the extension that will be dialed after the call is answered.", + "name": "extension", + "in": "query", + "schema": { + "maxLength": 10, + "example": null, + "type": "string" + } + }, + { + "name": "assistantOverrides", + "required": false, + "description": "These are the overrides for the assistant's settings and template variables specific to this customer.\nThis allows customization of the assistant's behavior for individual customers in batch calls.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ], + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "This is the number of the customer.", + "name": "number", + "in": "query", + "schema": { + "minLength": 3, + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the SIP URI of the customer.", + "name": "sipUri", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "required": false, + "description": "This is the name of the customer. This is just for your own reference.\n\nFor SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" `.", + "name": "name", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the email of the customer.", + "name": "email", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the external ID of the customer.", + "name": "externalId", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "Filter calls by structured output values. Use structured output ID as key and filter operators as values.", + "name": "structuredOutputs", + "in": "query", + "schema": { + "additionalProperties": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal to" + }, + "neq": { + "type": "string", + "description": "Not equal to" + }, + "gt": { + "type": "string", + "description": "Greater than" + }, + "gte": { + "type": "string", + "description": "Greater than or equal to" + }, + "lt": { + "type": "string", + "description": "Less than" + }, + "lte": { + "type": "string", + "description": "Less than or equal to" + }, + "contains": { + "type": "string", + "description": "Contains" + }, + "notContains": { + "type": "string", + "description": "Not contains" + } + } + }, + "example": { + "c9dddda4-d70a-4dad-aa5c-aaf117f85cea": { + "eq": "2", + "gt": "1" + } + }, + "type": "object" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", "type": "string" } } @@ -754,7 +1704,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Call" + "$ref": "#/components/schemas/CallPaginatedResponse" } } } @@ -768,10 +1718,12 @@ "bearer": [] } ] - }, - "patch": { - "operationId": "CallController_update", - "summary": "Update Call", + } + }, + "/call/{id}": { + "get": { + "operationId": "CallController_findOne", + "summary": "Get Call", "parameters": [ { "name": "id", @@ -782,16 +1734,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateCallDTO" - } - } - } - }, "responses": { "200": { "description": "", @@ -813,9 +1755,9 @@ } ] }, - "delete": { - "operationId": "CallController_deleteCallData", - "summary": "Delete Call Data", + "patch": { + "operationId": "CallController_update", + "summary": "Update Call", "parameters": [ { "name": "id", @@ -826,6 +1768,51 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCallDTO" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Call" + } + } + } + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "CallController_deleteCallData", + "summary": "Delete Call Data", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCallDTO" + } + } + } + }, "responses": { "200": { "description": "", @@ -2103,6 +3090,158 @@ ] } }, + "/v2/phone-number": { + "get": { + "operationId": "PhoneNumberController_findAllPaginated", + "summary": "List Phone Numbers", + "parameters": [ + { + "name": "search", + "required": false, + "in": "query", + "description": "This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive).", + "schema": { + "maxLength": 100, + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneNumberPaginatedResponse" + } + } + } + } + }, + "tags": [ + "Phone Numbers" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/phone-number/{id}": { "get": { "operationId": "PhoneNumberController_findOne", @@ -5030,7 +6169,7 @@ }, "wordFinalizationMaxWaitTime": { "type": "number", - "description": "This is the maximum wait time for word finalization in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", + "deprecated": true, "minimum": 0, "example": 160 }, @@ -5052,6 +6191,14 @@ "maxLength": 2500 } }, + "keytermsPrompt": { + "description": "Keyterms prompting improves recognition accuracy for specific words and phrases.\nCan include up to 100 keyterms, each up to 50 characters.\nCosts an additional $0.04/hour when enabled.", + "type": "array", + "items": { + "type": "string", + "maxLength": 50 + } + }, "endUtteranceSilenceThreshold": { "type": "number", "description": "The duration of the end utterance silence threshold in milliseconds." @@ -5551,7 +6698,7 @@ }, "headers": { "type": "object", - "description": "These are the headers to include in the request.\n\nEach key-value pair represents a header name and its value." + "description": "These are the headers to include in the request.\n\nEach key-value pair represents a header name and its value.\n\nNote: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios." }, "backoffPlan": { "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", @@ -5760,7 +6907,7 @@ "maximum": 1, "example": 0.4 }, - "preflightThreshold": { + "eagerEotThreshold": { "type": "number", "example": 0.3 }, @@ -5770,7 +6917,7 @@ }, "eotTimeoutMs": { "type": "number", - "example": 3000 + "example": 5000 }, "keywords": { "description": "These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here.", @@ -6377,6 +7524,30 @@ "provider" ] }, + "SpeechmaticsCustomVocabularyItem": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The word or phrase to add to the custom vocabulary.", + "minLength": 1, + "example": "Speechmatics" + }, + "soundsLike": { + "description": "Alternative phonetic representations of how the word might sound. This helps recognition when the word might be pronounced differently.", + "example": [ + "speech mattix" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "content" + ] + }, "SpeechmaticsTranscriber": { "type": "object", "properties": { @@ -6455,6 +7626,118 @@ "cy" ] }, + "operatingPoint": { + "type": "string", + "description": "This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical.\n\n@default 'enhanced'", + "example": "enhanced", + "enum": [ + "standard", + "enhanced" + ], + "default": "enhanced" + }, + "region": { + "type": "string", + "description": "This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance.\n\n@default 'eu'", + "example": "us", + "enum": [ + "eu", + "us" + ], + "default": "eu" + }, + "enableDiarization": { + "type": "boolean", + "description": "This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls.\n\n@default false", + "example": true, + "default": false + }, + "maxSpeakers": { + "type": "number", + "description": "This sets the maximum number of speakers to detect when diarization is enabled. Only used when enableDiarization is true.\n\n@default 2", + "example": 4, + "minimum": 2, + "maximum": 50, + "default": 2 + }, + "enablePartials": { + "type": "boolean", + "description": "This enables partial transcripts during speech recognition. When false, only final transcripts are returned.\n\n@default true", + "example": false, + "default": true + }, + "maxDelay": { + "type": "number", + "description": "This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy.\n\n@default 3000", + "example": 1500, + "minimum": 500, + "maximum": 10000, + "default": 3000 + }, + "customVocabulary": { + "example": [ + { + "content": "Speechmatics", + "soundsLike": [ + "speech mattix" + ] + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SpeechmaticsCustomVocabularyItem" + } + }, + "numeralStyle": { + "type": "string", + "description": "This controls how numbers are formatted in the transcription output.\n\n@default 'written'", + "example": "spoken", + "enum": [ + "written", + "spoken" + ], + "default": "written" + }, + "enableEntities": { + "type": "boolean", + "description": "This enables detection of non-speech audio events like music, applause, and laughter.\n\n@default false", + "example": true, + "default": false + }, + "enablePunctuation": { + "type": "boolean", + "description": "This enables automatic punctuation in the transcription output.\n\n@default true", + "example": false, + "default": true + }, + "enableCapitalization": { + "type": "boolean", + "description": "This enables automatic capitalization in the transcription output.\n\n@default true", + "example": false, + "default": true + }, + "endOfTurnSensitivity": { + "type": "number", + "description": "This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive.\n\n@default 0.5", + "example": 0.8, + "minimum": 0, + "maximum": 1, + "default": 0.5 + }, + "removeDisfluencies": { + "type": "boolean", + "description": "This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output.\n\n@default false", + "example": true, + "default": false + }, + "minimumSpeechDuration": { + "type": "number", + "description": "This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy.\n\n@default 0.0", + "example": 0.2, + "minimum": 0, + "maximum": 5, + "default": 0 + }, "fallbackPlan": { "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", "allOf": [ @@ -6465,7 +7748,8 @@ } }, "required": [ - "provider" + "provider", + "customVocabulary" ] }, "TalkscriberTranscriber": { @@ -6831,7 +8115,7 @@ }, "wordFinalizationMaxWaitTime": { "type": "number", - "description": "This is the maximum wait time for word finalization in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", + "deprecated": true, "minimum": 0, "example": 160 }, @@ -6853,6 +8137,14 @@ "maxLength": 2500 } }, + "keytermsPrompt": { + "description": "Keyterms prompting improves recognition accuracy for specific words and phrases.\nCan include up to 100 keyterms, each up to 50 characters.\nCosts an additional $0.04/hour when enabled.", + "type": "array", + "items": { + "type": "string", + "maxLength": 50 + } + }, "endUtteranceSilenceThreshold": { "type": "number", "description": "The duration of the end utterance silence threshold in milliseconds." @@ -7450,7 +8742,7 @@ "maximum": 1, "example": 0.4 }, - "preflightThreshold": { + "eagerEotThreshold": { "type": "number", "example": 0.3 }, @@ -7460,7 +8752,7 @@ }, "eotTimeoutMs": { "type": "number", - "example": 3000 + "example": 5000 }, "keywords": { "description": "These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here.", @@ -8120,10 +9412,123 @@ "vi", "cy" ] + }, + "operatingPoint": { + "type": "string", + "description": "This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical.\n\n@default 'enhanced'", + "example": "enhanced", + "enum": [ + "standard", + "enhanced" + ], + "default": "enhanced" + }, + "region": { + "type": "string", + "description": "This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance.\n\n@default 'eu'", + "example": "us", + "enum": [ + "eu", + "us" + ], + "default": "eu" + }, + "enableDiarization": { + "type": "boolean", + "description": "This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls.\n\n@default false", + "example": true, + "default": false + }, + "maxSpeakers": { + "type": "number", + "description": "This sets the maximum number of speakers to detect when diarization is enabled. Only used when enableDiarization is true.\n\n@default 2", + "example": 4, + "minimum": 2, + "maximum": 50, + "default": 2 + }, + "enablePartials": { + "type": "boolean", + "description": "This enables partial transcripts during speech recognition. When false, only final transcripts are returned.\n\n@default true", + "example": false, + "default": true + }, + "maxDelay": { + "type": "number", + "description": "This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy.\n\n@default 3000", + "example": 1500, + "minimum": 500, + "maximum": 10000, + "default": 3000 + }, + "customVocabulary": { + "example": [ + { + "content": "Speechmatics", + "soundsLike": [ + "speech mattix" + ] + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SpeechmaticsCustomVocabularyItem" + } + }, + "numeralStyle": { + "type": "string", + "description": "This controls how numbers are formatted in the transcription output.\n\n@default 'written'", + "example": "spoken", + "enum": [ + "written", + "spoken" + ], + "default": "written" + }, + "enableEntities": { + "type": "boolean", + "description": "This enables detection of non-speech audio events like music, applause, and laughter.\n\n@default false", + "example": true, + "default": false + }, + "enablePunctuation": { + "type": "boolean", + "description": "This enables automatic punctuation in the transcription output.\n\n@default true", + "example": false, + "default": true + }, + "enableCapitalization": { + "type": "boolean", + "description": "This enables automatic capitalization in the transcription output.\n\n@default true", + "example": false, + "default": true + }, + "endOfTurnSensitivity": { + "type": "number", + "description": "This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive.\n\n@default 0.5", + "example": 0.8, + "minimum": 0, + "maximum": 1, + "default": 0.5 + }, + "removeDisfluencies": { + "type": "boolean", + "description": "This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output.\n\n@default false", + "example": true, + "default": false + }, + "minimumSpeechDuration": { + "type": "number", + "description": "This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy.\n\n@default 0.0", + "example": 0.2, + "minimum": 0, + "maximum": 5, + "default": 0 } }, "required": [ - "provider" + "provider", + "customVocabulary" ] }, "FallbackTalkscriberTranscriber": { @@ -9171,6 +10576,12 @@ "voicemail" ] }, + "beepDetectionEnabled": { + "type": "boolean", + "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + "default": false, + "example": false + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -9299,8 +10710,7 @@ }, "description": { "type": "string", - "description": "This is the description of what the function does, used by the AI to choose when and how to call the function.", - "maxLength": 1000 + "description": "This is the description of what the function does, used by the AI to choose when and how to call the function." }, "parameters": { "description": "These are the parameters the functions accepts, described as a JSON Schema object.\n\nSee the [OpenAI guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format.\n\nOmitting parameters defines a function with an empty parameter list.", @@ -11200,7 +12610,8 @@ "claude-3-5-haiku-20241022", "claude-3-7-sonnet-20250219", "claude-opus-4-20250514", - "claude-sonnet-4-20250514" + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929" ] }, "provider": { @@ -11544,6 +12955,10 @@ "type": "string", "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1" }, + "wordLevelConfidenceEnabled": { + "type": "boolean", + "description": "This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.\nThis only works for Deepgram transcribers." + }, "timeoutSeconds": { "type": "number", "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", @@ -13553,7 +14968,8 @@ "claude-3-5-haiku-20241022", "claude-3-7-sonnet-20250219", "claude-opus-4-20250514", - "claude-sonnet-4-20250514" + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929" ] }, "thinking": { @@ -14366,16 +15782,16 @@ "to" ] }, - "RecordingConsentHangUpToDeclinePlan": { + "RecordingConsentPlanStayOnLine": { "type": "object", "properties": { "message": { "type": "string", - "description": "This is the message asking for consent to record the call.", + "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", "maxLength": 1000, "examples": [ "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - "This call may be recorded for quality and training purposes. Do you consent to being recorded?" + "This call may be recorded for quality and training purposes. Say \"I agree\" if you consent to being recorded, or \"I disagree\" if you do not consent." ] }, "voice": { @@ -14453,19 +15869,19 @@ }, "type": { "type": "string", - "description": "This is the type of recording consent plan.", + "description": "This is the type of recording consent plan. This type assumes consent is granted if the user stays on the line.", "enum": [ - "hang-up-to-decline" + "stay-on-line" ], - "example": "hang-up-to-decline" + "example": "stay-on-line" }, "waitSeconds": { "type": "number", "description": "Number of seconds to wait before transferring to the assistant if user stays on the call", "minimum": 1, - "maximum": 5, - "default": 2, - "example": 2 + "maximum": 6, + "default": 3, + "example": 3 } }, "required": [ @@ -14473,16 +15889,16 @@ "type" ] }, - "RecordingConsentVerbalPlan": { + "RecordingConsentPlanVerbal": { "type": "object", "properties": { "message": { "type": "string", - "description": "This is the message asking for consent to record the call.", + "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", "maxLength": 1000, "examples": [ "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - "This call may be recorded for quality and training purposes. Do you consent to being recorded?" + "This call may be recorded for quality and training purposes. Say \"I agree\" if you consent to being recorded, or \"I disagree\" if you do not consent." ] }, "voice": { @@ -14560,7 +15976,7 @@ }, "type": { "type": "string", - "description": "This is the type of recording consent plan.", + "description": "This is the type of recording consent plan. This type assumes consent is granted if the user verbally consents or declines.", "enum": [ "verbal" ], @@ -14569,12 +15985,15 @@ "declineTool": { "type": "object", "description": "Tool to execute if user verbally declines recording consent" + }, + "declineToolId": { + "type": "string", + "description": "ID of existing tool to execute if user verbally declines recording consent" } }, "required": [ "message", - "type", - "declineTool" + "type" ] }, "SecurityFilterBase": { @@ -14642,19 +16061,19 @@ "recordingConsentPlan": { "oneOf": [ { - "$ref": "#/components/schemas/RecordingConsentHangUpToDeclinePlan", - "title": "RecordingConsentHangUpToDeclinePlan" + "$ref": "#/components/schemas/RecordingConsentPlanStayOnLine", + "title": "RecordingConsentStayOnLinePlan" }, { - "$ref": "#/components/schemas/RecordingConsentVerbalPlan", - "title": "RecordingConsentVerbalPlan" + "$ref": "#/components/schemas/RecordingConsentPlanVerbal", + "title": "RecordingConsentPlanVerbal" } ], "discriminator": { "propertyName": "type", "mapping": { - "hang-up-to-decline": "#/components/schemas/RecordingConsentHangUpToDeclinePlan", - "verbal": "#/components/schemas/RecordingConsentVerbalPlan" + "stay-on-line": "#/components/schemas/RecordingConsentPlanStayOnLine", + "verbal": "#/components/schemas/RecordingConsentPlanVerbal" } } } @@ -14839,6 +16258,11 @@ "description": "This determines whether the video is recorded during the call. Defaults to false. Only relevant for `webCall` type.\n\nYou can find the video recording at `call.artifact.videoRecordingUrl` after the call is ended.\n\n@default false", "example": false }, + "fullMessageHistoryEnabled": { + "type": "boolean", + "description": "This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.", + "example": false + }, "pcapEnabled": { "type": "boolean", "description": "This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.\n\nYou can find the packet capture at `call.artifact.pcapUrl` after the call is ended.\n\n@default true", @@ -23323,7 +24747,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ], "example": [ "conversation-update", @@ -23363,7 +24789,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ] } }, @@ -24120,7 +25548,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ], "example": [ "conversation-update", @@ -24160,7 +25590,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ] } }, @@ -25007,7 +26439,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ], "example": [ "conversation-update", @@ -25047,7 +26481,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ] } }, @@ -25804,7 +27240,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ], "example": [ "conversation-update", @@ -25844,7 +27282,9 @@ "chat.deleted", "session.created", "session.updated", - "session.deleted" + "session.deleted", + "call.deleted", + "call.delete.failed" ] } }, @@ -28674,20 +30114,14 @@ "type": "object", "description": "This is the type of recording consent." }, - "granted": { - "type": "boolean", - "description": "This is whether the user granted recording consent." - }, "grantedAt": { "format": "date-time", "type": "string", - "description": "This is the date and time the recording consent was granted." + "description": "This is the date and time the recording consent was granted.\nIf not specified, it means the recording consent was not granted." } }, "required": [ - "type", - "granted", - "grantedAt" + "type" ] }, "Compliance": { @@ -29143,7 +30577,9 @@ "ringing", "in-progress", "forwarding", - "ended" + "ended", + "not-found", + "deletion-failed" ] }, "endedReason": { @@ -29173,6 +30609,7 @@ "call.start.error-subscription-insufficient-credits", "call.start.error-subscription-upgrade-failed", "call.start.error-subscription-concurrency-limit-reached", + "call.start.error-enterprise-feature-not-available-recording-consent", "assistant-not-valid", "database-error", "assistant-not-found", @@ -29673,7 +31110,8 @@ "twilio-failed-to-connect-call", "twilio-reported-customer-misdialed", "vonage-rejected", - "voicemail" + "voicemail", + "call-deleted" ] }, "destination": { @@ -30212,6 +31650,18 @@ } } }, + "DeleteCallDTO": { + "type": "object", + "properties": { + "ids": { + "description": "These are the Call IDs to be bulk deleted.\nIf provided, the call ID if any in the request query will be ignored\nWhen requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings.\nIt may take up to a few hours to complete the bulk delete, and will be asynchronous.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, "DeveloperMessage": { "type": "object", "properties": { @@ -30311,6 +31761,10 @@ "originalMessage": { "type": "string", "description": "The original message before filtering (only included if content was filtered)." + }, + "metadata": { + "type": "object", + "description": "The metadata associated with the message. Currently used to store the transcriber's word level confidence." } }, "required": [ @@ -31182,6 +32636,11 @@ "type": "boolean", "description": "This is a flag that determines whether the response should be streamed.\nWhen true, the response will be sent as chunks of text.", "default": false + }, + "sessionEnd": { + "type": "boolean", + "description": "This is a flag to indicate end of session. When true, the session will be marked as completed and the chat will be ended.\nUsed to end session to send End-of-session report to the customer.\nWhen flag is set to true, any messages sent will not be processed and session will directly be marked as completed.", + "default": false } }, "required": [ @@ -31311,6 +32770,11 @@ "type": "boolean", "description": "Whether to stream the response or not.", "default": true + }, + "sessionEnd": { + "type": "boolean", + "description": "This is a flag to indicate end of session. When true, the session will be marked as completed and the chat will be ended.\nUsed to end session to send End-of-session report to the customer.\nWhen flag is set to true, any messages sent will not be processed and session will directly be marked as completed.", + "default": false } }, "required": [ @@ -31904,6 +33368,14 @@ "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" } ] + }, + "artifact": { + "description": "These are the artifacts that were extracted from the session messages.\nThey are only available after the session has completed.\nThe artifact plan from the assistant or active assistant of squad is used to generate the artifact.\nCurrently the only supported fields of assistant artifact plan are:\n- structuredOutputIds", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] } }, "required": [ @@ -33762,8 +35234,7 @@ }, "description": { "type": "string", - "description": "This is the description of the tool. This will be passed to the model.", - "maxLength": 1000 + "description": "This is the description of the tool. This will be passed to the model." }, "url": { "type": "string", @@ -35565,8 +37036,7 @@ }, "description": { "type": "string", - "description": "This is the description of the tool. This will be passed to the model.", - "maxLength": 1000 + "description": "This is the description of the tool. This will be passed to the model." }, "url": { "type": "string", @@ -36008,8 +37478,7 @@ }, "description": { "type": "string", - "description": "This is the description of the tool. This will be passed to the model.", - "maxLength": 1000 + "description": "This is the description of the tool. This will be passed to the model." }, "url": { "type": "string", @@ -39008,7 +40477,8 @@ "claude-3-5-haiku-20241022", "claude-3-7-sonnet-20250219", "claude-opus-4-20250514", - "claude-sonnet-4-20250514" + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929" ] }, "thinking": { @@ -47707,6 +49177,142 @@ "session" ] }, + "ClientMessageCallDeleted": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", + "enum": [ + "call.deleted" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + } + }, + "required": [ + "type" + ] + }, + "ClientMessageCallDeleteFailed": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", + "enum": [ + "call.delete.failed" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + } + }, + "required": [ + "type" + ] + }, "ClientMessage": { "type": "object", "properties": { @@ -47784,6 +49390,14 @@ { "$ref": "#/components/schemas/ClientMessageSessionDeleted", "title": "SessionDeleted" + }, + { + "$ref": "#/components/schemas/ClientMessageCallDeleted", + "title": "CallDeleted" + }, + { + "$ref": "#/components/schemas/ClientMessageCallDeleteFailed", + "title": "CallDeleteFailed" } ] } @@ -48058,6 +49672,7 @@ "call.start.error-subscription-insufficient-credits", "call.start.error-subscription-upgrade-failed", "call.start.error-subscription-concurrency-limit-reached", + "call.start.error-enterprise-feature-not-available-recording-consent", "assistant-not-valid", "database-error", "assistant-not-found", @@ -48558,7 +50173,8 @@ "twilio-failed-to-connect-call", "twilio-reported-customer-misdialed", "vonage-rejected", - "voicemail" + "voicemail", + "call-deleted" ] }, "cost": { @@ -48683,6 +50299,95 @@ "analysis" ] }, + "ServerMessageHandoffDestinationRequest": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"handoff-destination-request\" is sent when the model is requesting handoff but destination is unknown.", + "enum": [ + "handoff-destination-request" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "artifact": { + "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "chat": { + "description": "This is the chat object.", + "allOf": [ + { + "$ref": "#/components/schemas/Chat" + } + ] + }, + "parameters": { + "type": "object", + "description": "This is the parameters of the handoff destination request." + } + }, + "required": [ + "type", + "parameters" + ] + }, "ServerMessageHang": { "type": "object", "properties": { @@ -49232,7 +50937,9 @@ "ringing", "in-progress", "forwarding", - "ended" + "ended", + "not-found", + "deletion-failed" ] }, "endedReason": { @@ -49262,6 +50969,7 @@ "call.start.error-subscription-insufficient-credits", "call.start.error-subscription-upgrade-failed", "call.start.error-subscription-concurrency-limit-reached", + "call.start.error-enterprise-feature-not-available-recording-consent", "assistant-not-valid", "database-error", "assistant-not-found", @@ -49762,7 +51470,8 @@ "twilio-failed-to-connect-call", "twilio-reported-customer-misdialed", "vonage-rejected", - "voicemail" + "voicemail", + "call-deleted" ] }, "messages": { @@ -51260,6 +52969,174 @@ "session" ] }, + "ServerMessageCallDeleted": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", + "enum": [ + "call.deleted" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "artifact": { + "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "chat": { + "description": "This is the chat object.", + "allOf": [ + { + "$ref": "#/components/schemas/Chat" + } + ] + } + }, + "required": [ + "type" + ] + }, + "ServerMessageCallDeleteFailed": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", + "enum": [ + "call.delete.failed" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "artifact": { + "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "chat": { + "description": "This is the chat object.", + "allOf": [ + { + "$ref": "#/components/schemas/Chat" + } + ] + } + }, + "required": [ + "type" + ] + }, "ServerMessage": { "type": "object", "properties": { @@ -51278,6 +53155,10 @@ "$ref": "#/components/schemas/ServerMessageEndOfCallReport", "title": "EndOfCallReport" }, + { + "$ref": "#/components/schemas/ServerMessageHandoffDestinationRequest", + "title": "HandoffDestinationRequest" + }, { "$ref": "#/components/schemas/ServerMessageHang", "title": "Hang" @@ -51357,6 +53238,14 @@ { "$ref": "#/components/schemas/ServerMessageSessionDeleted", "title": "SessionDeleted" + }, + { + "$ref": "#/components/schemas/ServerMessageCallDeleted", + "title": "CallDeleted" + }, + { + "$ref": "#/components/schemas/ServerMessageCallDeleteFailed", + "title": "CallDeleteFailed" } ] } @@ -51867,6 +53756,10 @@ "duration": { "type": "number", "description": "The duration of the message in seconds." + }, + "speakerLabel": { + "type": "string", + "description": "Stable speaker label for diarized user speakers (e.g., \"Speaker 1\")." } }, "required": [