{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://api-evangelist.com/schemas/vapi/vapi-call-schema.json", "title": "Vapi Call", "description": "JSON Schema for the Vapi Call resource as returned by the Vapi API.", "type": "object", "properties": { "type": { "type": "string", "description": "This is the type of call.", "enum": [ "inboundPhoneCall", "outboundPhoneCall", "webCall", "vapi.websocketCall" ] }, "costs": { "type": "array", "description": "These are the costs of individual components of the call in USD.", "items": {} }, "messages": { "type": "array", "items": {} }, "phoneCallProvider": { "type": "string", "description": "This is the provider of the call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", "enum": [ "twilio", "vonage", "vapi", "telnyx" ] }, "phoneCallTransport": { "type": "string", "description": "This is the transport of the phone call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", "enum": [ "sip", "pstn" ] }, "status": { "type": "string", "description": "This is the status of the call.", "enum": [ "scheduled", "queued", "ringing", "in-progress", "forwarding", "ended", "not-found", "deletion-failed" ] }, "endedReason": { "type": "string", "description": "This is the explanation for how the call ended.", "enum": [ "call-start-error-neither-assistant-nor-server-set", "assistant-request-failed", "assistant-request-returned-error", "assistant-request-returned-unspeakable-error", "assistant-request-returned-invalid-assistant", "assistant-request-returned-no-assistant", "assistant-request-returned-forwarding-phone-number", "scheduled-call-deleted", "call.start.error-vapifault-get-org", "call.start.error-vapifault-get-subscription" ] }, "endedMessage": { "type": "string", "description": "This is the message that adds more context to the ended reason. It can be used to provide potential error messages or warnings." }, "destination": { "description": "This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty.", "oneOf": [ { "type": "object", "properties": { "message": { "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially use" }, "type": { "type": "string", "enum": [ "number" ] }, "numberE164CheckEnabled": { "type": "boolean", "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 yo" }, "number": { "type": "string", "description": "This is the phone number to transfer the call to." }, "extension": { "type": "string", "description": "This is the extension to dial after transferring the call to the `number`." }, "callerId": { "type": "string", "description": "This is the caller ID to use when transferring the call to the `number`.\n\nUsage:\n- If not provided, the caller ID will be the number the call is coming **from**.\n Example: a customer with number +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +1415111" }, "transferPlan": { "description": "This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`" }, "description": { "type": "string", "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ "type", "number" ] }, { "type": "object", "properties": { "message": { "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially use" }, "type": { "type": "string", "enum": [ "sip" ] }, "sipUri": { "type": "string", "description": "This is the SIP URI to transfer the call to." }, "callerId": { "type": "string", "description": "This is the caller ID to use when transferring the call to the `sipUri`.\n\nUsage:\n- If not provided, the caller ID will be determined by the SIP infrastructure.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the pho" }, "transferPlan": { "description": "This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`" }, "sipHeaders": { "type": "object", "description": "These are custom headers to be added to SIP refer during transfer call." }, "description": { "type": "string", "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ "type", "sipUri" ] } ] }, "id": { "type": "string", "description": "This is the unique identifier for the call." }, "orgId": { "type": "string", "description": "This is the unique identifier for the org that this call belongs to." }, "createdAt": { "type": "string", "description": "This is the ISO 8601 date-time string of when the call was created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "This is the ISO 8601 date-time string of when the call was last updated.", "format": "date-time" }, "startedAt": { "type": "string", "description": "This is the ISO 8601 date-time string of when the call was started.", "format": "date-time" }, "endedAt": { "type": "string", "description": "This is the ISO 8601 date-time string of when the call was ended.", "format": "date-time" }, "cost": { "type": "number", "description": "This is the cost of the call in USD." }, "costBreakdown": { "description": "This is the cost of the call in USD.", "allOf": [ { "type": "object", "properties": { "transport": { "type": "number", "description": "This is the cost of the transport provider, like Twilio or Vonage." }, "stt": { "type": "number", "description": "This is the cost of the speech-to-text service." }, "llm": { "type": "number", "description": "This is the cost of the language model." }, "tts": { "type": "number", "description": "This is the cost of the text-to-speech service." }, "vapi": { "type": "number", "description": "This is the cost of Vapi." }, "chat": { "type": "number", "description": "This is the cost of chat interactions." }, "total": { "type": "number", "description": "This is the total cost of the call." }, "llmPromptTokens": { "type": "number", "description": "This is the LLM prompt tokens used for the call." }, "llmCompletionTokens": { "type": "number", "description": "This is the LLM completion tokens used for the call." }, "llmCachedPromptTokens": { "type": "number", "description": "This is the LLM cached prompt tokens used for the call." }, "ttsCharacters": { "type": "number", "description": "This is the TTS characters used for the call." }, "analysisCostBreakdown": { "description": "This is the cost of the analysis." } } } ] }, "artifactPlan": { "description": "This is a copy of assistant artifact plan. This isn't actually stored on the call but rather just returned in POST /call/web to enable artifact creation client side.", "allOf": [ { "type": "object", "properties": { "recordingEnabled": { "type": "boolean", "description": "This determines whether assistant's calls are recorded. Defaults to true.\n\nUsage:\n- If you don't want to record the calls, set this to false.\n- If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make su" }, "recordingFormat": { "type": "string", "description": "This determines the format of the recording. Defaults to `wav;l16`.\n\n@default 'wav;l16'", "enum": [ "wav;l16", "mp3" ] }, "recordingUseCustomStorageEnabled": { "type": "boolean", "description": "This determines whether to use custom storage (S3 or GCP) for call recordings when storage credentials are configured.\n\nWhen set to false, recordings will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you" }, "videoRecordingEnabled": { "type": "boolean", "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" }, "fullMessageHistoryEnabled": { "type": "boolean", "description": "This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to 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" }, "pcapS3PathPrefix": { "type": "string", "description": "This is the path where the SIP packet capture will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload th" }, "pcapUseCustomStorageEnabled": { "type": "boolean", "description": "This determines whether to use custom storage (S3 or GCP) for SIP packet captures when storage credentials are configured.\n\nWhen set to false, packet captures will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to fal" }, "loggingEnabled": { "type": "boolean", "description": "This determines whether the call logs are enabled. Defaults to true.\n\n@default true" }, "loggingUseCustomStorageEnabled": { "type": "boolean", "description": "This determines whether to use custom storage (S3 or GCP) for call logs when storage credentials are configured.\n\nWhen set to false, logs will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom" }, "transcriptPlan": { "description": "This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false." }, "recordingPath": { "type": "string", "description": "This is the path where the recording will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the recordi" }, "structuredOutputIds": { "type": "array", "description": "This is an array of structured output IDs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.", "items": { "type": "object" } }, "structuredOutputs": { "type": "array", "description": "This is an array of transient structured outputs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.\nUse this to provide inline structured output configurations instead of referencing existing ones via structuredOut", "items": { "type": "object" } }, "scorecardIds": { "type": "array", "description": "This is an array of scorecard IDs that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", "items": { "type": "object" } }, "scorecards": { "type": "array", "description": "This is the array of scorecards that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", "items": { "type": "object" } }, "loggingPath": { "type": "string", "description": "This is the path where the call logs will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the call lo" } } } ] }, "analysis": { "description": "This is the analysis of the call. Configure in `assistant.analysisPlan`.", "allOf": [ { "type": "object", "properties": { "summary": { "type": "string", "description": "This is the summary of the call. Customize by setting `assistant.analysisPlan.summaryPrompt`." }, "structuredData": { "type": "object", "description": "This is the structured data extracted from the call. Customize by setting `assistant.analysisPlan.structuredDataPrompt` and/or `assistant.analysisPlan.structuredDataSchema`." }, "structuredDataMulti": { "type": "array", "description": "This is the structured data catalog of the call. Customize by setting `assistant.analysisPlan.structuredDataMultiPlan`.", "items": { "type": "object" } }, "successEvaluation": { "type": "string", "description": "This is the evaluation of the call. Customize by setting `assistant.analysisPlan.successEvaluationPrompt` and/or `assistant.analysisPlan.successEvaluationRubric`." } } } ] }, "monitor": { "description": "This is to real-time monitor the call. Configure in `assistant.monitorPlan`.", "allOf": [ { "type": "object", "properties": { "monitors": { "type": "array", "items": { "type": "object" } }, "listenUrl": { "type": "string", "description": "This is the URL where the assistant's calls can be listened to in real-time. To enable, set `assistant.monitorPlan.listenEnabled` to `true`." }, "controlUrl": { "type": "string", "description": "This is the URL where the assistant's calls can be controlled in real-time. To enable, set `assistant.monitorPlan.controlEnabled` to `true`." } } } ] }, "artifact": { "description": "These are the artifacts created from the call. Configure in `assistant.artifactPlan`.", "allOf": [ { "type": "object", "properties": { "messages": { "type": "array", "description": "These are the messages that were spoken during the call.", "items": { "type": "object" } }, "messagesOpenAIFormatted": { "type": "array", "description": "These are the messages that were spoken during the call, formatted for OpenAI.", "items": { "type": "object" } }, "recordingUrl": { "type": "string", "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." }, "stereoRecordingUrl": { "type": "string", "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." }, "videoRecordingUrl": { "type": "string", "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`." }, "videoRecordingStartDelaySeconds": { "type": "number", "description": "This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps." }, "recording": { "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." }, "transcript": { "type": "string", "description": "This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience." }, "pcapUrl": { "type": "string", "description": "This is the packet capture url for the call. This is only available for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`." }, "logUrl": { "type": "string", "description": "This is the url for the call logs. This includes all logging output during the call for debugging purposes." }, "nodes": { "type": "array", "description": "This is the history of workflow nodes that were executed during the call.", "items": { "type": "object" } }, "assistantActivations": { "type": "array", "description": "Ordered list of assistants that were active during the call, including after transfers and handoffs.", "items": { "type": "object" } }, "variableValues": { "type": "object", "description": "These are the variable values at the end of the workflow execution." }, "performanceMetrics": { "description": "This is the performance metrics for the call. It contains the turn latency, broken down by component." }, "structuredOutputs": { "type": "object", "description": "These are the structured outputs that will be extracted from the call.\nTo enable, set `assistant.artifactPlan.structuredOutputIds` with the IDs of the structured outputs you want to extract." }, "scorecards": { "type": "object", "description": "These are the scorecards that have been evaluated based on the structured outputs extracted during the call.\nTo enable, set `assistant.artifactPlan.scorecardIds` or `assistant.artifactPlan.scorecards` with the IDs or objects of the scorecards you want to evaluate." }, "transfers": { "type": "array", "description": "These are the transfer records from warm transfers, including destinations, transcripts, and status.", "items": { "type": "object" } }, "structuredOutputsLastUpdatedAt": { "type": "string", "description": "This is when the structured outputs were last updated", "format": "date-time" } } } ] }, "compliance": { "description": "This is the compliance of the call. Configure in `assistant.compliancePlan`.", "allOf": [ { "type": "object", "properties": { "recordingConsent": { "description": "This is the recording consent of the call. Configure in `assistant.compliancePlan.recordingConsentPlan`." } } } ] }, "phoneCallProviderId": { "type": "string", "description": "The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage. callControlId in Telnyx.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." }, "campaignId": { "type": "string", "description": "This is the campaign ID that the call belongs to." }, "assistantId": { "type": "string", "description": "This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`" }, "assistant": { "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.\n\nTo start a call with:\n- Assistant, use `assistant`\n- Squad, use `squad`\n- Workflow, use `workflow`", "allOf": [ { "type": "object", "properties": { "transcriber": { "description": "These are the options for the assistant's transcriber." }, "model": { "description": "These are the options for the assistant's LLM." }, "voice": { "description": "These are the options for the assistant's voice." }, "firstMessage": { "type": "string", "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." }, "firstMessageInterruptionsEnabled": { "type": "boolean" }, "firstMessageMode": { "type": "string", "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 as", "enum": [ "assistant-speaks-first", "assistant-speaks-first-with-model-generated-message", "assistant-waits-for-user" ] }, "voicemailDetection": { "description": "These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nBy default, voicemail detection is disabled." }, "clientMessages": { "type": "array", "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,assistant.started. You can check the shape of the messages", "enum": [ "conversation-update", "assistant.speechStarted", "function-call", "function-call-result", "hang", "language-changed", "metadata", "model-output", "speech-update", "status-update" ], "items": { "type": "object" } }, "serverMessages": { "type": "array", "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,assistant.started. You can check the shape of the message", "enum": [ "assistant.started", "assistant.speechStarted", "conversation-update", "end-of-call-report", "function-call", "hang", "language-changed", "language-change-detected", "model-output", "phone-call-control" ], "items": { "type": "object" } }, "maxDurationSeconds": { "type": "number", "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)" }, "backgroundSound": { "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." }, "modelOutputInMessagesEnabled": { "type": "boolean", "description": "This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\n@default false" }, "transportConfigurations": { "type": "array", "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.", "items": { "type": "object" } }, "observabilityPlan": { "description": "This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported." }, "credentials": { "type": "array", "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.", "items": { "type": "object" } }, "hooks": { "type": "array", "description": "This is a set of actions that will be performed on certain events.", "items": { "type": "object" } }, "name": { "type": "string", "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call." }, "voicemailMessage": { "type": "string", "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up." }, "endCallMessage": { "type": "string", "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." }, "endCallPhrases": { "type": "array", "description": "This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", "items": { "type": "object" } }, "compliancePlan": { "type": "object" }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." }, "backgroundSpeechDenoisingPlan": { "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" }, "analysisPlan": { "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`." }, "artifactPlan": { "description": "This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`." }, "startSpeakingPlan": { "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 assi" }, "stopSpeakingPlan": { "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 get" }, "monitorPlan": { "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`.\n- To attach monitors to the assis" }, "credentialIds": { "type": "array", "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.", "items": { "type": "object" } }, "server": { "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" } } } ] }, "assistantOverrides": { "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", "allOf": [ { "type": "object", "properties": { "transcriber": { "description": "These are the options for the assistant's transcriber." }, "model": { "description": "These are the options for the assistant's LLM." }, "voice": { "description": "These are the options for the assistant's voice." }, "firstMessage": { "type": "string", "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." }, "firstMessageInterruptionsEnabled": { "type": "boolean" }, "firstMessageMode": { "type": "string", "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 as", "enum": [ "assistant-speaks-first", "assistant-speaks-first-with-model-generated-message", "assistant-waits-for-user" ] }, "voicemailDetection": { "description": "These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nBy default, voicemail detection is disabled." }, "clientMessages": { "type": "array", "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,assistant.started. You can check the shape of the messages", "enum": [ "conversation-update", "assistant.speechStarted", "function-call", "function-call-result", "hang", "language-changed", "metadata", "model-output", "speech-update", "status-update" ], "items": { "type": "object" } }, "serverMessages": { "type": "array", "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,assistant.started. You can check the shape of the message", "enum": [ "assistant.started", "assistant.speechStarted", "conversation-update", "end-of-call-report", "function-call", "hang", "language-changed", "language-change-detected", "model-output", "phone-call-control" ], "items": { "type": "object" } }, "maxDurationSeconds": { "type": "number", "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)" }, "backgroundSound": { "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." }, "modelOutputInMessagesEnabled": { "type": "boolean", "description": "This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\n@default false" }, "transportConfigurations": { "type": "array", "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.", "items": { "type": "object" } }, "observabilityPlan": { "description": "This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported." }, "credentials": { "type": "array", "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.", "items": { "type": "object" } }, "hooks": { "type": "array", "description": "This is a set of actions that will be performed on certain events.", "items": { "type": "object" } }, "tools:append": { "type": "array", "items": { "type": "object" } }, "variableValues": { "type": "object", "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`{{\"" }, "name": { "type": "string", "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call." }, "voicemailMessage": { "type": "string", "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up." }, "endCallMessage": { "type": "string", "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." }, "endCallPhrases": { "type": "array", "description": "This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", "items": { "type": "object" } }, "compliancePlan": { "type": "object" }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." }, "backgroundSpeechDenoisingPlan": { "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" }, "analysisPlan": { "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`." }, "artifactPlan": { "description": "This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`." }, "startSpeakingPlan": { "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 assi" }, "stopSpeakingPlan": { "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 get" }, "monitorPlan": { "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`.\n- To attach monitors to the assis" } } } ] }, "squadId": { "type": "string", "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`" }, "squad": { "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.\n\nTo start a call with:\n- Assistant, use `assistant` or `assistantId`\n- Squad, use `squad` or `squadId`\n- Workflow, use `workflow` or `workflowId`", "allOf": [ { "type": "object", "properties": { "name": { "type": "string", "description": "This is the name of the squad." }, "members": { "type": "array", "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", "items": { "type": "object" } }, "membersOverrides": { "description": "This can be used to override all the assistants' settings and provide values for their template variables.\n\nBoth `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override." } }, "required": [ "members" ] } ] }, "squadOverrides": { "description": "These are the overrides for the `squad` or `squadId`'s member settings and template variables.\nThis will apply to all members of the squad.", "allOf": [ { "type": "object", "properties": { "transcriber": { "description": "These are the options for the assistant's transcriber." }, "model": { "description": "These are the options for the assistant's LLM." }, "voice": { "description": "These are the options for the assistant's voice." }, "firstMessage": { "type": "string", "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." }, "firstMessageInterruptionsEnabled": { "type": "boolean" }, "firstMessageMode": { "type": "string", "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 as", "enum": [ "assistant-speaks-first", "assistant-speaks-first-with-model-generated-message", "assistant-waits-for-user" ] }, "voicemailDetection": { "description": "These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nBy default, voicemail detection is disabled." }, "clientMessages": { "type": "array", "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,assistant.started. You can check the shape of the messages", "enum": [ "conversation-update", "assistant.speechStarted", "function-call", "function-call-result", "hang", "language-changed", "metadata", "model-output", "speech-update", "status-update" ], "items": { "type": "object" } }, "serverMessages": { "type": "array", "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,assistant.started. You can check the shape of the message", "enum": [ "assistant.started", "assistant.speechStarted", "conversation-update", "end-of-call-report", "function-call", "hang", "language-changed", "language-change-detected", "model-output", "phone-call-control" ], "items": { "type": "object" } }, "maxDurationSeconds": { "type": "number", "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)" }, "backgroundSound": { "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." }, "modelOutputInMessagesEnabled": { "type": "boolean", "description": "This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\n@default false" }, "transportConfigurations": { "type": "array", "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.", "items": { "type": "object" } }, "observabilityPlan": { "description": "This is the plan for observability of assistant's calls.\n\nCurrently, only Langfuse is supported." }, "credentials": { "type": "array", "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.", "items": { "type": "object" } }, "hooks": { "type": "array", "description": "This is a set of actions that will be performed on certain events.", "items": { "type": "object" } }, "tools:append": { "type": "array", "items": { "type": "object" } }, "variableValues": { "type": "object", "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`{{\"" }, "name": { "type": "string", "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call." }, "voicemailMessage": { "type": "string", "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up." }, "endCallMessage": { "type": "string", "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." }, "endCallPhrases": { "type": "array", "description": "This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", "items": { "type": "object" } }, "compliancePlan": { "type": "object" }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." }, "backgroundSpeechDenoisingPlan": { "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" }, "analysisPlan": { "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`." }, "artifactPlan": { "description": "This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`." }, "startSpeakingPlan": { "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 assi" }, "stopSpeakingPlan": { "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 get" }, "monitorPlan": { "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`.\n- To attach monitors to the assis" } } } ] } }, "required": [ "id", "orgId", "createdAt", "updatedAt" ] }