{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://api-evangelist.com/schemas/vapi/vapi-chat-schema.json", "title": "Vapi Chat", "description": "JSON Schema for the Vapi Chat resource as returned by the Vapi API.", "type": "object", "properties": { "assistantId": { "type": "string", "description": "This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead." }, "assistant": { "description": "This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead.", "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 variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in chat contexts - other assistant properties cannot be overridden.", "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 chat. To use a transient squad, use `squad` instead." }, "squad": { "description": "This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead.", "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" ] } ] }, "name": { "type": "string", "description": "This is the name of the chat. This is just for your own reference." }, "sessionId": { "type": "string", "description": "This is the ID of the session that will be used for the chat.\nMutually exclusive with previousChatId." }, "input": { "description": "This is the input text for the chat.\nCan be a string or an array of chat messages.", "oneOf": [ { "type": "string" }, { "type": "array", "items": {} } ] }, "stream": { "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." }, "previousChatId": { "type": "string", "description": "This is the ID of the chat that will be used as context for the new chat.\nThe messages from the previous chat will be used as context.\nMutually exclusive with sessionId." }, "id": { "type": "string", "description": "This is the unique identifier for the chat." }, "orgId": { "type": "string", "description": "This is the unique identifier for the org that this chat belongs to." }, "messages": { "type": "array", "description": "This is an array of messages used as context for the chat.\nUsed to provide message history for multi-turn conversations.", "items": {} }, "output": { "type": "array", "description": "This is the output messages generated by the system in response to the input.", "items": {} }, "createdAt": { "type": "string", "description": "This is the ISO 8601 date-time string of when the chat was created.", "format": "date-time" }, "updatedAt": { "type": "string", "description": "This is the ISO 8601 date-time string of when the chat was last updated.", "format": "date-time" }, "costs": { "type": "array", "description": "These are the costs of individual components of the chat in USD.", "items": {} }, "cost": { "type": "number", "description": "This is the cost of the chat in USD." } }, "required": [ "id", "orgId", "createdAt", "updatedAt" ] }