diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index a270759..e131c89 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -4615,6 +4615,48 @@ "role" ] }, + "Mono": { + "type": "object", + "properties": { + "combinedUrl": { + "type": "string", + "description": "This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + }, + "assistantUrl": { + "type": "string", + "description": "This is the mono recording url for the assistant. To enable, set `assistant.artifactPlan.recordingEnabled`." + }, + "customerUrl": { + "type": "string", + "description": "This is the mono recording url for the customer. To enable, set `assistant.artifactPlan.recordingEnabled`." + } + } + }, + "Recording": { + "type": "object", + "properties": { + "stereoUrl": { + "type": "string", + "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + }, + "videoUrl": { + "type": "string", + "description": "This is the 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." + }, + "mono": { + "description": "This is the mono recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "allOf": [ + { + "$ref": "#/components/schemas/Mono" + } + ] + } + } + }, "Artifact": { "type": "object", "properties": { @@ -4655,19 +4697,31 @@ }, "recordingUrl": { "type": "string", - "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "deprecated": true }, "stereoRecordingUrl": { "type": "string", - "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "deprecated": true }, "videoRecordingUrl": { "type": "string", - "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`." + "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.", + "deprecated": true }, "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." + "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.", + "deprecated": true + }, + "recording": { + "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "allOf": [ + { + "$ref": "#/components/schemas/Recording" + } + ] }, "transcript": { "type": "string", @@ -5109,7 +5163,8 @@ "base-finance", "base-conversationalai", "base-voicemail", - "base-video" + "base-video", + "whisper" ] }, { @@ -5121,7 +5176,11 @@ "type": "string", "description": "This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview", "enum": [ + "ar", + "az", + "ba", "bg", + "br", "ca", "cs", "da", @@ -5139,19 +5198,28 @@ "es-419", "es-LATAM", "et", + "eu", "fi", "fr", "fr-CA", + "ha", + "haw", + "he", "hi", "hi-Latn", "hu", "id", + "is", "it", "ja", + "jw", + "kn", "ko", "ko-KR", + "ln", "lt", "lv", + "mk", "ms", "multi", "nl", @@ -5163,6 +5231,11 @@ "ro", "ru", "sk", + "sl", + "sn", + "so", + "sr", + "su", "sv", "sv-SE", "ta", @@ -5170,8 +5243,11 @@ "th", "th-TH", "tr", + "tt", "uk", + "ur", "vi", + "yo", "zh", "zh-CN", "zh-HK", @@ -5878,6 +5954,7 @@ "type": "string", "description": "This is the model that will be used for the transcription.", "enum": [ + "gemini-2.5-flash-preview-04-17", "gemini-2.0-flash-thinking-exp", "gemini-2.0-pro-exp-02-05", "gemini-2.0-flash", @@ -6328,7 +6405,8 @@ "base-finance", "base-conversationalai", "base-voicemail", - "base-video" + "base-video", + "whisper" ] }, { @@ -6340,7 +6418,11 @@ "type": "string", "description": "This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview", "enum": [ + "ar", + "az", + "ba", "bg", + "br", "ca", "cs", "da", @@ -6358,19 +6440,28 @@ "es-419", "es-LATAM", "et", + "eu", "fi", "fr", "fr-CA", + "ha", + "haw", + "he", "hi", "hi-Latn", "hu", "id", + "is", "it", "ja", + "jw", + "kn", "ko", "ko-KR", + "ln", "lt", "lv", + "mk", "ms", "multi", "nl", @@ -6382,6 +6473,11 @@ "ro", "ru", "sk", + "sl", + "sn", + "so", + "sr", + "su", "sv", "sv-SE", "ta", @@ -6389,8 +6485,11 @@ "th", "th-TH", "tr", + "tt", "uk", + "ur", "vi", + "yo", "zh", "zh-CN", "zh-HK", @@ -7057,6 +7156,7 @@ "type": "string", "description": "This is the model that will be used for the transcription.", "enum": [ + "gemini-2.5-flash-preview-04-17", "gemini-2.0-flash-thinking-exp", "gemini-2.0-pro-exp-02-05", "gemini-2.0-flash", @@ -7464,7 +7564,7 @@ "maxLength": 1000 }, "value": { - "type": "object", + "type": "string", "description": "This is the value you want to compare against the parameter.", "maxLength": 1000 } @@ -8353,6 +8453,10 @@ "$ref": "#/components/schemas/SummaryPlan" } ] + }, + "sipHeadersInReferToEnabled": { + "type": "boolean", + "description": "This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.\n\n@default false" } }, "required": [ @@ -8592,6 +8696,7 @@ "type": "string", "description": "The model to use for the knowledge base", "enum": [ + "gemini-2.5-flash-preview-04-17", "gemini-2.0-flash-thinking-exp", "gemini-2.0-pro-exp-02-05", "gemini-2.0-flash", @@ -9897,6 +10002,7 @@ "type": "string", "description": "This is the Google model that will be used.", "enum": [ + "gemini-2.5-flash-preview-04-17", "gemini-2.0-flash-thinking-exp", "gemini-2.0-pro-exp-02-05", "gemini-2.0-flash", @@ -10314,7 +10420,9 @@ "gpt-4.1-nano", "gpt-4.5-preview", "chatgpt-4o-latest", + "o3", "o3-mini", + "o4-mini", "o1-preview", "o1-preview-2024-09-12", "o1-mini", @@ -10351,7 +10459,9 @@ "gpt-4.1-nano", "gpt-4.5-preview", "chatgpt-4o-latest", + "o3", "o3-mini", + "o4-mini", "o1-preview", "o1-preview-2024-09-12", "o1-mini", @@ -10390,7 +10500,9 @@ "gpt-4.1-nano", "gpt-4.5-preview", "chatgpt-4o-latest", + "o3", "o3-mini", + "o4-mini", "o1-preview", "o1-preview-2024-09-12", "o1-mini", @@ -10846,7 +10958,7 @@ }, "liquid": { "type": "string", - "maxLength": 100 + "maxLength": 1000 } }, "required": [ @@ -10912,6 +11024,14 @@ "type": "array", "items": { "oneOf": [ + { + "$ref": "#/components/schemas/Start", + "title": "Start" + }, + { + "$ref": "#/components/schemas/Assistant", + "title": "Assistant" + }, { "$ref": "#/components/schemas/Say", "title": "Say" @@ -11608,6 +11728,12 @@ "AzureVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -11718,6 +11844,12 @@ "CartesiaVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -11796,6 +11928,12 @@ "CustomVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported.", @@ -11836,6 +11974,12 @@ "DeepgramVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -11949,6 +12093,12 @@ "ElevenLabsVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12078,6 +12228,12 @@ "HumeVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12131,6 +12287,12 @@ "LMNTVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12187,6 +12349,12 @@ "NeuphonicVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12255,6 +12423,12 @@ "OpenAIVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12329,6 +12503,12 @@ "PlayHTVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12493,6 +12673,12 @@ "RimeAIVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12659,6 +12845,12 @@ "SmallestAIVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12788,6 +12980,12 @@ "TavusVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12864,6 +13062,12 @@ "VapiVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -12965,6 +13169,12 @@ "FallbackAzureVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13013,6 +13223,12 @@ "FallbackCartesiaVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13083,6 +13299,12 @@ "FallbackCustomVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported.", @@ -13115,6 +13337,12 @@ "FallbackDeepgramVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13220,6 +13448,12 @@ "FallbackElevenLabsVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13341,6 +13575,12 @@ "FallbackHumeVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13386,6 +13626,12 @@ "FallbackLMNTVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13434,6 +13680,12 @@ "FallbackNeuphonicVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13494,6 +13746,12 @@ "FallbackOpenAIVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13560,6 +13818,12 @@ "FallbackPlayHTVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13716,6 +13980,12 @@ "FallbackRimeAIVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13874,6 +14144,12 @@ "FallbackSmallestAIVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -13950,6 +14226,12 @@ "FallbackTavusVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -14018,6 +14300,12 @@ "FallbackVapiVoice": { "type": "object", "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, "provider": { "type": "string", "description": "This is the voice provider that will be used.", @@ -15475,6 +15763,14 @@ "type": "string", "description": "This is not returned in the API." }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "apiSecret": { + "type": "string", + "description": "This is not returned in the API." + }, "accountSid": { "type": "string" }, @@ -15487,7 +15783,6 @@ }, "required": [ "provider", - "authToken", "accountSid" ] }, @@ -15699,50 +15994,219 @@ "type" ] }, - "GoogleVoicemailDetectionPlan": { + "FunctionCallAssistantHookAction": { "type": "object", "properties": { - "provider": { + "async": { + "type": "boolean", + "description": "This determines if the tool is async.\n\nIf async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\nIf sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\nDefaults to synchronous (`false`).", + "example": false + }, + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { "type": "string", - "description": "This is the provider to use for voicemail detection.", "enum": [ - "google" + "function" + ], + "description": "The type of tool. \"function\" for Function tool." + }, + "function": { + "description": "This is the function definition of the tool.\n\nFor `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.\n\nAn example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument \"reason\". Then, in `messages` array, you can have many \"request-complete\" messages. One of these messages will be triggered if the `messages[].conditions` matches the \"reason\" argument.", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAIFunction" + } ] }, - "voicemailExpectedDurationSeconds": { - "type": "number", - "description": "This is how long should we listen in order to determine if we were sent to voicemail or not?\n\n@default 15", - "minimum": 5, - "maximum": 60, - "default": 25 + "server": { + "description": "This is the server that will be hit when this tool is requested by the model.\n\nAll requests will be sent with the call object among other things. You can find more details in the Server URL documentation.\n\nThis overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] } }, "required": [ - "provider", - "voicemailExpectedDurationSeconds" + "type" ] }, - "OpenAIVoicemailDetectionPlan": { + "AssistantHookFilter": { "type": "object", "properties": { - "provider": { + "type": { "type": "string", - "description": "This is the provider to use for voicemail detection.", + "description": "This is the type of filter - currently only \"oneOf\" is supported", "enum": [ - "openai" - ] + "oneOf" + ], + "maxLength": 1000 }, - "voicemailExpectedDurationSeconds": { - "type": "number", - "description": "This is how long should we listen in order to determine if we were sent to voicemail or not?\n\n@default 15", - "minimum": 5, - "maximum": 60, - "default": 25 - } - }, - "required": [ - "provider", - "voicemailExpectedDurationSeconds" + "key": { + "type": "string", + "description": "This is the key to filter on (e.g. \"call.endedReason\")", + "maxLength": 1000 + }, + "oneOf": { + "description": "This is the array of possible values to match against", + "type": "array", + "items": { + "type": "string", + "maxLength": 1000 + } + } + }, + "required": [ + "type", + "key", + "oneOf" + ] + }, + "AssistantHookCallEnding": { + "type": "object", + "properties": { + "on": { + "type": "string", + "description": "This is the event that triggers this hook", + "enum": [ + "call.ending" + ], + "maxLength": 1000 + }, + "do": { + "type": "array", + "description": "This is the set of actions to perform when the hook triggers", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferAssistantHookAction", + "title": "TransferAssistantHookAction" + }, + { + "$ref": "#/components/schemas/FunctionCallAssistantHookAction", + "title": "FunctionCallAssistantHookAction" + } + ] + } + }, + "filters": { + "description": "This is the set of filters that must match for the hook to trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHookFilter" + } + } + }, + "required": [ + "on", + "do" + ] + }, + "VoicemailDetectionBackoffPlan": { + "type": "object", + "properties": { + "startAtSeconds": { + "type": "number", + "description": "This is the number of seconds to wait before starting the first retry attempt.", + "minimum": 0, + "default": 5 + }, + "frequencySeconds": { + "type": "number", + "description": "This is the interval in seconds between retry attempts.", + "minimum": 2.5, + "default": 5 + }, + "maxRetries": { + "type": "number", + "description": "This is the maximum number of retry attempts before giving up.", + "minimum": 1, + "maximum": 10, + "default": 6 + } + } + }, + "GoogleVoicemailDetectionPlan": { + "type": "object", + "properties": { + "beepMaxAwaitSeconds": { + "type": "number", + "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + "minimum": 0, + "maximum": 30, + "default": 30 + }, + "provider": { + "type": "string", + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "google" + ] + }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ + { + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + } + ] + } + }, + "required": [ + "provider" + ] + }, + "OpenAIVoicemailDetectionPlan": { + "type": "object", + "properties": { + "beepMaxAwaitSeconds": { + "type": "number", + "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + "minimum": 0, + "maximum": 30, + "default": 30 + }, + "provider": { + "type": "string", + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "openai" + ] + }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ + { + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + } + ] + } + }, + "required": [ + "provider" ] }, "TwilioVoicemailDetectionPlan": { @@ -16382,72 +16846,6 @@ } } }, - "AssistantHookFilter": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of filter - currently only \"oneOf\" is supported", - "enum": [ - "oneOf" - ], - "maxLength": 1000 - }, - "key": { - "type": "string", - "description": "This is the key to filter on (e.g. \"call.endedReason\")", - "maxLength": 1000 - }, - "oneOf": { - "description": "This is the array of possible values to match against", - "type": "array", - "items": { - "type": "string", - "maxLength": 1000 - } - } - }, - "required": [ - "type", - "key", - "oneOf" - ] - }, - "AssistantHookActionBase": { - "type": "object", - "properties": {} - }, - "AssistantHooks": { - "type": "object", - "properties": { - "on": { - "type": "string", - "description": "This is the event that triggers this hook", - "enum": [ - "call.ending" - ], - "maxLength": 1000 - }, - "filters": { - "description": "This is the set of filters that must match for the hook to trigger", - "type": "array", - "items": { - "$ref": "#/components/schemas/AssistantHookFilter" - } - }, - "do": { - "description": "This is the set of actions to perform when the hook triggers", - "type": "array", - "items": { - "$ref": "#/components/schemas/AssistantHookActionBase" - } - } - }, - "required": [ - "on", - "do" - ] - }, "KeypadInputPlan": { "type": "object", "properties": { @@ -16683,6 +17081,10 @@ { "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" } ] }, @@ -16701,6 +17103,7 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", "transfer-update", "user-interrupted", "voice-input", @@ -16736,6 +17139,7 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", "transfer-update", "user-interrupted", "voice-input", @@ -17116,6 +17520,18 @@ } } }, + "hooks": { + "type": "array", + "description": "This is a set of actions that will be performed on certain events.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantHookCallEnding", + "title": "AssistantHookCallEnding" + } + ] + } + }, "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.", @@ -17210,13 +17626,6 @@ } ] }, - "hooks": { - "description": "This is a set of actions that will be performed on certain events.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AssistantHooks" - } - }, "keypadInputPlan": { "$ref": "#/components/schemas/KeypadInputPlan" } @@ -17433,6 +17842,10 @@ { "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" } ] }, @@ -17451,6 +17864,7 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", "transfer-update", "user-interrupted", "voice-input", @@ -17486,6 +17900,7 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", "transfer-update", "user-interrupted", "voice-input", @@ -17866,6 +18281,18 @@ } } }, + "hooks": { + "type": "array", + "description": "This is a set of actions that will be performed on certain events.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantHookCallEnding", + "title": "AssistantHookCallEnding" + } + ] + } + }, "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`{{\"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" @@ -17964,13 +18391,6 @@ } ] }, - "hooks": { - "description": "This is a set of actions that will be performed on certain events.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AssistantHooks" - } - }, "keypadInputPlan": { "$ref": "#/components/schemas/KeypadInputPlan" } @@ -18036,32 +18456,81 @@ "members" ] }, - "PhoneNumberHookCallRinging": { + "TransferPhoneNumberHookAction": { "type": "object", "properties": { - "on": { + "type": { "type": "string", - "description": "This is the event to trigger the hook on", + "description": "This is the type of action - must be \"transfer\"", "enum": [ - "call.ringing" - ], - "maxLength": 1000 + "transfer" + ] }, - "do": { - "type": "array", - "description": "This is the set of actions to perform when the hook triggers", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransferPhoneNumberHookAction", - "title": "TransferPhoneNumberHookAction" - }, - { - "$ref": "#/components/schemas/SayPhoneNumberHookAction", - "title": "SayPhoneNumberHookAction" - } - ] - } + "destination": { + "description": "This is the destination details for the transfer - can be a phone number or SIP URI", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] + } + }, + "required": [ + "type" + ] + }, + "SayPhoneNumberHookAction": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of action - must be \"say\"", + "enum": [ + "say" + ] + }, + "exact": { + "type": "string", + "description": "This is the message to say", + "maxLength": 4000 + } + }, + "required": [ + "type", + "exact" + ] + }, + "PhoneNumberHookCallRinging": { + "type": "object", + "properties": { + "on": { + "type": "string", + "description": "This is the event to trigger the hook on", + "enum": [ + "call.ringing" + ], + "maxLength": 1000 + }, + "do": { + "type": "array", + "description": "This is the set of actions to perform when the hook triggers", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferPhoneNumberHookAction", + "title": "TransferPhoneNumberHookAction" + }, + { + "$ref": "#/components/schemas/SayPhoneNumberHookAction", + "title": "SayPhoneNumberHookAction" + } + ] + } } }, "required": [ @@ -18110,6 +18579,14 @@ "type": "string", "description": "This is the Twilio Auth Token that will be used to handle this phone number." }, + "twilioApiKey": { + "type": "string", + "description": "This is the Twilio API Key that will be used to handle this phone number. If AuthToken is provided, this will be ignored." + }, + "twilioApiSecret": { + "type": "string", + "description": "This is the Twilio API Secret that will be used to handle this phone number. If AuthToken is provided, this will be ignored." + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -18134,8 +18611,7 @@ }, "required": [ "twilioPhoneNumber", - "twilioAccountSid", - "twilioAuthToken" + "twilioAccountSid" ] }, "CreateCustomerDTO": { @@ -19307,6 +19783,56 @@ "content" ] }, + "Start": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "start" + ] + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "name" + ] + }, + "Assistant": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "assistant" + ] + }, + "assistantId": { + "type": "string" + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "assistantId", + "name" + ] + }, "Say": { "type": "object", "properties": { @@ -19568,898 +20094,132 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/Say", - "title": "Say" - }, - { - "$ref": "#/components/schemas/Gather", - "title": "Gather" - }, - { - "$ref": "#/components/schemas/ApiRequest", - "title": "ApiRequest" + "$ref": "#/components/schemas/Start", + "title": "Start" }, { - "$ref": "#/components/schemas/Hangup", - "title": "Hangup" + "$ref": "#/components/schemas/Assistant", + "title": "Assistant" }, { - "$ref": "#/components/schemas/Transfer", - "title": "Transfer" - } - ] - } - }, - "model": { - "description": "These are the options for the workflow'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": { - "type": "string", - "maxLength": 80 - }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } - } - }, - "required": [ - "nodes", - "name", - "edges" - ] - }, - "ChatCompletionsDTO": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatCompletionMessageWorkflows" - } - }, - "workflowId": { - "type": "string" - }, - "workflow": { - "$ref": "#/components/schemas/CreateWorkflowDTO" - } - }, - "required": [ - "messages" - ] - }, - "Assistant": { - "type": "object", - "properties": { - "transcriber": { - "description": "These are the options for the assistant's transcriber.", - "oneOf": [ - { - "$ref": "#/components/schemas/AssemblyAITranscriber", - "title": "AssemblyAI" - }, - { - "$ref": "#/components/schemas/AzureSpeechTranscriber", - "title": "Azure" - }, - { - "$ref": "#/components/schemas/CustomTranscriber", - "title": "CustomTranscriber" - }, - { - "$ref": "#/components/schemas/DeepgramTranscriber", - "title": "Deepgram" - }, - { - "$ref": "#/components/schemas/ElevenLabsTranscriber", - "title": "ElevenLabs" - }, - { - "$ref": "#/components/schemas/GladiaTranscriber", - "title": "Gladia" - }, - { - "$ref": "#/components/schemas/SpeechmaticsTranscriber", - "title": "Speechmatics" - }, - { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "Talkscriber" - }, - { - "$ref": "#/components/schemas/GoogleTranscriber", - "title": "Google" - }, - { - "$ref": "#/components/schemas/OpenAITranscriber", - "title": "OpenAI" - } - ] - }, - "model": { - "description": "These are the options for the assistant's LLM.", - "oneOf": [ - { - "$ref": "#/components/schemas/AnyscaleModel", - "title": "Anyscale" - }, - { - "$ref": "#/components/schemas/AnthropicModel", - "title": "Anthropic" - }, - { - "$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/VapiModel", - "title": "Vapi" - }, - { - "$ref": "#/components/schemas/XaiModel", - "title": "XAI" - } - ] - }, - "voice": { - "description": "These are the options for the assistant's voice.", - "oneOf": [ - { - "$ref": "#/components/schemas/AzureVoice", - "title": "Azure" - }, - { - "$ref": "#/components/schemas/CartesiaVoice", - "title": "Cartesia" - }, - { - "$ref": "#/components/schemas/CustomVoice", - "title": "CustomVoice" - }, - { - "$ref": "#/components/schemas/DeepgramVoice", - "title": "Deepgram" - }, - { - "$ref": "#/components/schemas/ElevenLabsVoice", - "title": "ElevenLabs" - }, - { - "$ref": "#/components/schemas/HumeVoice", - "title": "Hume" - }, - { - "$ref": "#/components/schemas/LMNTVoice", - "title": "LMNT" - }, - { - "$ref": "#/components/schemas/NeuphonicVoice", - "title": "Neuphonic" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHT" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAI" - }, - { - "$ref": "#/components/schemas/SmallestAIVoice", - "title": "SmallestAI" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - }, - { - "$ref": "#/components/schemas/VapiVoice", - "title": "Vapi" - } - ], - "default": { - "provider": "playht", - "voiceId": "jennifer" - } - }, - "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.", - "example": "Hello! How can I help you today?" - }, - "firstMessageInterruptionsEnabled": { - "type": "boolean", - "default": false - }, - "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 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'", - "enum": [ - "assistant-speaks-first", - "assistant-speaks-first-with-model-generated-message", - "assistant-waits-for-user" - ], - "example": "assistant-speaks-first" - }, - "voicemailDetection": { - "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" - } - ] - }, - "clientMessages": { - "type": "array", - "enum": [ - "conversation-update", - "function-call", - "function-call-result", - "hang", - "language-changed", - "metadata", - "model-output", - "speech-update", - "status-update", - "transcript", - "tool-calls", - "tool-calls-result", - "transfer-update", - "user-interrupted", - "voice-input", - "workflow.node.started" - ], - "example": [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started" - ], - "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.", - "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", - "transfer-update", - "user-interrupted", - "voice-input", - "workflow.node.started" - ] - } - }, - "serverMessages": { - "type": "array", - "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", - "transfer-update", - "user-interrupted", - "voice-input" - ], - "example": [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "user-interrupted" - ], - "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,user-interrupted. You can check the shape of the messages in ServerMessage schema.", - "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", - "transfer-update", - "user-interrupted", - "voice-input" - ] - } - }, - "silenceTimeoutSeconds": { - "type": "number", - "description": "How many seconds of silence to wait before ending the call. Defaults to 30.\n\n@default 30", - "minimum": 10, - "maximum": 3600, - "example": 30 - }, - "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)", - "minimum": 10, - "maximum": 43200, - "example": 600 - }, - "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.", - "maxLength": 1000, - "oneOf": [ - { - "type": "enum", - "enum": [ - "off", - "office" - ], - "example": "office" - }, - { - "type": "string", - "format": "uri", - "example": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3" - } - ] - }, - "backgroundDenoisingEnabled": { - "type": "boolean", - "description": "This enables filtering of noise and background speech while the user is talking.\n\nDefault `false` while in beta.\n\n@default false", - "example": false - }, - "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\nDefault `false` while in beta.\n\n@default false", - "example": 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": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransportConfigurationTwilio", - "title": "Twilio" - } - ] - } - }, - "observabilityPlan": { - "description": "This is the plan for observability configuration of assistant's calls.\nCurrently supports Langfuse for tracing and monitoring.", - "oneOf": [ - { - "$ref": "#/components/schemas/LangfuseObservabilityPlan", - "title": "Langfuse" - } - ], - "allOf": [ - { - "$ref": "#/components/schemas/LangfuseObservabilityPlan" - } - ] - }, - "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": { - "oneOf": [ - { - "$ref": "#/components/schemas/CreateAnthropicCredentialDTO", - "title": "AnthropicCredential" - }, - { - "$ref": "#/components/schemas/CreateAnyscaleCredentialDTO", - "title": "AnyscaleCredential" - }, - { - "$ref": "#/components/schemas/CreateAssemblyAICredentialDTO", - "title": "AssemblyAICredential" - }, - { - "$ref": "#/components/schemas/CreateAzureCredentialDTO", - "title": "AzureCredential" - }, - { - "$ref": "#/components/schemas/CreateAzureOpenAICredentialDTO", - "title": "AzureOpenAICredential" - }, - { - "$ref": "#/components/schemas/CreateByoSipTrunkCredentialDTO", - "title": "ByoSipTrunkCredential" - }, - { - "$ref": "#/components/schemas/CreateCartesiaCredentialDTO", - "title": "CartesiaCredential" - }, - { - "$ref": "#/components/schemas/CreateCerebrasCredentialDTO", - "title": "CerebrasCredential" - }, - { - "$ref": "#/components/schemas/CreateCloudflareCredentialDTO", - "title": "CloudflareCredential" - }, - { - "$ref": "#/components/schemas/CreateCustomLLMCredentialDTO", - "title": "CustomLLMCredential" - }, - { - "$ref": "#/components/schemas/CreateDeepgramCredentialDTO", - "title": "DeepgramCredential" - }, - { - "$ref": "#/components/schemas/CreateDeepInfraCredentialDTO", - "title": "DeepInfraCredential" - }, - { - "$ref": "#/components/schemas/CreateDeepSeekCredentialDTO", - "title": "DeepSeekCredential" - }, - { - "$ref": "#/components/schemas/CreateElevenLabsCredentialDTO", - "title": "ElevenLabsCredential" - }, - { - "$ref": "#/components/schemas/CreateGcpCredentialDTO", - "title": "GcpCredential" - }, - { - "$ref": "#/components/schemas/CreateGladiaCredentialDTO", - "title": "GladiaCredential" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCredentialDTO", - "title": "GhlCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleCredentialDTO", - "title": "GoogleCredential" - }, - { - "$ref": "#/components/schemas/CreateGroqCredentialDTO", - "title": "GroqCredential" - }, - { - "$ref": "#/components/schemas/CreateHumeCredentialDTO", - "title": "HumeCredential" - }, - { - "$ref": "#/components/schemas/CreateInflectionAICredentialDTO", - "title": "InflectionAICredential" - }, - { - "$ref": "#/components/schemas/CreateLangfuseCredentialDTO", - "title": "LangfuseCredential" - }, - { - "$ref": "#/components/schemas/CreateLmntCredentialDTO", - "title": "LmntCredential" - }, - { - "$ref": "#/components/schemas/CreateMakeCredentialDTO", - "title": "MakeCredential" - }, - { - "$ref": "#/components/schemas/CreateMistralCredentialDTO", - "title": "MistralCredential" - }, - { - "$ref": "#/components/schemas/CreateNeuphonicCredentialDTO", - "title": "NeuphonicCredential" - }, - { - "$ref": "#/components/schemas/CreateOpenAICredentialDTO", - "title": "OpenAICredential" - }, - { - "$ref": "#/components/schemas/CreateOpenRouterCredentialDTO", - "title": "OpenRouterCredential" - }, - { - "$ref": "#/components/schemas/CreatePerplexityAICredentialDTO", - "title": "PerplexityAICredential" - }, - { - "$ref": "#/components/schemas/CreatePlayHTCredentialDTO", - "title": "PlayHTCredential" - }, - { - "$ref": "#/components/schemas/CreateRimeAICredentialDTO", - "title": "RimeAICredential" - }, - { - "$ref": "#/components/schemas/CreateRunpodCredentialDTO", - "title": "RunpodCredential" - }, - { - "$ref": "#/components/schemas/CreateS3CredentialDTO", - "title": "S3Credential" - }, - { - "$ref": "#/components/schemas/CreateSmallestAICredentialDTO", - "title": "SmallestAICredential" - }, - { - "$ref": "#/components/schemas/CreateSpeechmaticsCredentialDTO", - "title": "SpeechmaticsCredential" - }, - { - "$ref": "#/components/schemas/CreateSupabaseCredentialDTO", - "title": "SupabaseCredential" - }, - { - "$ref": "#/components/schemas/CreateTavusCredentialDTO", - "title": "TavusCredential" - }, - { - "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", - "title": "TogetherAICredential" - }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, - { - "$ref": "#/components/schemas/CreateTwilioCredentialDTO", - "title": "TwilioCredential" - }, - { - "$ref": "#/components/schemas/CreateVonageCredentialDTO", - "title": "VonageCredential" - }, - { - "$ref": "#/components/schemas/CreateWebhookCredentialDTO", - "title": "WebhookCredential" - }, - { - "$ref": "#/components/schemas/CreateXAiCredentialDTO", - "title": "XAiCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", - "title": "GoogleCalendarOAuth2ClientCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", - "title": "GoogleCalendarOAuth2AuthorizationCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", - "title": "GoogleSheetsOAuth2AuthorizationCredential" - }, - { - "$ref": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", - "title": "SlackOAuth2AuthorizationCredential" - } - ], - "discriminator": { - "propertyName": "provider", - "mapping": { - "11labs": "#/components/schemas/CreateElevenLabsCredentialDTO", - "anthropic": "#/components/schemas/CreateAnthropicCredentialDTO", - "anyscale": "#/components/schemas/CreateAnyscaleCredentialDTO", - "assembly-ai": "#/components/schemas/CreateAssemblyAICredentialDTO", - "azure-openai": "#/components/schemas/CreateAzureOpenAICredentialDTO", - "azure": "#/components/schemas/CreateAzureCredentialDTO", - "byo-sip-trunk": "#/components/schemas/CreateByoSipTrunkCredentialDTO", - "cartesia": "#/components/schemas/CreateCartesiaCredentialDTO", - "cerebras": "#/components/schemas/CreateCerebrasCredentialDTO", - "cloudflare": "#/components/schemas/CreateCloudflareCredentialDTO", - "custom-llm": "#/components/schemas/CreateCustomLLMCredentialDTO", - "deepgram": "#/components/schemas/CreateDeepgramCredentialDTO", - "deepinfra": "#/components/schemas/CreateDeepInfraCredentialDTO", - "deep-seek": "#/components/schemas/CreateDeepSeekCredentialDTO", - "gcp": "#/components/schemas/CreateGcpCredentialDTO", - "gladia": "#/components/schemas/CreateGladiaCredentialDTO", - "gohighlevel": "#/components/schemas/CreateGoHighLevelCredentialDTO", - "google": "#/components/schemas/CreateGoogleCredentialDTO", - "groq": "#/components/schemas/CreateGroqCredentialDTO", - "inflection-ai": "#/components/schemas/CreateInflectionAICredentialDTO", - "langfuse": "#/components/schemas/CreateLangfuseCredentialDTO", - "lmnt": "#/components/schemas/CreateLmntCredentialDTO", - "make": "#/components/schemas/CreateMakeCredentialDTO", - "openai": "#/components/schemas/CreateOpenAICredentialDTO", - "openrouter": "#/components/schemas/CreateOpenRouterCredentialDTO", - "perplexity-ai": "#/components/schemas/CreatePerplexityAICredentialDTO", - "playht": "#/components/schemas/CreatePlayHTCredentialDTO", - "rime-ai": "#/components/schemas/CreateRimeAICredentialDTO", - "runpod": "#/components/schemas/CreateRunpodCredentialDTO", - "s3": "#/components/schemas/CreateS3CredentialDTO", - "supabase": "#/components/schemas/CreateSupabaseCredentialDTO", - "smallest-ai": "#/components/schemas/CreateSmallestAICredentialDTO", - "tavus": "#/components/schemas/CreateTavusCredentialDTO", - "together-ai": "#/components/schemas/CreateTogetherAICredentialDTO", - "twilio": "#/components/schemas/CreateTwilioCredentialDTO", - "vonage": "#/components/schemas/CreateVonageCredentialDTO", - "webhook": "#/components/schemas/CreateWebhookCredentialDTO", - "xai": "#/components/schemas/CreateXAiCredentialDTO", - "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", - "hume": "#/components/schemas/CreateHumeCredentialDTO", - "mistral": "#/components/schemas/CreateMistralCredentialDTO", - "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", - "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", - "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", - "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", - "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO" - } - } - } - }, - "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.", - "maxLength": 40 - }, - "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.", - "maxLength": 1000 - }, - "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.", - "maxLength": 1000 - }, - "endCallPhrases": { - "description": "This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", - "type": "array", - "items": { - "type": "string", - "maxLength": 140, - "minLength": 2 + "$ref": "#/components/schemas/Say", + "title": "Say" + }, + { + "$ref": "#/components/schemas/Gather", + "title": "Gather" + }, + { + "$ref": "#/components/schemas/ApiRequest", + "title": "ApiRequest" + }, + { + "$ref": "#/components/schemas/Hangup", + "title": "Hangup" + }, + { + "$ref": "#/components/schemas/Transfer", + "title": "Transfer" + } + ] } }, - "compliancePlan": { - "$ref": "#/components/schemas/CompliancePlan" - }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the assistant." - }, - "analysisPlan": { - "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", - "allOf": [ + "model": { + "description": "These are the options for the workflow's LLM.", + "oneOf": [ { - "$ref": "#/components/schemas/AnalysisPlan" - } - ] - }, - "artifactPlan": { - "description": "This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.\n\nNote: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible.", - "allOf": [ + "$ref": "#/components/schemas/AnthropicModel", + "title": "Anthropic" + }, { - "$ref": "#/components/schemas/ArtifactPlan" - } - ] - }, - "messagePlan": { - "description": "This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`.\n\nNote: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible.", - "allOf": [ + "$ref": "#/components/schemas/AnyscaleModel", + "title": "Anyscale" + }, { - "$ref": "#/components/schemas/MessagePlan" - } - ] - }, - "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 assistant is so fast that it's actually interrupting the customer.", - "allOf": [ + "$ref": "#/components/schemas/CerebrasModel", + "title": "Cerebras" + }, { - "$ref": "#/components/schemas/StartSpeakingPlan" - } - ] - }, - "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 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/CustomLLMModel", + "title": "CustomLLM" + }, { - "$ref": "#/components/schemas/StopSpeakingPlan" - } - ] - }, - "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\nNote, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible", - "allOf": [ + "$ref": "#/components/schemas/DeepInfraModel", + "title": "DeepInfra" + }, { - "$ref": "#/components/schemas/MonitorPlan" + "$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" } ] }, - "credentialIds": { - "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": { + "type": "string", + "maxLength": 80 + }, + "edges": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Edge" } - }, - "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", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] - }, - "hooks": { - "description": "This is a set of actions that will be performed on certain events.", + } + }, + "required": [ + "nodes", + "name", + "edges" + ] + }, + "ChatCompletionsDTO": { + "type": "object", + "properties": { + "messages": { "type": "array", "items": { - "$ref": "#/components/schemas/AssistantHooks" + "$ref": "#/components/schemas/ChatCompletionMessageWorkflows" } }, - "keypadInputPlan": { - "$ref": "#/components/schemas/KeypadInputPlan" - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the assistant." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this assistant belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was created." + "workflowId": { + "type": "string" }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "workflow": { + "$ref": "#/components/schemas/CreateWorkflowDTO" } }, "required": [ - "id", - "orgId", - "createdAt", - "updatedAt" + "messages" ] }, "AssistantPaginatedResponse": { @@ -20480,6 +20240,24 @@ "metadata" ] }, + "AssistantVersionPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "nextPageState": { + "type": "string" + } + }, + "required": [ + "results", + "metadata" + ] + }, "UpdateAssistantDTO": { "type": "object", "properties": { @@ -20691,6 +20469,10 @@ { "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" } ] }, @@ -20709,6 +20491,7 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", "transfer-update", "user-interrupted", "voice-input", @@ -20744,6 +20527,7 @@ "transcript", "tool-calls", "tool-calls-result", + "tool.completed", "transfer-update", "user-interrupted", "voice-input", @@ -21124,6 +20908,18 @@ } } }, + "hooks": { + "type": "array", + "description": "This is a set of actions that will be performed on certain events.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantHookCallEnding", + "title": "AssistantHookCallEnding" + } + ] + } + }, "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.", @@ -21218,13 +21014,6 @@ } ] }, - "hooks": { - "description": "This is a set of actions that will be performed on certain events.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AssistantHooks" - } - }, "keypadInputPlan": { "$ref": "#/components/schemas/KeypadInputPlan" } @@ -21432,6 +21221,14 @@ "twilioAuthToken": { "type": "string", "description": "This is the Twilio Auth Token for the phone number." + }, + "twilioApiKey": { + "type": "string", + "description": "This is the Twilio API Key for the phone number." + }, + "twilioApiSecret": { + "type": "string", + "description": "This is the Twilio API Secret for the phone number." } }, "required": [ @@ -21441,8 +21238,7 @@ "createdAt", "updatedAt", "number", - "twilioAccountSid", - "twilioAuthToken" + "twilioAccountSid" ] }, "VonagePhoneNumber": { @@ -21912,6 +21708,14 @@ "type": "string", "description": "This is the Twilio Auth Token for the phone number." }, + "twilioApiKey": { + "type": "string", + "description": "This is the Twilio API Key for the phone number." + }, + "twilioApiSecret": { + "type": "string", + "description": "This is the Twilio API Secret for the phone number." + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -21937,8 +21741,7 @@ "required": [ "provider", "number", - "twilioAccountSid", - "twilioAuthToken" + "twilioAccountSid" ] }, "CreateVonagePhoneNumberDTO": { @@ -22288,6 +22091,14 @@ "twilioAuthToken": { "type": "string", "description": "This is the Twilio Auth Token for the phone number." + }, + "twilioApiKey": { + "type": "string", + "description": "This is the Twilio API Key for the phone number." + }, + "twilioApiSecret": { + "type": "string", + "description": "This is the Twilio API Secret for the phone number." } } }, @@ -25816,6 +25627,14 @@ "type": "array", "items": { "oneOf": [ + { + "$ref": "#/components/schemas/Start", + "title": "Start" + }, + { + "$ref": "#/components/schemas/Assistant", + "title": "Assistant" + }, { "$ref": "#/components/schemas/Say", "title": "Say" @@ -26532,7 +26351,7 @@ "rubric": { "type": "string", "description": "This is the rubric used by the AI scorer.", - "maxLength": 1000 + "maxLength": 10000 } }, "required": [ @@ -26599,7 +26418,7 @@ "rubric": { "type": "string", "description": "This is the rubric used by the AI scorer.", - "maxLength": 1000 + "maxLength": 10000 } }, "required": [ @@ -30080,6 +29899,14 @@ "type": "string", "description": "This is not returned in the API." }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "apiSecret": { + "type": "string", + "description": "This is not returned in the API." + }, "id": { "type": "string", "description": "This is the unique identifier for the credential." @@ -30110,7 +29937,6 @@ }, "required": [ "provider", - "authToken", "id", "orgId", "createdAt", @@ -31496,6 +31322,14 @@ "type": "string", "description": "This is not returned in the API." }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "apiSecret": { + "type": "string", + "description": "This is not returned in the API." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -35840,6 +35674,10 @@ "error": { "type": "string", "description": "This is the error if the tool call was not successful. This is added to the conversation history.\n\nFurther, if this is returned, assistant will speak:\n1. the `message`, if it exists and is of type `request-failed`\n2. a `request-failed` message from `tool.messages`, if it exists\n3. a response generated by the model, if neither exist" + }, + "metadata": { + "type": "object", + "description": "This is optional metadata for the tool call result to be sent to the client." } }, "required": [ @@ -36260,6 +36098,10 @@ "secondsFromStart": { "type": "number", "description": "The number of seconds from the start of the conversation." + }, + "metadata": { + "type": "object", + "description": "The metadata for the tool call result." } }, "required": [ @@ -36498,7 +36340,8 @@ "enum": [ "twilio", "google", - "openai" + "openai", + "vapi" ] }, "promptTextTokens": {