diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 68d8edd30..2aafa5929 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -887,7 +887,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePhoneNumberDTO" + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/UpdateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/UpdateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/UpdateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + } + ], + "discriminator": { + "propertyName": "provider", + "mapping": { + "byo-phone-number": "#/components/schemas/UpdateByoPhoneNumberDTO", + "twilio": "#/components/schemas/UpdateTwilioPhoneNumberDTO", + "vonage": "#/components/schemas/UpdateVonagePhoneNumberDTO", + "vapi": "#/components/schemas/UpdateVapiPhoneNumberDTO" + } + } } } } @@ -1542,6 +1568,32 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateTrieveKnowledgeBaseDTO", + "title": "UpdateTrieveKnowledgeBaseDTO" + }, + { + "$ref": "#/components/schemas/UpdateCustomKnowledgeBaseDTO", + "title": "UpdateCustomKnowledgeBaseDTO" + } + ], + "discriminator": { + "propertyName": "provider", + "mapping": { + "trieve": "#/components/schemas/UpdateTrieveKnowledgeBaseDTO", + "custom-knowledge-base": "#/components/schemas/UpdateCustomKnowledgeBaseDTO" + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -1924,7 +1976,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateBlockDTO" + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateConversationBlockDTO", + "title": "ConversationBlock" + }, + { + "$ref": "#/components/schemas/UpdateToolCallBlockDTO", + "title": "ToolCallBlock" + }, + { + "$ref": "#/components/schemas/UpdateWorkflowBlockDTO", + "title": "WorkflowBlock" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "conversation": "#/components/schemas/UpdateConversationBlockDTO", + "tool-call": "#/components/schemas/UpdateToolCallBlockDTO", + "workflow": "#/components/schemas/UpdateWorkflowBlockDTO" + } + } } } } @@ -2461,7 +2534,63 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateToolDTO" + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/UpdateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/UpdateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/UpdateGhlToolDTO", + "title": "GhlTool" + }, + { + "$ref": "#/components/schemas/UpdateMakeToolDTO", + "title": "MakeTool" + }, + { + "$ref": "#/components/schemas/UpdateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/UpdateOutputToolDTO", + "title": "OutputTool" + }, + { + "$ref": "#/components/schemas/UpdateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/UpdateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/UpdateTextEditorToolDTO", + "title": "TextEditorTool" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "dtmf": "#/components/schemas/UpdateDtmfToolDTO", + "endCall": "#/components/schemas/UpdateEndCallToolDTO", + "function": "#/components/schemas/UpdateFunctionToolDTO", + "ghl": "#/components/schemas/UpdateGhlToolDTO", + "make": "#/components/schemas/UpdateMakeToolDTO", + "transferCall": "#/components/schemas/UpdateTransferCallToolDTO", + "output": "#/components/schemas/UpdateOutputToolDTO", + "bash": "#/components/schemas/UpdateBashToolDTO", + "computer": "#/components/schemas/UpdateComputerToolDTO", + "textEditor": "#/components/schemas/UpdateTextEditorToolDTO" + } + } } } } @@ -2858,7 +2987,7 @@ }, "/logs": { "get": { - "operationId": "LoggingController_queryLogs", + "operationId": "LoggingController_logsQuery", "summary": "Get Logs", "parameters": [ { @@ -3074,6 +3203,79 @@ "bearer": [] } ] + }, + "delete": { + "operationId": "LoggingController_logsDeleteQuery", + "summary": "Delete Logs", + "parameters": [ + { + "name": "orgId", + "required": false, + "in": "query", + "description": "This is the unique identifier for the org that this log belongs to.", + "schema": { + "type": "string" + } + }, + { + "name": "assistantId", + "required": false, + "in": "query", + "description": "This is the ID of the assistant.", + "schema": { + "type": "string" + } + }, + { + "name": "phoneNumberId", + "required": false, + "in": "query", + "description": "This is the ID of the phone number.", + "schema": { + "type": "string" + } + }, + { + "name": "customerId", + "required": false, + "in": "query", + "description": "This is the ID of the customer.", + "schema": { + "type": "string" + } + }, + { + "name": "squadId", + "required": false, + "in": "query", + "description": "This is the ID of the squad.", + "schema": { + "type": "string" + } + }, + { + "name": "callId", + "required": false, + "in": "query", + "description": "This is the ID of the call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Logs" + ], + "security": [ + { + "bearer": [] + } + ] } } }, @@ -4848,7 +5050,7 @@ ] }, "message": { - "description": "This is the message the assistant will deliver to the destination party before connecting the customer.\n\nUsage:\n- Used only when `mode` is `warm-transfer-say-message` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.", + "description": "This is the message the assistant will deliver to the destination party before connecting the customer.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.", "oneOf": [ { "type": "string" @@ -4858,6 +5060,15 @@ } ] }, + "sipVerb": { + "type": "object", + "description": "This specifies the SIP verb to use while transferring the call.\n- 'refer': Uses SIP REFER to transfer the call (default)\n- 'bye': Ends current call with SIP BYE", + "default": "refer", + "enum": [ + "refer", + "bye" + ] + }, "summaryPlan": { "description": "This is the plan for generating a summary of the call to present to the destination party.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.", "allOf": [ @@ -5543,6 +5754,75 @@ "model" ] }, + "GeminiMultimodalLivePrebuiltVoiceConfig": { + "type": "object", + "properties": { + "voiceName": { + "type": "string", + "enum": [ + "Puck", + "Charon", + "Kore", + "Fenrir", + "Aoede" + ] + } + }, + "required": [ + "voiceName" + ] + }, + "GeminiMultimodalLiveVoiceConfig": { + "type": "object", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "#/components/schemas/GeminiMultimodalLivePrebuiltVoiceConfig" + } + }, + "required": [ + "prebuiltVoiceConfig" + ] + }, + "GeminiMultimodalLiveSpeechConfig": { + "type": "object", + "properties": { + "voiceConfig": { + "$ref": "#/components/schemas/GeminiMultimodalLiveVoiceConfig" + } + }, + "required": [ + "voiceConfig" + ] + }, + "GoogleRealtimeConfig": { + "type": "object", + "properties": { + "topP": { + "type": "number", + "description": "This is the nucleus sampling parameter that controls the cumulative probability of tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "topK": { + "type": "number", + "description": "This is the top-k sampling parameter that limits the number of highest probability tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "presencePenalty": { + "type": "number", + "description": "This is the presence penalty parameter that influences the model's likelihood to repeat information by penalizing tokens based on their presence in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "frequencyPenalty": { + "type": "number", + "description": "This is the frequency penalty parameter that influences the model's likelihood to repeat tokens by penalizing them based on their frequency in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "speechConfig": { + "description": "This is the speech configuration object that defines the voice settings to be used for the model's speech output.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + "allOf": [ + { + "$ref": "#/components/schemas/GeminiMultimodalLiveSpeechConfig" + } + ] + } + } + }, "GoogleModel": { "type": "object", "properties": { @@ -5613,6 +5893,8 @@ "type": "string", "description": "This is the Google model that will be used.", "enum": [ + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", "gemini-1.5-flash", "gemini-1.5-flash-002", "gemini-1.5-pro", @@ -5626,6 +5908,14 @@ "google" ] }, + "realtimeConfig": { + "description": "This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.\nOnly applicable if the model `gemini-2.0-flash-realtime-exp` is selected.", + "allOf": [ + { + "$ref": "#/components/schemas/GoogleRealtimeConfig" + } + ] + }, "temperature": { "type": "number", "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", @@ -5872,7 +6162,7 @@ "provider" ] }, - "OpenAIModel": { + "DeepSeekModel": { "type": "object", "properties": { "messages": { @@ -5938,54 +6228,160 @@ "type": "string", "description": "This is the ID of the knowledge base the model will use." }, - "provider": { + "model": { "type": "string", - "description": "This is the provider that will be used for the model.", + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "openai" + "deepseek-chat" ] }, - "model": { + "provider": { "type": "string", - "description": "This is the OpenAI model that will be used.", "enum": [ - "o1-preview", - "o1-preview-2024-09-12", - "o1-mini", - "o1-mini-2024-09-12", - "gpt-4o-realtime-preview-2024-10-01", - "gpt-4o-realtime-preview-2024-12-17", - "gpt-4o-mini-realtime-preview-2024-12-17", - "gpt-4o-mini", - "gpt-4o-mini-2024-07-18", - "gpt-4o", - "gpt-4o-2024-05-13", - "gpt-4o-2024-08-06", - "gpt-4o-2024-11-20", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-turbo-preview", - "gpt-4-0125-preview", - "gpt-4-1106-preview", - "gpt-4", - "gpt-4-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613" + "deep-seek" ] }, - "fallbackModels": { - "type": "array", - "description": "These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.", - "enum": [ - "o1-preview", - "o1-preview-2024-09-12", - "o1-mini", - "o1-mini-2024-09-12", - "gpt-4o-realtime-preview-2024-10-01", - "gpt-4o-realtime-preview-2024-12-17", + "temperature": { + "type": "number", + "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + "minimum": 50, + "maximum": 10000 + }, + "emotionRecognitionEnabled": { + "type": "boolean", + "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" + }, + "numFastTurns": { + "type": "number", + "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + "minimum": 0 + } + }, + "required": [ + "model", + "provider" + ] + }, + "OpenAIModel": { + "type": "object", + "properties": { + "messages": { + "description": "This is the starting state for the conversation.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } + }, + "tools": { + "type": "array", + "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGhlToolDTO", + "title": "GhlTool" + }, + { + "$ref": "#/components/schemas/CreateMakeToolDTO", + "title": "MakeTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferTool" + } + ] + } + }, + "toolIds": { + "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "type": "array", + "items": { + "type": "string" + } + }, + "knowledgeBase": { + "description": "These are the options for the knowledge base.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", + "title": "Custom" + } + ] + }, + "knowledgeBaseId": { + "type": "string", + "description": "This is the ID of the knowledge base the model will use." + }, + "provider": { + "type": "string", + "description": "This is the provider that will be used for the model.", + "enum": [ + "openai" + ] + }, + "model": { + "type": "string", + "description": "This is the OpenAI model that will be used.", + "enum": [ + "o1-preview", + "o1-preview-2024-09-12", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-realtime-preview-2024-10-01", + "gpt-4o-realtime-preview-2024-12-17", + "gpt-4o-mini-realtime-preview-2024-12-17", + "gpt-4o-mini", + "gpt-4o-mini-2024-07-18", + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-turbo-preview", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4", + "gpt-4-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613" + ] + }, + "fallbackModels": { + "type": "array", + "description": "These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.", + "enum": [ + "o1-preview", + "o1-preview-2024-09-12", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-realtime-preview-2024-10-01", + "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-mini-realtime-preview-2024-12-17", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", @@ -6848,6 +7244,10 @@ "$ref": "#/components/schemas/FallbackRimeAIVoice", "title": "RimeAI" }, + { + "$ref": "#/components/schemas/FallbackSmallestAIVoice", + "title": "Smallest AI" + }, { "$ref": "#/components/schemas/FallbackTavusVoice", "title": "TavusVoice" @@ -7685,6 +8085,90 @@ "voiceId" ] }, + "SmallestAIVoice": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "smallest-ai" + ] + }, + "voiceId": { + "description": "This is the provider-specific ID that will be used.", + "oneOf": [ + { + "type": "string", + "enum": [ + "emily", + "jasmine", + "arman", + "james", + "mithali", + "aravind", + "raj", + "diya", + "raman", + "ananya", + "isha", + "william", + "aarav", + "monika", + "niharika", + "deepika", + "raghav", + "kajal", + "radhika", + "mansi", + "nisha", + "saurabh", + "pooja", + "saina", + "sanya" + ], + "title": "Preset Voice Options" + }, + { + "type": "string", + "title": "Smallest AI Voice ID" + } + ] + }, + "model": { + "type": "string", + "description": "Smallest AI voice model to use. Defaults to 'lightning' when not specified.", + "enum": [ + "lightning" + ] + }, + "speed": { + "type": "number", + "description": "This is the speed multiplier that will be used.", + "example": null + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + }, + "fallbackPlan": { + "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + "allOf": [ + { + "$ref": "#/components/schemas/FallbackPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, "TavusConversationProperties": { "type": "object", "properties": { @@ -8551,6 +9035,82 @@ "voiceId" ] }, + "FallbackSmallestAIVoice": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "smallest-ai" + ] + }, + "voiceId": { + "description": "This is the provider-specific ID that will be used.", + "oneOf": [ + { + "type": "string", + "enum": [ + "emily", + "jasmine", + "arman", + "james", + "mithali", + "aravind", + "raj", + "diya", + "raman", + "ananya", + "isha", + "william", + "aarav", + "monika", + "niharika", + "deepika", + "raghav", + "kajal", + "radhika", + "mansi", + "nisha", + "saurabh", + "pooja", + "saina", + "sanya" + ], + "title": "Preset Voice Options" + }, + { + "type": "string", + "title": "Smallest AI Voice ID" + } + ] + }, + "model": { + "type": "string", + "description": "Smallest AI voice model to use. Defaults to 'lightning' when not specified.", + "enum": [ + "lightning" + ] + }, + "speed": { + "type": "number", + "description": "This is the speed multiplier that will be used.", + "example": null + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, "FallbackTavusVoice": { "type": "object", "properties": { @@ -8654,2334 +9214,1812 @@ "provider" ] }, - "TwilioVoicemailDetection": { + "CreateAnthropicCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This is the provider to use for voicemail detection.", "enum": [ - "twilio" + "anthropic" ] }, - "voicemailDetectionTypes": { - "type": "array", - "description": "These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].\n\n@default {Array} ['machine_end_beep', 'machine_end_silence']", - "enum": [ - "machine_start", - "human", - "fax", - "unknown", - "machine_end_beep", - "machine_end_silence", - "machine_end_other" - ], - "example": [ - "machine_end_beep", - "machine_end_silence" - ], - "items": { - "type": "string", - "enum": [ - "machine_start", - "human", - "fax", - "unknown", - "machine_end_beep", - "machine_end_silence", - "machine_end_other" - ] - } - }, - "enabled": { - "type": "boolean", - "description": "This sets whether the assistant should detect voicemail. Defaults to true.\n\n@default true" - }, - "machineDetectionTimeout": { - "type": "number", - "description": "The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.\n\nIncreasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.\n\nDecreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 30", - "minimum": 3, - "maximum": 59 - }, - "machineDetectionSpeechThreshold": { - "type": "number", - "description": "The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.\n\nIncreasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.\n\nDecreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 2400", - "minimum": 1000, - "maximum": 6000 - }, - "machineDetectionSpeechEndThreshold": { - "type": "number", - "description": "The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.\n\nIncreasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:\n- Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.\n- Cases where a human has two utterances separated by a period of silence (e.g. a \"Hello\", then 2000ms of silence, and another \"Hello\") may be interpreted as a machine.\n\nDecreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 1200", - "minimum": 500, - "maximum": 5000 + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." }, - "machineDetectionSilenceTimeout": { - "type": "number", - "description": "The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.\n\nIncreasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.\n\nDecreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 5000", - "minimum": 2000, - "maximum": 10000 + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } }, "required": [ - "provider" + "provider", + "apiKey" ] }, - "StructuredDataPlan": { + "CreateAnyscaleCredentialDTO": { "type": "object", "properties": { - "messages": { - "description": "These are the messages used to generate the structured data.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. DO NOT return anything except the structured data.\\n\\nJson Schema:\\\\n{{schema}}\\n\\nOnly respond with the JSON.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{schema}}: the schema of the structured data from `structuredDataPlan.schema`", - "type": "array", - "items": { - "type": "object" - } - }, - "enabled": { - "type": "boolean", - "description": "This determines whether structured data is generated and stored in `call.analysis.structuredData`. Defaults to false.\n\nUsage:\n- If you want to extract structured data, set this to true and provide a `schema`.\n\n@default false" - }, - "schema": { - "description": "This is the schema of the structured data. The output is stored in `call.analysis.structuredData`.\n\nComplete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type).", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } + "provider": { + "type": "string", + "enum": [ + "anyscale" ] }, - "timeoutSeconds": { - "type": "number", - "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.structuredData` will be empty.\n\nUsage:\n- To guarantee the structured data is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", - "minimum": 1, - "maximum": 60 + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "SuccessEvaluationPlan": { + "CreateAssemblyAICredentialDTO": { "type": "object", "properties": { - "rubric": { + "provider": { "type": "string", "enum": [ - "NumericScale", - "DescriptiveScale", - "Checklist", - "Matrix", - "PercentageScale", - "LikertScale", - "AutomaticRubric", - "PassFail" - ], - "description": "This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`.\n\nOptions include:\n- 'NumericScale': A scale of 1 to 10.\n- 'DescriptiveScale': A scale of Excellent, Good, Fair, Poor.\n- 'Checklist': A checklist of criteria and their status.\n- 'Matrix': A grid that evaluates multiple criteria across different performance levels.\n- 'PercentageScale': A scale of 0% to 100%.\n- 'LikertScale': A scale of Strongly Agree, Agree, Neutral, Disagree, Strongly Disagree.\n- 'AutomaticRubric': Automatically break down evaluation into several criteria, each with its own score.\n- 'PassFail': A simple 'true' if call passed, 'false' if not.\n\nDefault is 'PassFail'." - }, - "messages": { - "description": "These are the messages used to generate the success evaluation.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt. DO NOT return anything except the result.\\n\\nRubric:\\\\n{{rubric}}\\n\\nOnly respond with the result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here was the system prompt of the call:\\n\\n{{systemPrompt}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{rubric}}: the rubric of the success evaluation from `successEvaluationPlan.rubric`", - "type": "array", - "items": { - "type": "object" - } + "assembly-ai" + ] }, - "enabled": { - "type": "boolean", - "description": "This determines whether a success evaluation is generated and stored in `call.analysis.successEvaluation`. Defaults to true.\n\nUsage:\n- If you want to disable the success evaluation, set this to false.\n\n@default true" + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "timeoutSeconds": { - "type": "number", - "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.successEvaluation` will be empty.\n\nUsage:\n- To guarantee the success evaluation is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", - "minimum": 1, - "maximum": 60 + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "AnalysisPlan": { + "AzureBlobStorageBucketPlan": { "type": "object", "properties": { - "summaryPlan": { - "description": "This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`.", - "allOf": [ - { - "$ref": "#/components/schemas/SummaryPlan" - } - ] + "connectionString": { + "type": "string", + "description": "This is the blob storage connection string for the Azure resource." }, - "structuredDataPlan": { - "description": "This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`.", - "allOf": [ - { - "$ref": "#/components/schemas/StructuredDataPlan" - } - ] + "containerName": { + "type": "string", + "description": "This is the container name for the Azure blob storage." }, - "successEvaluationPlan": { - "description": "This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`.", - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEvaluationPlan" - } - ] + "path": { + "type": "string", + "description": "This is the path where call artifacts will be stored.\n\nUsage:\n- To store call artifacts in a specific folder, set this to the full path. Eg. \"/folder-name1/folder-name2\".\n- To store call artifacts in the root of the bucket, leave this blank.\n\n@default \"/\"" } - } + }, + "required": [ + "connectionString", + "containerName" + ] }, - "TranscriptPlan": { + "CreateAzureCredentialDTO": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines whether the transcript is stored in `call.artifact.transcript`. Defaults to true.\n\n@default true", - "example": true + "provider": { + "type": "string", + "enum": [ + "azure" + ] }, - "assistantName": { + "service": { "type": "string", - "description": "This is the name of the assistant in the transcript. Defaults to 'AI'.\n\nUsage:\n- If you want to change the name of the assistant in the transcript, set this. Example, here is what the transcript would look like with `assistantName` set to 'Buyer':\n```\nUser: Hello, how are you?\nBuyer: I'm fine.\nUser: Do you want to buy a car?\nBuyer: No.\n```\n\n@default 'AI'" + "description": "This is the service being used in Azure.", + "enum": [ + "speech", + "blob_storage" + ], + "default": "speech" }, - "userName": { + "region": { "type": "string", - "description": "This is the name of the user in the transcript. Defaults to 'User'.\n\nUsage:\n- If you want to change the name of the user in the transcript, set this. Example, here is what the transcript would look like with `userName` set to 'Seller':\n```\nSeller: Hello, how are you?\nAI: I'm fine.\nSeller: Do you want to buy a car?\nAI: No.\n```\n\n@default 'User'" - } - } - }, - "ArtifactPlan": { - "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`, explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", - "example": true + "description": "This is the region of the Azure resource.", + "enum": [ + "australia", + "canada", + "eastus2", + "eastus", + "france", + "india", + "japan", + "uaenorth", + "northcentralus", + "norway", + "southcentralus", + "swedencentral", + "switzerland", + "uk", + "westus", + "westus3" + ] }, - "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", - "example": false + "apiKey": { + "type": "string", + "description": "This is not returned in the API.", + "maxLength": 10000 }, - "transcriptPlan": { - "description": "This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false.", + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.", "allOf": [ { - "$ref": "#/components/schemas/TranscriptPlan" + "$ref": "#/components/schemas/AzureBlobStorageBucketPlan" } ] }, - "recordingPath": { + "name": { "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 recording to a specific path, set this to the path. Example: `/my-assistant-recordings`.\n- If you want to upload the recording to the root of the bucket, set this to `/`.\n\n@default '/'" + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "service" + ] }, - "MessagePlan": { + "CreateAzureOpenAICredentialDTO": { "type": "object", "properties": { - "idleMessages": { - "description": "This are the messages that the assistant will speak when the user hasn't responded for `idleTimeoutSeconds`. Each time the timeout is triggered, a random message will be chosen from this array.\n\nUsage:\n- If user gets distracted and doesn't respond for a while, this can be used to grab their attention.\n- If the transcriber doesn't pick up what the user said, this can be used to ask the user to repeat themselves. (From the perspective of the assistant, the conversation is idle since it didn't \"hear\" any user messages.)\n\n@default null (no idle message is spoken)", - "type": "array", - "items": { - "type": "string", - "maxLength": 1000 - } - }, - "idleMessageMaxSpokenCount": { - "type": "number", - "description": "This determines the maximum number of times `idleMessages` can be spoken during the call.\n\n@default 3", - "minimum": 1, - "maximum": 10 - }, - "idleTimeoutSeconds": { - "type": "number", - "description": "This is the timeout in seconds before a message from `idleMessages` is spoken. The clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 10", - "minimum": 5, - "maximum": 30 - } - } - }, - "AssistantCustomEndpointingRule": { - "type": "object", - "properties": { - "type": { + "provider": { "type": "string", - "description": "This endpointing rule is based on the last assistant message before customer started speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you have yes/no questions in your use case like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.", "enum": [ - "assistant" + "azure-openai" ] }, - "regex": { + "region": { "type": "string", - "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + "enum": [ + "australia", + "canada", + "eastus2", + "eastus", + "france", + "india", + "japan", + "uaenorth", + "northcentralus", + "norway", + "southcentralus", + "swedencentral", + "switzerland", + "uk", + "westus", + "westus3" + ] }, - "regexOptions": { - "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", + "models": { "type": "array", + "enum": [ + "gpt-4o-2024-08-06", + "gpt-4o-mini-2024-07-18", + "gpt-4o-2024-05-13", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4-0613", + "gpt-35-turbo-0125", + "gpt-35-turbo-1106" + ], + "example": [ + "gpt-4-0125-preview", + "gpt-4-0613" + ], "items": { - "$ref": "#/components/schemas/RegexOption" + "type": "string", + "enum": [ + "gpt-4o-2024-08-06", + "gpt-4o-mini-2024-07-18", + "gpt-4o-2024-05-13", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4-0613", + "gpt-35-turbo-0125", + "gpt-35-turbo-1106" + ] } }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 - } - }, - "required": [ - "type", - "regex", - "timeoutSeconds" - ] - }, - "CustomerCustomEndpointingRule": { - "type": "object", - "properties": { - "type": { + "openAIKey": { "type": "string", - "description": "This endpointing rule is based on current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the current customer transcription\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", - "enum": [ - "customer" - ] + "maxLength": 10000, + "description": "This is not returned in the API." }, - "regex": { + "ocpApimSubscriptionKey": { "type": "string", - "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + "description": "This is not returned in the API." }, - "regexOptions": { - "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } + "openAIEndpoint": { + "type": "string", + "maxLength": 10000 }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } }, "required": [ - "type", - "regex", - "timeoutSeconds" + "provider", + "region", + "models", + "openAIKey", + "openAIEndpoint" ] }, - "BothCustomEndpointingRule": { + "SipTrunkGateway": { "type": "object", "properties": { - "type": { + "ip": { "type": "string", - "description": "This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message and the current customer transcription\n- If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", - "enum": [ - "both" - ] + "description": "This is the address of the gateway. It can be an IPv4 address like 1.1.1.1 or a fully qualified domain name like my-sip-trunk.pstn.twilio.com." }, - "assistantRegex": { - "type": "string", - "description": "This is the regex pattern to match the assistant's message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + "port": { + "type": "number", + "description": "This is the port number of the gateway. Default is 5060.\n\n@default 5060", + "minimum": 1, + "maximum": 65535 }, - "assistantRegexOptions": { - "description": "These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } + "netmask": { + "type": "number", + "description": "This is the netmask of the gateway. Defaults to 32.\n\n@default 32", + "minimum": 24, + "maximum": 32 }, - "customerRegex": { - "type": "string" + "inboundEnabled": { + "type": "boolean", + "description": "This is whether inbound calls are allowed from this gateway. Default is true.\n\n@default true" }, - "customerRegexOptions": { - "description": "These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } + "outboundEnabled": { + "type": "boolean", + "description": "This is whether outbound calls should be sent to this gateway. Default is true.\n\nNote, if netmask is less than 32, it doesn't affect the outbound IPs that are tried. 1 attempt is made to `ip:port`.\n\n@default true" }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 + "outboundProtocol": { + "type": "string", + "description": "This is the protocol to use for SIP signaling outbound calls. Default is udp.\n\n@default udp", + "enum": [ + "tls/srtp", + "tcp", + "tls", + "udp" + ] + }, + "optionsPingEnabled": { + "type": "boolean", + "description": "This is whether to send options ping to the gateway. This can be used to check if the gateway is reachable. Default is false.\n\nThis is useful for high availability setups where you want to check if the gateway is reachable before routing calls to it. Note, if no gateway for a trunk is reachable, outbound calls will be rejected.\n\n@default false" } }, "required": [ - "type", - "assistantRegex", - "customerRegex", - "timeoutSeconds" + "ip" ] }, - "TranscriptionEndpointingPlan": { + "SipTrunkOutboundSipRegisterPlan": { "type": "object", "properties": { - "onPunctuationSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", - "minimum": 0, - "maximum": 3, - "example": 0.1 + "domain": { + "type": "string" }, - "onNoPunctuationSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", - "minimum": 0, - "maximum": 3, - "example": 1.5 + "username": { + "type": "string" }, - "onNumberSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", - "minimum": 0, - "maximum": 3, - "example": 0.5 + "realm": { + "type": "string" } } }, - "StartSpeakingPlan": { + "SipTrunkOutboundAuthenticationPlan": { "type": "object", "properties": { - "waitSeconds": { - "type": "number", - "description": "This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", - "minimum": 0, - "maximum": 5, - "example": 0.4 + "authPassword": { + "type": "string", + "description": "This is not returned in the API." }, - "smartEndpointingEnabled": { - "type": "boolean", - "description": "This determines if a customer speech is considered done (endpointing) using a Vapi custom-trained model on customer's speech. This is good for middle-of-thought detection.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nUsage:\n- If your conversations are long-form and you want assistant to wait smartly even if customer pauses for a bit to think, you can use this instead.\n\nThis overrides `transcriptionEndpointingPlan`.\n\n@default false", - "example": false + "authUsername": { + "type": "string" }, - "customEndpointingRules": { - "type": "array", - "description": "These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.\n\nUsage:\n- If you have yes/no questions like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese override `transcriptionEndpointingPlan` and `smartEndpointingEnabled` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\n@default []", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssistantCustomEndpointingRule", - "title": "Assistant" - }, - { - "$ref": "#/components/schemas/CustomerCustomEndpointingRule", - "title": "Customer" - }, - { - "$ref": "#/components/schemas/BothCustomEndpointingRule", - "title": "Both" - } - ] + "sipRegisterPlan": { + "description": "This can be used to configure if SIP register is required by the SIP trunk. If not provided, no SIP registration will be attempted.", + "allOf": [ + { + "$ref": "#/components/schemas/SipTrunkOutboundSipRegisterPlan" + } + ] + } + } + }, + "SbcConfiguration": { + "type": "object", + "properties": {} + }, + "CreateByoSipTrunkCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This can be used to bring your own SIP trunks or to connect to a Carrier.", + "enum": [ + "byo-sip-trunk" + ] + }, + "gateways": { + "description": "This is the list of SIP trunk's gateways.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SipTrunkGateway" } }, - "transcriptionEndpointingPlan": { - "description": "This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.", + "outboundAuthenticationPlan": { + "description": "This can be used to configure the outbound authentication if required by the SIP trunk.", "allOf": [ { - "$ref": "#/components/schemas/TranscriptionEndpointingPlan" + "$ref": "#/components/schemas/SipTrunkOutboundAuthenticationPlan" + } + ] + }, + "outboundLeadingPlusEnabled": { + "type": "boolean", + "description": "This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false" + }, + "techPrefix": { + "type": "string", + "description": "This can be used to configure the tech prefix on outbound calls. This is an advanced property.", + "maxLength": 10000 + }, + "sipDiversionHeader": { + "type": "string", + "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", + "maxLength": 10000 + }, + "sbcConfiguration": { + "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", + "allOf": [ + { + "$ref": "#/components/schemas/SbcConfiguration" } ] + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "gateways" + ] }, - "StopSpeakingPlan": { + "CreateCartesiaCredentialDTO": { "type": "object", "properties": { - "numWords": { - "type": "number", - "description": "This is the number of words that the customer has to say before the assistant will stop talking.\n\nWords like \"stop\", \"actually\", \"no\", etc. will always interrupt immediately regardless of this value.\n\nWords like \"okay\", \"yeah\", \"right\" will never interrupt.\n\nWhen set to 0, `voiceSeconds` is used in addition to the transcriptions to determine the customer has started speaking.\n\nDefaults to 0.\n\n@default 0", - "minimum": 0, - "maximum": 10, - "example": 0 + "provider": { + "type": "string", + "enum": [ + "cartesia" + ] }, - "voiceSeconds": { - "type": "number", - "description": "This is the seconds customer has to speak before the assistant stops talking. This uses the VAD (Voice Activity Detection) spike to determine if the customer has started speaking.\n\nConsiderations:\n- A lower value might be more responsive but could potentially pick up non-speech sounds.\n- A higher value reduces false positives but might slightly delay the detection of speech onset.\n\nThis is only used if `numWords` is set to 0.\n\nDefaults to 0.2\n\n@default 0.2", - "minimum": 0, - "maximum": 0.5, - "example": 0.2 + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "backoffSeconds": { - "type": "number", - "description": "This is the seconds to wait before the assistant will start talking again after being interrupted.\n\nDefaults to 1.\n\n@default 1", - "minimum": 0, - "maximum": 10, - "example": 1 + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "MonitorPlan": { + "CloudflareR2BucketPlan": { "type": "object", "properties": { - "listenEnabled": { - "type": "boolean", - "description": "This determines whether the assistant's calls allow live listening. Defaults to true.\n\nFetch `call.monitor.listenUrl` to get the live listening URL.\n\n@default true", - "example": false + "accessKeyId": { + "type": "string", + "description": "Cloudflare R2 Access key ID." }, - "controlEnabled": { - "type": "boolean", - "description": "This determines whether the assistant's calls allow live control. Defaults to true.\n\nFetch `call.monitor.controlUrl` to get the live control URL.\n\nTo use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message\n\n@default true", - "example": false + "secretAccessKey": { + "type": "string", + "description": "Cloudflare R2 access key secret. This is not returned in the API." + }, + "url": { + "type": "string", + "description": "Cloudflare R2 base url." + }, + "name": { + "type": "string", + "description": "This is the name of the bucket." + }, + "path": { + "type": "string", + "description": "This is the path where call artifacts will be stored.\n\nUsage:\n- To store call artifacts in a specific folder, set this to the full path. Eg. \"/folder-name1/folder-name2\".\n- To store call artifacts in the root of the bucket, leave this blank.\n\n@default \"/\"" } - } + }, + "required": [ + "name" + ] }, - "CreateAssistantDTO": { + "CreateCloudflareCredentialDTO": { "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/GladiaTranscriber", - "title": "Gladia" - }, + "provider": { + "type": "string", + "enum": [ + "cloudflare" + ], + "description": "Credential provider. Only allowed value is cloudflare" + }, + "accountId": { + "type": "string", + "description": "Cloudflare Account Id." + }, + "apiKey": { + "type": "string", + "description": "Cloudflare API Key / Token." + }, + "accountEmail": { + "type": "string", + "description": "Cloudflare Account Email." + }, + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in R2", + "allOf": [ { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "Talkscriber" + "$ref": "#/components/schemas/CloudflareR2BucketPlan" } ] }, - "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/CustomLLMModel", - "title": "CustomLLM" - }, - { - "$ref": "#/components/schemas/DeepInfraModel", - "title": "DeepInfra" - }, - { - "$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" - } + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider" + ] + }, + "OAuth2AuthenticationPlan": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" ] }, - "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/LMNTVoice", - "title": "LMNT" - }, - { - "$ref": "#/components/schemas/NeetsVoice", - "title": "Neets" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHT" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAI" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - } - ], - "default": { - "provider": "playht", - "voiceId": "jennifer" - } - }, - "firstMessage": { + "url": { "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?" + "description": "This is the OAuth2 URL." }, - "firstMessageMode": { + "clientId": { "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" - }, - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", - "example": false - }, - "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" - ], - "example": [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input" - ], - "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. 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" - ] - } - }, - "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", - "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", - "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 + "description": "This is the OAuth2 client ID." }, - "backgroundSound": { + "clientSecret": { + "type": "string", + "description": "This is the OAuth2 client secret." + } + }, + "required": [ + "type", + "url", + "clientId", + "clientSecret" + ] + }, + "CreateCustomLLMCredentialDTO": { + "type": "object", + "properties": { + "provider": { "type": "string", - "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.", "enum": [ - "off", - "office" - ], - "example": "office" - }, - "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" - } - ] - } + "custom-llm" + ] }, - "name": { + "apiKey": { "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 + "maxLength": 10000, + "description": "This is not returned in the API." }, - "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.", + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", "allOf": [ { - "$ref": "#/components/schemas/TwilioVoicemailDetection" + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" } ] }, - "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": { + "name": { "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 + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateDeepgramCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "deepgram" + ] }, - "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 - } + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the assistant." + "apiUrl": { + "type": "string", + "description": "This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com." }, - "analysisPlan": { - "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", - "allOf": [ - { - "$ref": "#/components/schemas/AnalysisPlan" - } + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateDeepInfraCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "deepinfra" ] }, - "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/ArtifactPlan" - } + "apiKey": { + "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.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateDeepSeekCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "deep-seek" ] }, - "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/MessagePlan" - } + "apiKey": { + "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.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateElevenLabsCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "11labs" ] }, - "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/StartSpeakingPlan" - } + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "GcpKey": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of the key. Most likely, this is \"service_account\"." + }, + "projectId": { + "type": "string", + "description": "This is the ID of the Google Cloud project associated with this key." + }, + "privateKeyId": { + "type": "string", + "description": "This is the unique identifier for the private key." + }, + "privateKey": { + "type": "string", + "description": "This is the private key in PEM format.\n\nNote: This is not returned in the API." + }, + "clientEmail": { + "type": "string", + "description": "This is the email address associated with the service account." + }, + "clientId": { + "type": "string", + "description": "This is the unique identifier for the client." + }, + "authUri": { + "type": "string", + "description": "This is the URI for the auth provider's authorization endpoint." + }, + "tokenUri": { + "type": "string", + "description": "This is the URI for the auth provider's token endpoint." + }, + "authProviderX509CertUrl": { + "type": "string", + "description": "This is the URL of the public x509 certificate for the auth provider." + }, + "clientX509CertUrl": { + "type": "string", + "description": "This is the URL of the public x509 certificate for the client." + }, + "universeDomain": { + "type": "string", + "description": "This is the domain associated with the universe this service account belongs to." + } + }, + "required": [ + "type", + "projectId", + "privateKeyId", + "privateKey", + "clientEmail", + "clientId", + "authUri", + "tokenUri", + "authProviderX509CertUrl", + "clientX509CertUrl", + "universeDomain" + ] + }, + "BucketPlan": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the bucket." + }, + "region": { + "type": "string", + "description": "This is the region of the bucket.\n\nUsage:\n- If `credential.type` is `aws`, then this is required.\n- If `credential.type` is `gcp`, then this is optional since GCP allows buckets to be accessed without a region but region is required for data residency requirements. Read here: https://cloud.google.com/storage/docs/request-endpoints" + }, + "path": { + "type": "string", + "description": "This is the path where call artifacts will be stored.\n\nUsage:\n- To store call artifacts in a specific folder, set this to the full path. Eg. \"/folder-name1/folder-name2\".\n- To store call artifacts in the root of the bucket, leave this blank.\n\n@default \"/\"" + }, + "hmacAccessKey": { + "type": "string", + "description": "This is the HMAC access key offered by GCP for interoperability with S3 clients. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console\n\nUsage:\n- If `credential.type` is `gcp`, then this is required.\n- If `credential.type` is `aws`, then this is not required since credential.awsAccessKeyId is used instead." + }, + "hmacSecret": { + "type": "string", + "description": "This is the secret for the HMAC access key. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console\n\nUsage:\n- If `credential.type` is `gcp`, then this is required.\n- If `credential.type` is `aws`, then this is not required since credential.awsSecretAccessKey is used instead.\n\nNote: This is not returned in the API." + } + }, + "required": [ + "name" + ] + }, + "CreateGcpCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "gcp" ] }, - "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.", + "gcpKey": { + "description": "This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", "allOf": [ { - "$ref": "#/components/schemas/StopSpeakingPlan" + "$ref": "#/components/schemas/GcpKey" } ] }, - "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", + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in GCP.", "allOf": [ { - "$ref": "#/components/schemas/MonitorPlan" + "$ref": "#/components/schemas/BucketPlan" } ] }, - "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "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" - } - ] + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "gcpKey" + ] }, - "AssistantOverrides": { + "CreateGladiaCredentialDTO": { "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/GladiaTranscriber", - "title": "Gladia" - }, - { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "Talkscriber" - } + "provider": { + "type": "string", + "enum": [ + "gladia" ] }, - "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/CustomLLMModel", - "title": "CustomLLM" - }, - { - "$ref": "#/components/schemas/DeepInfraModel", - "title": "DeepInfra" - }, - { - "$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" - } - ] + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "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/LMNTVoice", - "title": "LMNT" - }, - { - "$ref": "#/components/schemas/NeetsVoice", - "title": "Neets" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHT" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAI" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - } - ], - "default": { - "provider": "playht", - "voiceId": "jennifer" - } + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateGoHighLevelCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "gohighlevel" + ] }, - "firstMessage": { + "apiKey": { "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?" + "description": "This is not returned in the API." }, - "firstMessageMode": { + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateGroqCredentialDTO": { + "type": "object", + "properties": { + "provider": { "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" + "groq" + ] }, - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", - "example": false + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "clientMessages": { - "type": "array", + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateLangfuseCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "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" - ], - "example": [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input" - ], - "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. 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" - ] - } + "langfuse" + ] }, - "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", - "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", - "tool-calls", - "transfer-destination-request", - "transfer-update", - "user-interrupted", - "voice-input" - ] - } + "publicKey": { + "type": "string", + "description": "The public key for Langfuse project. Eg: pk-lf-..." }, - "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 + "apiKey": { + "type": "string", + "description": "The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API." }, - "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 + "apiUrl": { + "type": "string", + "description": "The host URL for Langfuse project. Eg: https://cloud.langfuse.com" }, - "backgroundSound": { + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "publicKey", + "apiKey", + "apiUrl" + ] + }, + "CreateLmntCredentialDTO": { + "type": "object", + "properties": { + "provider": { "type": "string", - "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.", "enum": [ - "off", - "office" - ], - "example": "office" - }, - "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" - } - ] - } + "lmnt" + ] }, - "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" + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, "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.", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, "maxLength": 40 - }, - "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.", - "allOf": [ - { - "$ref": "#/components/schemas/TwilioVoicemailDetection" - } + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateMakeCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "make" ] }, - "voicemailMessage": { + "teamId": { "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 + "description": "Team ID" }, - "endCallMessage": { + "region": { "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 - } + "description": "Region of your application. For example: eu1, eu2, us1, us2" }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the assistant." + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "analysisPlan": { - "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", - "allOf": [ - { - "$ref": "#/components/schemas/AnalysisPlan" - } + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "teamId", + "region", + "apiKey" + ] + }, + "CreateOpenAICredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "openai" ] }, - "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/ArtifactPlan" - } - ] + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "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/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/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/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/MonitorPlan" - } - ] - }, - "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "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" - } - ] + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "SquadMemberDTO": { + "CreateOpenRouterCredentialDTO": { "type": "object", "properties": { - "assistantId": { + "provider": { "type": "string", - "nullable": true, - "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." - }, - "assistant": { - "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } + "enum": [ + "openrouter" ] }, - "assistantOverrides": { - "description": "This can be used to override the assistant's settings and provide values for it's template variables.", - "allOf": [ - { - "$ref": "#/components/schemas/AssistantOverrides" - } - ] + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "assistantDestinations": { - "description": "These are the others assistants that this assistant can transfer to.\n\nIf the assistant already has transfer call tool, these destinations are just appended to existing ones.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferDestinationAssistant" - } + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "CreateSquadDTO": { + "CreatePerplexityAICredentialDTO": { "type": "object", "properties": { - "name": { + "provider": { "type": "string", - "description": "This is the name of the squad." + "enum": [ + "perplexity-ai" + ] }, - "members": { - "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SquadMemberDTO" - } + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "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.", - "allOf": [ - { - "$ref": "#/components/schemas/AssistantOverrides" - } - ] + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } }, "required": [ - "members" + "provider", + "apiKey" ] }, - "ImportTwilioPhoneNumberDTO": { + "CreatePlayHTCredentialDTO": { "type": "object", "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] - }, - "twilioPhoneNumber": { + "provider": { "type": "string", - "description": "These are the digits of the phone number you own on your Twilio.", - "deprecated": true + "enum": [ + "playht" + ] }, - "twilioAccountSid": { + "apiKey": { "type": "string", - "description": "This is your Twilio Account SID that will be used to handle this phone number." + "description": "This is not returned in the API." }, - "twilioAuthToken": { - "type": "string", - "description": "This is the Twilio Auth Token that will be used to handle this phone number." + "userId": { + "type": "string" }, "name": { "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, "maxLength": 40 - }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "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\n2. phoneNumber.server\n3. org.server", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] } }, "required": [ - "twilioPhoneNumber", - "twilioAccountSid", - "twilioAuthToken" + "provider", + "apiKey", + "userId" ] }, - "CreateCustomerDTO": { + "CreateRimeAICredentialDTO": { "type": "object", "properties": { - "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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", - "default": true + "provider": { + "type": "string", + "enum": [ + "rime-ai" + ] }, - "extension": { + "apiKey": { "type": "string", - "description": "This is the extension that will be dialed after the call is answered.", - "maxLength": 10, - "example": null + "description": "This is not returned in the API." }, - "number": { + "name": { "type": "string", - "description": "This is the number of the customer.", - "minLength": 3, + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, + "CreateRunpodCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "runpod" + ] }, - "sipUri": { + "apiKey": { "type": "string", - "description": "This is the SIP URI of the customer." + "description": "This is not returned in the API." }, "name": { "type": "string", - "description": "This is the name of the customer. This is just for your own reference.\n\nFor SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" `.", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "CreateCallDTO": { + "CreateS3CredentialDTO": { "type": "object", "properties": { - "name": { + "provider": { "type": "string", - "description": "This is the name of the call. This is just for your own reference.", - "maxLength": 40 + "enum": [ + "s3" + ], + "description": "Credential provider. Only allowed value is s3" }, - "assistantId": { + "awsAccessKeyId": { "type": "string", - "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." + "description": "AWS access key ID." }, - "assistant": { - "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] + "awsSecretAccessKey": { + "type": "string", + "description": "AWS access key secret. This is not returned in the API." }, - "assistantOverrides": { - "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", - "allOf": [ - { - "$ref": "#/components/schemas/AssistantOverrides" - } - ] - }, - "squadId": { + "region": { "type": "string", - "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." + "description": "AWS region in which the S3 bucket is located." }, - "squad": { - "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateSquadDTO" - } - ] + "s3BucketName": { + "type": "string", + "description": "AWS S3 bucket name." }, - "phoneNumberId": { + "s3PathPrefix": { "type": "string", - "description": "This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + "description": "The path prefix for the uploaded recording. Ex. \"recordings/\"" }, - "phoneNumber": { - "description": "This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "allOf": [ - { - "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" - } + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "awsAccessKeyId", + "awsSecretAccessKey", + "region", + "s3BucketName", + "s3PathPrefix" + ] + }, + "CreateSmallestAICredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "smallest-ai" ] }, - "customerId": { + "apiKey": { "type": "string", - "description": "This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + "description": "This is not returned in the API." }, - "customer": { - "description": "This is the customer that will be called. To call an existing customer, use `customerId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateCustomerDTO" - } - ] + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "AnalysisCostBreakdown": { + "CreateTavusCredentialDTO": { "type": "object", "properties": { - "summary": { - "type": "number", - "description": "This is the cost to summarize the call." - }, - "summaryPromptTokens": { - "type": "number", - "description": "This is the number of prompt tokens used to summarize the call." - }, - "summaryCompletionTokens": { - "type": "number", - "description": "This is the number of completion tokens used to summarize the call." - }, - "structuredData": { - "type": "number", - "description": "This is the cost to extract structured data from the call." - }, - "structuredDataPromptTokens": { - "type": "number", - "description": "This is the number of prompt tokens used to extract structured data from the call." - }, - "structuredDataCompletionTokens": { - "type": "number", - "description": "This is the number of completion tokens used to extract structured data from the call." - }, - "successEvaluation": { - "type": "number", - "description": "This is the cost to evaluate if the call was successful." + "provider": { + "type": "string", + "enum": [ + "tavus" + ] }, - "successEvaluationPromptTokens": { - "type": "number", - "description": "This is the number of prompt tokens used to evaluate if the call was successful." + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "successEvaluationCompletionTokens": { - "type": "number", - "description": "This is the number of completion tokens used to evaluate if the call was successful." + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "CostBreakdown": { + "CreateTogetherAICredentialDTO": { "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." - }, - "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." + "provider": { + "type": "string", + "enum": [ + "together-ai" + ] }, - "ttsCharacters": { - "type": "number", - "description": "This is the TTS characters used for the call." + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, - "analysisCostBreakdown": { - "description": "This is the cost of the analysis.", - "allOf": [ - { - "$ref": "#/components/schemas/AnalysisCostBreakdown" - } - ] + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "Analysis": { + "CreateTwilioCredentialDTO": { "type": "object", "properties": { - "summary": { + "provider": { "type": "string", - "description": "This is the summary of the call. Customize by setting `assistant.analysisPlan.summaryPrompt`." + "enum": [ + "twilio" + ] }, - "structuredData": { - "type": "object", - "description": "This is the structured data extracted from the call. Customize by setting `assistant.analysisPlan.structuredDataPrompt` and/or `assistant.analysisPlan.structuredDataSchema`." + "authToken": { + "type": "string", + "description": "This is not returned in the API." }, - "successEvaluation": { + "accountSid": { + "type": "string" + }, + "name": { "type": "string", - "description": "This is the evaluation of the call. Customize by setting `assistant.analysisPlan.successEvaluationPrompt` and/or `assistant.analysisPlan.successEvaluationRubric`." + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "authToken", + "accountSid" + ] }, - "Monitor": { + "CreateVonageCredentialDTO": { "type": "object", "properties": { - "listenUrl": { + "provider": { "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`." + "enum": [ + "vonage" + ] }, - "controlUrl": { + "apiSecret": { "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`." + "description": "This is not returned in the API." + }, + "apiKey": { + "type": "string" + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiSecret", + "apiKey" + ] }, - "Artifact": { + "CreateWebhookCredentialDTO": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that were spoken during the call.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage", - "title": "UserMessage" - }, - { - "$ref": "#/components/schemas/SystemMessage", - "title": "SystemMessage" - }, - { - "$ref": "#/components/schemas/BotMessage", - "title": "BotMessage" - }, - { - "$ref": "#/components/schemas/ToolCallMessage", - "title": "ToolCallMessage" - }, - { - "$ref": "#/components/schemas/ToolCallResultMessage", - "title": "ToolCallResultMessage" - } - ] - } - }, - "messagesOpenAIFormatted": { - "description": "These are the messages that were spoken during the call, formatted for OpenAI.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } - }, - "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": { + "provider": { "type": "string", - "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`." + "enum": [ + "webhook" + ] }, - "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." + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749.", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + } + ] }, - "transcript": { + "name": { "type": "string", - "description": "This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience." + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "authenticationPlan" + ] }, - "Transport": { + "CreateXAiCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This is the provider used for the call.", + "description": "This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai", "enum": [ - "twilio", - "vonage", - "vapi", - "daily" + "xai" ] }, - "assistantVideoEnabled": { - "type": "boolean", - "description": "This is determines whether the assistant will have video enabled.\n\nOnly relevant for `webCall` type." + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 } - } + }, + "required": [ + "provider", + "apiKey" + ] }, - "Call": { + "TwilioVoicemailDetection": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This is the type of call.", + "description": "This is the provider to use for voicemail detection.", "enum": [ - "inboundPhoneCall", - "outboundPhoneCall", - "webCall" + "twilio" ] }, - "costs": { + "voicemailDetectionTypes": { "type": "array", - "description": "These are the costs of individual components of the call in USD.", + "description": "These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].\n\n@default {Array} ['machine_end_beep', 'machine_end_silence']", + "enum": [ + "machine_start", + "human", + "fax", + "unknown", + "machine_end_beep", + "machine_end_silence", + "machine_end_other" + ], + "example": [ + "machine_end_beep", + "machine_end_silence" + ], "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransportCost", - "title": "TransportCost" - }, - { - "$ref": "#/components/schemas/TranscriberCost", - "title": "TranscriberCost" - }, - { - "$ref": "#/components/schemas/ModelCost", - "title": "ModelCost" - }, - { - "$ref": "#/components/schemas/VoiceCost", - "title": "VoiceCost" - }, - { - "$ref": "#/components/schemas/VapiCost", - "title": "VapiCost" - }, - { - "$ref": "#/components/schemas/AnalysisCost", - "title": "AnalysisCost" - } + "type": "string", + "enum": [ + "machine_start", + "human", + "fax", + "unknown", + "machine_end_beep", + "machine_end_silence", + "machine_end_other" ] } }, + "enabled": { + "type": "boolean", + "description": "This sets whether the assistant should detect voicemail. Defaults to true.\n\n@default true" + }, + "machineDetectionTimeout": { + "type": "number", + "description": "The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.\n\nIncreasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.\n\nDecreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 30", + "minimum": 3, + "maximum": 59 + }, + "machineDetectionSpeechThreshold": { + "type": "number", + "description": "The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.\n\nIncreasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.\n\nDecreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 2400", + "minimum": 1000, + "maximum": 6000 + }, + "machineDetectionSpeechEndThreshold": { + "type": "number", + "description": "The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.\n\nIncreasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:\n- Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.\n- Cases where a human has two utterances separated by a period of silence (e.g. a \"Hello\", then 2000ms of silence, and another \"Hello\") may be interpreted as a machine.\n\nDecreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 1200", + "minimum": 500, + "maximum": 5000 + }, + "machineDetectionSilenceTimeout": { + "type": "number", + "description": "The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.\n\nIncreasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.\n\nDecreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 5000", + "minimum": 2000, + "maximum": 10000 + } + }, + "required": [ + "provider" + ] + }, + "StructuredDataPlan": { + "type": "object", + "properties": { "messages": { + "description": "These are the messages used to generate the structured data.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. DO NOT return anything except the structured data.\\n\\nJson Schema:\\\\n{{schema}}\\n\\nOnly respond with the JSON.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{schema}}: the schema of the structured data from `structuredDataPlan.schema`", "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage", - "title": "UserMessage" - }, - { - "$ref": "#/components/schemas/SystemMessage", - "title": "SystemMessage" - }, - { - "$ref": "#/components/schemas/BotMessage", - "title": "BotMessage" - }, - { - "$ref": "#/components/schemas/ToolCallMessage", - "title": "ToolCallMessage" - }, - { - "$ref": "#/components/schemas/ToolCallResultMessage", - "title": "ToolCallResultMessage" - } - ] + "type": "object" } }, - "phoneCallProvider": { - "type": "string", - "description": "This is the provider of the call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "enum": [ - "twilio", - "vonage", - "vapi" - ] + "enabled": { + "type": "boolean", + "description": "This determines whether structured data is generated and stored in `call.analysis.structuredData`. Defaults to false.\n\nUsage:\n- If you want to extract structured data, set this to true and provide a `schema`.\n\n@default false" }, - "phoneCallTransport": { - "type": "string", - "description": "This is the transport of the phone call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "enum": [ - "sip", - "pstn" + "schema": { + "description": "This is the schema of the structured data. The output is stored in `call.analysis.structuredData`.\n\nComplete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type).", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } ] }, - "status": { + "timeoutSeconds": { + "type": "number", + "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.structuredData` will be empty.\n\nUsage:\n- To guarantee the structured data is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + "minimum": 1, + "maximum": 60 + } + } + }, + "SuccessEvaluationPlan": { + "type": "object", + "properties": { + "rubric": { "type": "string", - "description": "This is the status of the call.", "enum": [ - "queued", - "ringing", - "in-progress", - "forwarding", - "ended" - ] - }, - "endedReason": { - "type": "string", - "description": "This is the explanation for how the call ended.", - "enum": [ - "assistant-not-invalid", - "assistant-not-provided", - "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", - "assistant-ended-call", - "assistant-said-end-call-phrase", - "assistant-forwarded-call", - "assistant-join-timed-out", - "customer-busy", - "customer-ended-call", - "customer-did-not-answer", - "customer-did-not-give-microphone-permission", - "assistant-said-message-with-end-call-enabled", - "exceeded-max-duration", - "manually-canceled", - "phone-call-provider-closed-websocket", - "db-error", - "assistant-not-found", - "license-check-failed", - "pipeline-error-openai-voice-failed", - "pipeline-error-cartesia-voice-failed", - "pipeline-error-deepgram-voice-failed", - "pipeline-error-eleven-labs-voice-failed", - "pipeline-error-playht-voice-failed", - "pipeline-error-lmnt-voice-failed", - "pipeline-error-azure-voice-failed", - "pipeline-error-rime-ai-voice-failed", - "pipeline-error-neets-voice-failed", - "pipeline-error-deepgram-transcriber-failed", - "pipeline-error-gladia-transcriber-failed", - "pipeline-error-assembly-ai-transcriber-failed", - "pipeline-error-talkscriber-transcriber-failed", - "pipeline-error-azure-speech-transcriber-failed", - "pipeline-error-vapi-llm-failed", - "pipeline-error-vapi-400-bad-request-validation-failed", - "pipeline-error-vapi-401-unauthorized", - "pipeline-error-vapi-403-model-access-denied", - "pipeline-error-vapi-429-exceeded-quota", - "pipeline-error-vapi-500-server-error", - "pipeline-no-available-model", - "worker-shutdown", - "unknown-error", - "vonage-disconnected", - "vonage-failed-to-connect-call", - "phone-call-provider-bypass-enabled-but-no-call-received", - "vapifault-phone-call-worker-setup-socket-error", - "vapifault-phone-call-worker-worker-setup-socket-timeout", - "vapifault-phone-call-worker-could-not-find-call", - "vapifault-transport-never-connected", - "vapifault-web-call-worker-setup-failed", - "vapifault-transport-connected-but-call-not-active", - "vapifault-call-started-but-connection-to-transport-missing", - "pipeline-error-openai-llm-failed", - "pipeline-error-azure-openai-llm-failed", - "pipeline-error-groq-llm-failed", - "pipeline-error-google-llm-failed", - "pipeline-error-xai-llm-failed", - "pipeline-error-inflection-ai-llm-failed", - "pipeline-error-openai-400-bad-request-validation-failed", - "pipeline-error-openai-401-unauthorized", - "pipeline-error-openai-403-model-access-denied", - "pipeline-error-openai-429-exceeded-quota", - "pipeline-error-openai-500-server-error", - "pipeline-error-google-400-bad-request-validation-failed", - "pipeline-error-google-401-unauthorized", - "pipeline-error-google-403-model-access-denied", - "pipeline-error-google-429-exceeded-quota", - "pipeline-error-google-500-server-error", - "pipeline-error-xai-400-bad-request-validation-failed", - "pipeline-error-xai-401-unauthorized", - "pipeline-error-xai-403-model-access-denied", - "pipeline-error-xai-429-exceeded-quota", - "pipeline-error-xai-500-server-error", - "pipeline-error-inflection-ai-400-bad-request-validation-failed", - "pipeline-error-inflection-ai-401-unauthorized", - "pipeline-error-inflection-ai-403-model-access-denied", - "pipeline-error-inflection-ai-429-exceeded-quota", - "pipeline-error-inflection-ai-500-server-error", - "pipeline-error-azure-openai-400-bad-request-validation-failed", - "pipeline-error-azure-openai-401-unauthorized", - "pipeline-error-azure-openai-403-model-access-denied", - "pipeline-error-azure-openai-429-exceeded-quota", - "pipeline-error-azure-openai-500-server-error", - "pipeline-error-groq-400-bad-request-validation-failed", - "pipeline-error-groq-401-unauthorized", - "pipeline-error-groq-403-model-access-denied", - "pipeline-error-groq-429-exceeded-quota", - "pipeline-error-groq-500-server-error", - "pipeline-error-anthropic-400-bad-request-validation-failed", - "pipeline-error-anthropic-401-unauthorized", - "pipeline-error-anthropic-403-model-access-denied", - "pipeline-error-anthropic-429-exceeded-quota", - "pipeline-error-anthropic-500-server-error", - "pipeline-error-anthropic-llm-failed", - "pipeline-error-together-ai-400-bad-request-validation-failed", - "pipeline-error-together-ai-401-unauthorized", - "pipeline-error-together-ai-403-model-access-denied", - "pipeline-error-together-ai-429-exceeded-quota", - "pipeline-error-together-ai-500-server-error", - "pipeline-error-together-ai-llm-failed", - "pipeline-error-anyscale-400-bad-request-validation-failed", - "pipeline-error-anyscale-401-unauthorized", - "pipeline-error-anyscale-403-model-access-denied", - "pipeline-error-anyscale-429-exceeded-quota", - "pipeline-error-anyscale-500-server-error", - "pipeline-error-anyscale-llm-failed", - "pipeline-error-openrouter-400-bad-request-validation-failed", - "pipeline-error-openrouter-401-unauthorized", - "pipeline-error-openrouter-403-model-access-denied", - "pipeline-error-openrouter-429-exceeded-quota", - "pipeline-error-openrouter-500-server-error", - "pipeline-error-openrouter-llm-failed", - "pipeline-error-perplexity-ai-400-bad-request-validation-failed", - "pipeline-error-perplexity-ai-401-unauthorized", - "pipeline-error-perplexity-ai-403-model-access-denied", - "pipeline-error-perplexity-ai-429-exceeded-quota", - "pipeline-error-perplexity-ai-500-server-error", - "pipeline-error-perplexity-ai-llm-failed", - "pipeline-error-deepinfra-400-bad-request-validation-failed", - "pipeline-error-deepinfra-401-unauthorized", - "pipeline-error-deepinfra-403-model-access-denied", - "pipeline-error-deepinfra-429-exceeded-quota", - "pipeline-error-deepinfra-500-server-error", - "pipeline-error-deepinfra-llm-failed", - "pipeline-error-runpod-400-bad-request-validation-failed", - "pipeline-error-runpod-401-unauthorized", - "pipeline-error-runpod-403-model-access-denied", - "pipeline-error-runpod-429-exceeded-quota", - "pipeline-error-runpod-500-server-error", - "pipeline-error-runpod-llm-failed", - "pipeline-error-custom-llm-400-bad-request-validation-failed", - "pipeline-error-custom-llm-401-unauthorized", - "pipeline-error-custom-llm-403-model-access-denied", - "pipeline-error-custom-llm-429-exceeded-quota", - "pipeline-error-custom-llm-500-server-error", - "pipeline-error-custom-llm-llm-failed", - "pipeline-error-custom-voice-failed", - "pipeline-error-cartesia-socket-hang-up", - "pipeline-error-cartesia-requested-payment", - "pipeline-error-cartesia-500-server-error", - "pipeline-error-cartesia-503-server-error", - "pipeline-error-cartesia-522-server-error", - "pipeline-error-eleven-labs-voice-not-found", - "pipeline-error-eleven-labs-quota-exceeded", - "pipeline-error-eleven-labs-unauthorized-access", - "pipeline-error-eleven-labs-unauthorized-to-access-model", - "pipeline-error-eleven-labs-professional-voices-only-for-creator-plus", - "pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade", - "pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", - "pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade", - "pipeline-error-eleven-labs-system-busy-and-requested-upgrade", - "pipeline-error-eleven-labs-voice-not-fine-tuned", - "pipeline-error-eleven-labs-invalid-api-key", - "pipeline-error-eleven-labs-invalid-voice-samples", - "pipeline-error-eleven-labs-voice-disabled-by-owner", - "pipeline-error-eleven-labs-blocked-account-in-probation", - "pipeline-error-eleven-labs-blocked-content-against-their-policy", - "pipeline-error-eleven-labs-missing-samples-for-voice-clone", - "pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", - "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", - "pipeline-error-eleven-labs-500-server-error", - "pipeline-error-eleven-labs-max-character-limit-exceeded", - "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", - "pipeline-error-playht-request-timed-out", - "pipeline-error-playht-invalid-voice", - "pipeline-error-playht-unexpected-error", - "pipeline-error-playht-out-of-credits", - "pipeline-error-playht-invalid-emotion", - "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri", - "pipeline-error-playht-401-unauthorized", - "pipeline-error-playht-403-forbidden-out-of-characters", - "pipeline-error-playht-403-forbidden-api-access-not-available", - "pipeline-error-playht-429-exceeded-quota", - "pipeline-error-playht-502-gateway-error", - "pipeline-error-playht-504-gateway-error", - "pipeline-error-tavus-video-failed", - "pipeline-error-custom-transcriber-failed", - "pipeline-error-deepgram-returning-403-model-access-denied", - "pipeline-error-deepgram-returning-401-invalid-credentials", - "pipeline-error-deepgram-returning-404-not-found", - "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination", - "pipeline-error-deepgram-returning-500-invalid-json", - "pipeline-error-deepgram-returning-502-network-error", - "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", - "silence-timed-out", - "sip-gateway-failed-to-connect-call", - "twilio-failed-to-connect-call", - "twilio-reported-customer-misdialed", - "vonage-rejected", - "voicemail" - ] - }, - "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": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] - }, - "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": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the call was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the call was last updated." + "NumericScale", + "DescriptiveScale", + "Checklist", + "Matrix", + "PercentageScale", + "LikertScale", + "AutomaticRubric", + "PassFail" + ], + "description": "This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`.\n\nOptions include:\n- 'NumericScale': A scale of 1 to 10.\n- 'DescriptiveScale': A scale of Excellent, Good, Fair, Poor.\n- 'Checklist': A checklist of criteria and their status.\n- 'Matrix': A grid that evaluates multiple criteria across different performance levels.\n- 'PercentageScale': A scale of 0% to 100%.\n- 'LikertScale': A scale of Strongly Agree, Agree, Neutral, Disagree, Strongly Disagree.\n- 'AutomaticRubric': Automatically break down evaluation into several criteria, each with its own score.\n- 'PassFail': A simple 'true' if call passed, 'false' if not.\n\nDefault is 'PassFail'." }, - "startedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the call was started." + "messages": { + "description": "These are the messages used to generate the success evaluation.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt. DO NOT return anything except the result.\\n\\nRubric:\\\\n{{rubric}}\\n\\nOnly respond with the result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here was the system prompt of the call:\\n\\n{{systemPrompt}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{rubric}}: the rubric of the success evaluation from `successEvaluationPlan.rubric`", + "type": "array", + "items": { + "type": "object" + } }, - "endedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the call was ended." + "enabled": { + "type": "boolean", + "description": "This determines whether a success evaluation is generated and stored in `call.analysis.successEvaluation`. Defaults to true.\n\nUsage:\n- If you want to disable the success evaluation, set this to false.\n\n@default true" }, - "cost": { + "timeoutSeconds": { "type": "number", - "description": "This is the cost of the call in USD." - }, - "costBreakdown": { - "description": "This is the cost of the call in USD.", - "allOf": [ - { - "$ref": "#/components/schemas/CostBreakdown" - } - ] - }, - "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": [ - { - "$ref": "#/components/schemas/ArtifactPlan" - } - ] - }, - "analysis": { - "description": "This is the analysis of the call. Configure in `assistant.analysisPlan`.", - "allOf": [ - { - "$ref": "#/components/schemas/Analysis" - } - ] - }, - "monitor": { - "description": "This is to real-time monitor the call. Configure in `assistant.monitorPlan`.", + "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.successEvaluation` will be empty.\n\nUsage:\n- To guarantee the success evaluation is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + "minimum": 1, + "maximum": 60 + } + } + }, + "AnalysisPlan": { + "type": "object", + "properties": { + "summaryPlan": { + "description": "This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`.", "allOf": [ { - "$ref": "#/components/schemas/Monitor" + "$ref": "#/components/schemas/SummaryPlan" } ] }, - "artifact": { - "description": "These are the artifacts created from the call. Configure in `assistant.artifactPlan`.", + "structuredDataPlan": { + "description": "This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`.", "allOf": [ { - "$ref": "#/components/schemas/Artifact" + "$ref": "#/components/schemas/StructuredDataPlan" } ] }, - "transport": { - "description": "This is the transport used for the call.", + "successEvaluationPlan": { + "description": "This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`.", "allOf": [ { - "$ref": "#/components/schemas/Transport" + "$ref": "#/components/schemas/SuccessEvaluationPlan" } ] + } + } + }, + "TranscriptPlan": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "This determines whether the transcript is stored in `call.artifact.transcript`. Defaults to true.\n\n@default true", + "example": true }, - "phoneCallProviderId": { - "type": "string", - "description": "The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." - }, - "assistantId": { + "assistantName": { "type": "string", - "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." - }, - "assistant": { - "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "assistantOverrides": { - "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", - "allOf": [ - { - "$ref": "#/components/schemas/AssistantOverrides" - } - ] + "description": "This is the name of the assistant in the transcript. Defaults to 'AI'.\n\nUsage:\n- If you want to change the name of the assistant in the transcript, set this. Example, here is what the transcript would look like with `assistantName` set to 'Buyer':\n```\nUser: Hello, how are you?\nBuyer: I'm fine.\nUser: Do you want to buy a car?\nBuyer: No.\n```\n\n@default 'AI'" }, - "squadId": { + "userName": { "type": "string", - "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." - }, - "squad": { - "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateSquadDTO" - } - ] + "description": "This is the name of the user in the transcript. Defaults to 'User'.\n\nUsage:\n- If you want to change the name of the user in the transcript, set this. Example, here is what the transcript would look like with `userName` set to 'Seller':\n```\nSeller: Hello, how are you?\nAI: I'm fine.\nSeller: Do you want to buy a car?\nAI: No.\n```\n\n@default 'User'" + } + } + }, + "ArtifactPlan": { + "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`, explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", + "example": true }, - "phoneNumberId": { - "type": "string", - "description": "This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + "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", + "example": false }, - "phoneNumber": { - "description": "This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + "transcriptPlan": { + "description": "This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false.", "allOf": [ { - "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" + "$ref": "#/components/schemas/TranscriptPlan" } ] }, - "customerId": { + "recordingPath": { "type": "string", - "description": "This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + "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 recording to a specific path, set this to the path. Example: `/my-assistant-recordings`.\n- If you want to upload the recording to the root of the bucket, set this to `/`.\n\n@default '/'" + } + } + }, + "MessagePlan": { + "type": "object", + "properties": { + "idleMessages": { + "description": "This are the messages that the assistant will speak when the user hasn't responded for `idleTimeoutSeconds`. Each time the timeout is triggered, a random message will be chosen from this array.\n\nUsage:\n- If user gets distracted and doesn't respond for a while, this can be used to grab their attention.\n- If the transcriber doesn't pick up what the user said, this can be used to ask the user to repeat themselves. (From the perspective of the assistant, the conversation is idle since it didn't \"hear\" any user messages.)\n\n@default null (no idle message is spoken)", + "type": "array", + "items": { + "type": "string", + "maxLength": 1000 + } }, - "customer": { - "description": "This is the customer that will be called. To call an existing customer, use `customerId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateCustomerDTO" - } - ] + "idleMessageMaxSpokenCount": { + "type": "number", + "description": "This determines the maximum number of times `idleMessages` can be spoken during the call.\n\n@default 3", + "minimum": 1, + "maximum": 10 }, - "name": { - "type": "string", - "description": "This is the name of the call. This is just for your own reference.", - "maxLength": 40 + "idleTimeoutSeconds": { + "type": "number", + "description": "This is the timeout in seconds before a message from `idleMessages` is spoken. The clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 10", + "minimum": 5, + "maximum": 30 } - }, - "required": [ - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "PaginationMeta": { + "AssistantCustomEndpointingRule": { "type": "object", "properties": { - "itemsPerPage": { - "type": "number" + "type": { + "type": "string", + "description": "This endpointing rule is based on the last assistant message before customer started speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you have yes/no questions in your use case like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.", + "enum": [ + "assistant" + ] }, - "totalItems": { - "type": "number" + "regex": { + "type": "string", + "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." }, - "currentPage": { - "type": "number" + "regexOptions": { + "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 } }, "required": [ - "itemsPerPage", - "totalItems", - "currentPage" + "type", + "regex", + "timeoutSeconds" ] }, - "CallPaginatedResponse": { + "CustomerCustomEndpointingRule": { "type": "object", "properties": { - "results": { + "type": { + "type": "string", + "description": "This endpointing rule is based on current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the current customer transcription\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", + "enum": [ + "customer" + ] + }, + "regex": { + "type": "string", + "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "regexOptions": { + "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", "type": "array", "items": { - "$ref": "#/components/schemas/Call" + "$ref": "#/components/schemas/RegexOption" } }, - "metadata": { - "$ref": "#/components/schemas/PaginationMeta" + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 } }, "required": [ - "results", - "metadata" + "type", + "regex", + "timeoutSeconds" ] }, - "CreateOutboundCallDTO": { + "BothCustomEndpointingRule": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "This is the name of the call. This is just for your own reference.", - "maxLength": 40 - }, - "assistantId": { + "type": { "type": "string", - "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." - }, - "assistant": { - "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "assistantOverrides": { - "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", - "allOf": [ - { - "$ref": "#/components/schemas/AssistantOverrides" - } + "description": "This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message and the current customer transcription\n- If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", + "enum": [ + "both" ] }, - "squadId": { + "assistantRegex": { "type": "string", - "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." + "description": "This is the regex pattern to match the assistant's message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." }, - "squad": { - "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateSquadDTO" - } - ] + "assistantRegexOptions": { + "description": "These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } }, - "phoneNumberId": { - "type": "string", - "description": "This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + "customerRegex": { + "type": "string" }, - "phoneNumber": { - "description": "This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "allOf": [ - { - "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" - } - ] + "customerRegexOptions": { + "description": "These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } }, - "customerId": { - "type": "string", - "description": "This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 + } + }, + "required": [ + "type", + "assistantRegex", + "customerRegex", + "timeoutSeconds" + ] + }, + "TranscriptionEndpointingPlan": { + "type": "object", + "properties": { + "onPunctuationSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", + "minimum": 0, + "maximum": 3, + "example": 0.1 }, - "customer": { - "description": "This is the customer that will be called. To call an existing customer, use `customerId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateCustomerDTO" - } - ] + "onNoPunctuationSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", + "minimum": 0, + "maximum": 3, + "example": 1.5 + }, + "onNumberSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", + "minimum": 0, + "maximum": 3, + "example": 0.5 } } }, - "CreateWebCallDTO": { + "StartSpeakingPlan": { "type": "object", "properties": { - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." + "waitSeconds": { + "type": "number", + "description": "This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", + "minimum": 0, + "maximum": 5, + "example": 0.4 }, - "assistant": { - "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] + "smartEndpointingEnabled": { + "type": "boolean", + "description": "This determines if a customer speech is considered done (endpointing) using a Vapi custom-trained model on customer's speech. This is good for middle-of-thought detection.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nUsage:\n- If your conversations are long-form and you want assistant to wait smartly even if customer pauses for a bit to think, you can use this instead.\n\nThis overrides `transcriptionEndpointingPlan`.\n\n@default false", + "example": false }, - "assistantOverrides": { - "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", + "customEndpointingRules": { + "type": "array", + "description": "These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.\n\nUsage:\n- If you have yes/no questions like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese override `transcriptionEndpointingPlan` and `smartEndpointingEnabled` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\n@default []", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantCustomEndpointingRule", + "title": "Assistant" + }, + { + "$ref": "#/components/schemas/CustomerCustomEndpointingRule", + "title": "Customer" + }, + { + "$ref": "#/components/schemas/BothCustomEndpointingRule", + "title": "Both" + } + ] + } + }, + "transcriptionEndpointingPlan": { + "description": "This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.", "allOf": [ { - "$ref": "#/components/schemas/AssistantOverrides" + "$ref": "#/components/schemas/TranscriptionEndpointingPlan" } ] + } + } + }, + "StopSpeakingPlan": { + "type": "object", + "properties": { + "numWords": { + "type": "number", + "description": "This is the number of words that the customer has to say before the assistant will stop talking.\n\nWords like \"stop\", \"actually\", \"no\", etc. will always interrupt immediately regardless of this value.\n\nWords like \"okay\", \"yeah\", \"right\" will never interrupt.\n\nWhen set to 0, `voiceSeconds` is used in addition to the transcriptions to determine the customer has started speaking.\n\nDefaults to 0.\n\n@default 0", + "minimum": 0, + "maximum": 10, + "example": 0 }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." + "voiceSeconds": { + "type": "number", + "description": "This is the seconds customer has to speak before the assistant stops talking. This uses the VAD (Voice Activity Detection) spike to determine if the customer has started speaking.\n\nConsiderations:\n- A lower value might be more responsive but could potentially pick up non-speech sounds.\n- A higher value reduces false positives but might slightly delay the detection of speech onset.\n\nThis is only used if `numWords` is set to 0.\n\nDefaults to 0.2\n\n@default 0.2", + "minimum": 0, + "maximum": 0.5, + "example": 0.2 }, - "squad": { - "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateSquadDTO" - } - ] + "backoffSeconds": { + "type": "number", + "description": "This is the seconds to wait before the assistant will start talking again after being interrupted.\n\nDefaults to 1.\n\n@default 1", + "minimum": 0, + "maximum": 10, + "example": 1 } } }, - "UpdateCallDTO": { + "MonitorPlan": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "This is the name of the call. This is just for your own reference.", - "maxLength": 40 + "listenEnabled": { + "type": "boolean", + "description": "This determines whether the assistant's calls allow live listening. Defaults to true.\n\nFetch `call.monitor.listenUrl` to get the live listening URL.\n\n@default true", + "example": false + }, + "controlEnabled": { + "type": "boolean", + "description": "This determines whether the assistant's calls allow live control. Defaults to true.\n\nFetch `call.monitor.controlUrl` to get the live control URL.\n\nTo use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message\n\n@default true", + "example": false } } }, - "Assistant": { + "CreateAssistantDTO": { "type": "object", "properties": { "transcriber": { @@ -11044,6 +11082,10 @@ "$ref": "#/components/schemas/InflectionAIModel", "title": "InflectionAI" }, + { + "$ref": "#/components/schemas/DeepSeekModel", + "title": "DeepSeek" + }, { "$ref": "#/components/schemas/OpenAIModel", "title": "OpenAI" @@ -11113,6 +11155,10 @@ "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAI" }, + { + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAI" + }, { "$ref": "#/components/schemas/TavusVoice", "title": "TavusVoice" @@ -11284,14 +11330,158 @@ "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": { + "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" + } + ] + } + }, + "credentials": { "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.", + "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/TransportConfigurationTwilio", - "title": "Twilio" + "$ref": "#/components/schemas/CreateAnthropicCredentialDTO", + "title": "AnthropicCredential" + }, + { + "$ref": "#/components/schemas/CreateAnyscaleCredentialDTO", + "title": "AnyscaleCredential" + }, + { + "$ref": "#/components/schemas/CreateAssemblyAICredentialDTO", + "title": "AssemblyAICredential" + }, + { + "$ref": "#/components/schemas/CreateAzureOpenAICredentialDTO", + "title": "AzureOpenAICredential" + }, + { + "$ref": "#/components/schemas/CreateAzureCredentialDTO", + "title": "AzureCredential" + }, + { + "$ref": "#/components/schemas/CreateByoSipTrunkCredentialDTO", + "title": "ByoSipTrunkCredential" + }, + { + "$ref": "#/components/schemas/CreateCartesiaCredentialDTO", + "title": "CartesiaCredential" + }, + { + "$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/CreateGroqCredentialDTO", + "title": "GroqCredential" + }, + { + "$ref": "#/components/schemas/CreateLangfuseCredentialDTO", + "title": "LangfuseCredential" + }, + { + "$ref": "#/components/schemas/CreateLmntCredentialDTO", + "title": "LmntCredential" + }, + { + "$ref": "#/components/schemas/CreateMakeCredentialDTO", + "title": "MakeCredential" + }, + { + "$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/CreateTavusCredentialDTO", + "title": "TavusCredential" + }, + { + "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", + "title": "TogetherAICredential" + }, + { + "$ref": "#/components/schemas/CreateTwilioCredentialDTO", + "title": "TwilioCredential" + }, + { + "$ref": "#/components/schemas/CreateVonageCredentialDTO", + "title": "VonageCredential" + }, + { + "$ref": "#/components/schemas/CreateWebhookCredentialDTO", + "title": "WebhookCredential" + }, + { + "$ref": "#/components/schemas/CreateXAiCredentialDTO", + "title": "XAiCredential" } ] } @@ -11394,34 +11584,10 @@ "$ref": "#/components/schemas/Server" } ] - }, - "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." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." } - }, - "required": [ - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "UpdateAssistantDTO": { + "AssistantOverrides": { "type": "object", "properties": { "transcriber": { @@ -11484,6 +11650,10 @@ "$ref": "#/components/schemas/InflectionAIModel", "title": "InflectionAI" }, + { + "$ref": "#/components/schemas/DeepSeekModel", + "title": "DeepSeek" + }, { "$ref": "#/components/schemas/OpenAIModel", "title": "OpenAI" @@ -11553,6 +11723,10 @@ "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAI" }, + { + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAI" + }, { "$ref": "#/components/schemas/TavusVoice", "title": "TavusVoice" @@ -11672,535 +11846,380 @@ "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", - "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": { - "type": "string", - "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.", - "enum": [ - "off", - "office" - ], - "example": "office" - }, - "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" - } - ] - } - }, - "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 - }, - "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.", - "allOf": [ - { - "$ref": "#/components/schemas/TwilioVoicemailDetection" - } - ] - }, - "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 - } - }, - "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": [ - { - "$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/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/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/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/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/MonitorPlan" - } - ] - }, - "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.", - "type": "array", - "items": { - "type": "string" + "conversation-update", + "end-of-call-report", + "function-call", + "hang", + "language-changed", + "language-change-detected", + "model-output", + "phone-call-control", + "speech-update", + "status-update", + "transcript", + "tool-calls", + "transfer-destination-request", + "transfer-update", + "user-interrupted", + "voice-input" + ] } }, - "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" - } - ] - } - } - }, - "ByoPhoneNumber": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] + "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 }, - "provider": { + "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": { "type": "string", - "description": "This is to bring your own phone numbers from your own SIP trunks or Carriers.", + "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.", "enum": [ - "byo-phone-number" - ] + "off", + "office" + ], + "example": "office" }, - "numberE164CheckEnabled": { + "backgroundDenoisingEnabled": { "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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", - "default": true - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the phone number." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this phone number belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was last updated." - }, - "name": { - "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 - }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "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\n2. phoneNumber.server\n3. org.server", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] - }, - "number": { - "type": "string", - "description": "This is the number of the customer.", - "minLength": 3, - "maxLength": 40 - }, - "credentialId": { - "type": "string", - "description": "This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId." - } - }, - "required": [ - "provider", - "id", - "orgId", - "createdAt", - "updatedAt", - "credentialId" - ] - }, - "TwilioPhoneNumber": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] - }, - "provider": { - "type": "string", - "description": "This is to use numbers bought on Twilio.", - "enum": [ - "twilio" - ] + "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 }, - "id": { - "type": "string", - "description": "This is the unique identifier for the phone number." + "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 }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this phone number belongs to." + "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" + } + ] + } }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was created." + "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/CreateAzureOpenAICredentialDTO", + "title": "AzureOpenAICredential" + }, + { + "$ref": "#/components/schemas/CreateAzureCredentialDTO", + "title": "AzureCredential" + }, + { + "$ref": "#/components/schemas/CreateByoSipTrunkCredentialDTO", + "title": "ByoSipTrunkCredential" + }, + { + "$ref": "#/components/schemas/CreateCartesiaCredentialDTO", + "title": "CartesiaCredential" + }, + { + "$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/CreateGroqCredentialDTO", + "title": "GroqCredential" + }, + { + "$ref": "#/components/schemas/CreateLangfuseCredentialDTO", + "title": "LangfuseCredential" + }, + { + "$ref": "#/components/schemas/CreateLmntCredentialDTO", + "title": "LmntCredential" + }, + { + "$ref": "#/components/schemas/CreateMakeCredentialDTO", + "title": "MakeCredential" + }, + { + "$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/CreateTavusCredentialDTO", + "title": "TavusCredential" + }, + { + "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", + "title": "TogetherAICredential" + }, + { + "$ref": "#/components/schemas/CreateTwilioCredentialDTO", + "title": "TwilioCredential" + }, + { + "$ref": "#/components/schemas/CreateVonageCredentialDTO", + "title": "VonageCredential" + }, + { + "$ref": "#/components/schemas/CreateWebhookCredentialDTO", + "title": "WebhookCredential" + }, + { + "$ref": "#/components/schemas/CreateXAiCredentialDTO", + "title": "XAiCredential" + } + ] + } }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was last updated." + "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" }, "name": { "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", + "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call.", "maxLength": 40 }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "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\n2. phoneNumber.server\n3. org.server", + "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.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/TwilioVoicemailDetection" } ] }, - "number": { + "voicemailMessage": { "type": "string", - "description": "These are the digits of the phone number you own on your Twilio." + "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 }, - "twilioAccountSid": { + "endCallMessage": { "type": "string", - "description": "This is the Twilio Account SID for the phone number." + "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 }, - "twilioAuthToken": { - "type": "string", - "description": "This is the Twilio Auth Token for the phone number." - } - }, - "required": [ - "provider", - "id", - "orgId", - "createdAt", - "updatedAt", - "number", - "twilioAccountSid", - "twilioAuthToken" - ] - }, - "VonagePhoneNumber": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, + "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 + } + }, + "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": [ { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" + "$ref": "#/components/schemas/AnalysisPlan" } ] }, - "provider": { - "type": "string", - "description": "This is to use numbers bought on Vonage.", - "enum": [ - "vonage" + "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/ArtifactPlan" + } ] }, - "id": { - "type": "string", - "description": "This is the unique identifier for the phone number." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this phone number belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was created." + "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/MessagePlan" + } + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was last updated." + "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/StartSpeakingPlan" + } + ] }, - "name": { - "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 + "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/StopSpeakingPlan" + } + ] }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "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/MonitorPlan" + } + ] }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "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.", + "type": "array", + "items": { + "type": "string" + } }, "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\n2. phoneNumber.server\n3. org.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" } ] - }, - "number": { - "type": "string", - "description": "These are the digits of the phone number you own on your Vonage." - }, - "credentialId": { - "type": "string", - "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up." } - }, - "required": [ - "provider", - "id", - "orgId", - "createdAt", - "updatedAt", - "number", - "credentialId" - ] + } }, - "SipAuthentication": { + "SquadMemberDTO": { "type": "object", "properties": { - "realm": { - "type": "string", - "description": "This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to sip.vapi.ai." - }, - "username": { + "assistantId": { "type": "string", - "description": "This will be expected in the `username` field of the `authorization` header of the SIP INVITE.", - "minLength": 20, - "maxLength": 40 + "nullable": true, + "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." }, - "password": { - "type": "string", - "description": "This will be expected to generate the `response` field of the `authorization` header of the SIP INVITE, through digest authentication.", - "minLength": 20, - "maxLength": 40 - } - }, - "required": [ - "username", - "password" - ] - }, - "VapiPhoneNumber": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, + "assistant": { + "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", + "allOf": [ { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" + "$ref": "#/components/schemas/CreateAssistantDTO" } ] }, - "provider": { - "type": "string", - "description": "This is to create free SIP phone numbers on Vapi.", - "enum": [ - "vapi" - ] - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the phone number." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this phone number belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the phone number was last updated." - }, - "name": { - "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 - }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "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\n2. phoneNumber.server\n3. org.server", + "assistantOverrides": { + "description": "This can be used to override the assistant's settings and provide values for it's template variables.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/AssistantOverrides" } ] }, - "sipUri": { + "assistantDestinations": { + "description": "These are the others assistants that this assistant can transfer to.\n\nIf the assistant already has transfer call tool, these destinations are just appended to existing ones.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferDestinationAssistant" + } + } + } + }, + "CreateSquadDTO": { + "type": "object", + "properties": { + "name": { "type": "string", - "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." + "description": "This is the name of the squad." }, - "authentication": { - "description": "This enables authentication for incoming SIP INVITE requests to the `sipUri`.\n\nIf not set, any username/password to the 401 challenge of the SIP INVITE will be accepted.", + "members": { + "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SquadMemberDTO" + } + }, + "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.", "allOf": [ { - "$ref": "#/components/schemas/SipAuthentication" + "$ref": "#/components/schemas/AssistantOverrides" } ] } }, "required": [ - "provider", - "id", - "orgId", - "createdAt", - "updatedAt", - "sipUri" + "members" ] }, - "CreateByoPhoneNumberDTO": { + "ImportTwilioPhoneNumberDTO": { "type": "object", "properties": { "fallbackDestination": { @@ -12216,27 +12235,18 @@ } ] }, - "provider": { + "twilioPhoneNumber": { "type": "string", - "description": "This is to bring your own phone numbers from your own SIP trunks or Carriers.", - "enum": [ - "byo-phone-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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", - "default": true + "description": "These are the digits of the phone number you own on your Twilio.", + "deprecated": true }, - "number": { + "twilioAccountSid": { "type": "string", - "description": "This is the number of the customer.", - "minLength": 3, - "maxLength": 40 + "description": "This is your Twilio Account SID that will be used to handle this phone number." }, - "credentialId": { + "twilioAuthToken": { "type": "string", - "description": "This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId." + "description": "This is the Twilio Auth Token that will be used to handle this phone number." }, "name": { "type": "string", @@ -12261,248 +12271,622 @@ } }, "required": [ - "provider", - "credentialId" + "twilioPhoneNumber", + "twilioAccountSid", + "twilioAuthToken" ] }, - "CreateTwilioPhoneNumberDTO": { + "CreateCustomerDTO": { "type": "object", "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] + "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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + "default": true }, - "provider": { + "extension": { "type": "string", - "description": "This is to use numbers bought on Twilio.", - "enum": [ - "twilio" - ] + "description": "This is the extension that will be dialed after the call is answered.", + "maxLength": 10, + "example": null }, "number": { "type": "string", - "description": "These are the digits of the phone number you own on your Twilio." + "description": "This is the number of the customer.", + "minLength": 3, + "maxLength": 40 }, - "twilioAccountSid": { + "sipUri": { "type": "string", - "description": "This is the Twilio Account SID for the phone number." + "description": "This is the SIP URI of the customer." }, - "twilioAuthToken": { + "name": { "type": "string", - "description": "This is the Twilio Auth Token for the phone number." - }, + "description": "This is the name of the customer. This is just for your own reference.\n\nFor SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" `.", + "maxLength": 40 + } + } + }, + "CreateCallDTO": { + "type": "object", + "properties": { "name": { "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", + "description": "This is the name of the call. This is just for your own reference.", "maxLength": 40 }, "assistantId": { "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." + }, + "assistant": { + "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "assistantOverrides": { + "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] }, "squadId": { "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." }, - "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\n2. phoneNumber.server\n3. org.server", + "squad": { + "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/CreateSquadDTO" } ] - } - }, - "required": [ - "provider", - "number", - "twilioAccountSid", - "twilioAuthToken" - ] - }, - "CreateVonagePhoneNumberDTO": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, + }, + "phoneNumberId": { + "type": "string", + "description": "This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + }, + "phoneNumber": { + "description": "This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + "allOf": [ { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" + "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" } ] }, - "provider": { + "customerId": { "type": "string", - "description": "This is to use numbers bought on Vonage.", - "enum": [ - "vonage" + "description": "This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + }, + "customer": { + "description": "This is the customer that will be called. To call an existing customer, use `customerId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } ] + } + } + }, + "AnalysisCostBreakdown": { + "type": "object", + "properties": { + "summary": { + "type": "number", + "description": "This is the cost to summarize the call." }, - "number": { - "type": "string", - "description": "These are the digits of the phone number you own on your Vonage." + "summaryPromptTokens": { + "type": "number", + "description": "This is the number of prompt tokens used to summarize the call." }, - "credentialId": { - "type": "string", - "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up." + "summaryCompletionTokens": { + "type": "number", + "description": "This is the number of completion tokens used to summarize the call." }, - "name": { - "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 + "structuredData": { + "type": "number", + "description": "This is the cost to extract structured data from the call." + }, + "structuredDataPromptTokens": { + "type": "number", + "description": "This is the number of prompt tokens used to extract structured data from the call." + }, + "structuredDataCompletionTokens": { + "type": "number", + "description": "This is the number of completion tokens used to extract structured data from the call." + }, + "successEvaluation": { + "type": "number", + "description": "This is the cost to evaluate if the call was successful." + }, + "successEvaluationPromptTokens": { + "type": "number", + "description": "This is the number of prompt tokens used to evaluate if the call was successful." + }, + "successEvaluationCompletionTokens": { + "type": "number", + "description": "This is the number of completion tokens used to evaluate if the call was successful." + } + } + }, + "CostBreakdown": { + "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." + }, + "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." }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "llmCompletionTokens": { + "type": "number", + "description": "This is the LLM completion tokens used for the call." }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "ttsCharacters": { + "type": "number", + "description": "This is the TTS characters used for the call." }, - "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\n2. phoneNumber.server\n3. org.server", + "analysisCostBreakdown": { + "description": "This is the cost of the analysis.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/AnalysisCostBreakdown" } ] } - }, - "required": [ - "provider", - "number", - "credentialId" - ] + } }, - "CreateVapiPhoneNumberDTO": { + "Analysis": { "type": "object", "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] + "summary": { + "type": "string", + "description": "This is the summary of the call. Customize by setting `assistant.analysisPlan.summaryPrompt`." }, - "provider": { + "structuredData": { + "type": "object", + "description": "This is the structured data extracted from the call. Customize by setting `assistant.analysisPlan.structuredDataPrompt` and/or `assistant.analysisPlan.structuredDataSchema`." + }, + "successEvaluation": { "type": "string", - "description": "This is to create free SIP phone numbers on Vapi.", - "enum": [ - "vapi" - ] + "description": "This is the evaluation of the call. Customize by setting `assistant.analysisPlan.successEvaluationPrompt` and/or `assistant.analysisPlan.successEvaluationRubric`." + } + } + }, + "Monitor": { + "type": "object", + "properties": { + "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`." }, - "sipUri": { + "controlUrl": { "type": "string", - "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." + "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": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that were spoken during the call.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserMessage", + "title": "UserMessage" + }, + { + "$ref": "#/components/schemas/SystemMessage", + "title": "SystemMessage" + }, + { + "$ref": "#/components/schemas/BotMessage", + "title": "BotMessage" + }, + { + "$ref": "#/components/schemas/ToolCallMessage", + "title": "ToolCallMessage" + }, + { + "$ref": "#/components/schemas/ToolCallResultMessage", + "title": "ToolCallResultMessage" + } + ] + } }, - "authentication": { - "description": "This enables authentication for incoming SIP INVITE requests to the `sipUri`.\n\nIf not set, any username/password to the 401 challenge of the SIP INVITE will be accepted.", - "allOf": [ - { - "$ref": "#/components/schemas/SipAuthentication" - } - ] + "messagesOpenAIFormatted": { + "description": "These are the messages that were spoken during the call, formatted for OpenAI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } }, - "name": { + "recordingUrl": { "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 + "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." }, - "assistantId": { + "stereoRecordingUrl": { "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." }, - "squadId": { + "videoRecordingUrl": { "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`." }, - "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\n2. phoneNumber.server\n3. org.server", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] + "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." + }, + "transcript": { + "type": "string", + "description": "This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience." } - }, - "required": [ - "provider", - "sipUri" - ] + } }, - "BuyPhoneNumberDTO": { + "Transport": { "type": "object", "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } + "provider": { + "type": "string", + "description": "This is the provider used for the call.", + "enum": [ + "twilio", + "vonage", + "vapi", + "daily" ] }, - "areaCode": { + "assistantVideoEnabled": { + "type": "boolean", + "description": "This is determines whether the assistant will have video enabled.\n\nOnly relevant for `webCall` type." + } + } + }, + "Call": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "This is the area code of the phone number to purchase.", - "minLength": 3, - "maxLength": 3 + "description": "This is the type of call.", + "enum": [ + "inboundPhoneCall", + "outboundPhoneCall", + "webCall" + ] }, - "name": { + "costs": { + "type": "array", + "description": "These are the costs of individual components of the call in USD.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransportCost", + "title": "TransportCost" + }, + { + "$ref": "#/components/schemas/TranscriberCost", + "title": "TranscriberCost" + }, + { + "$ref": "#/components/schemas/ModelCost", + "title": "ModelCost" + }, + { + "$ref": "#/components/schemas/VoiceCost", + "title": "VoiceCost" + }, + { + "$ref": "#/components/schemas/VapiCost", + "title": "VapiCost" + }, + { + "$ref": "#/components/schemas/AnalysisCost", + "title": "AnalysisCost" + } + ] + } + }, + "messages": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserMessage", + "title": "UserMessage" + }, + { + "$ref": "#/components/schemas/SystemMessage", + "title": "SystemMessage" + }, + { + "$ref": "#/components/schemas/BotMessage", + "title": "BotMessage" + }, + { + "$ref": "#/components/schemas/ToolCallMessage", + "title": "ToolCallMessage" + }, + { + "$ref": "#/components/schemas/ToolCallResultMessage", + "title": "ToolCallResultMessage" + } + ] + } + }, + "phoneCallProvider": { "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 + "description": "This is the provider of the call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + "enum": [ + "twilio", + "vonage", + "vapi" + ] }, - "assistantId": { + "phoneCallTransport": { "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the transport of the phone call.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + "enum": [ + "sip", + "pstn" + ] }, - "squadId": { + "status": { "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the status of the call.", + "enum": [ + "queued", + "ringing", + "in-progress", + "forwarding", + "ended" + ] }, - "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\n2. phoneNumber.server\n3. org.server", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } + "endedReason": { + "type": "string", + "description": "This is the explanation for how the call ended.", + "enum": [ + "assistant-not-invalid", + "assistant-not-provided", + "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", + "assistant-ended-call", + "assistant-said-end-call-phrase", + "assistant-forwarded-call", + "assistant-join-timed-out", + "customer-busy", + "customer-ended-call", + "customer-did-not-answer", + "customer-did-not-give-microphone-permission", + "assistant-said-message-with-end-call-enabled", + "exceeded-max-duration", + "manually-canceled", + "phone-call-provider-closed-websocket", + "db-error", + "assistant-not-found", + "license-check-failed", + "pipeline-error-openai-voice-failed", + "pipeline-error-cartesia-voice-failed", + "pipeline-error-deepgram-voice-failed", + "pipeline-error-eleven-labs-voice-failed", + "pipeline-error-playht-voice-failed", + "pipeline-error-lmnt-voice-failed", + "pipeline-error-azure-voice-failed", + "pipeline-error-rime-ai-voice-failed", + "pipeline-error-neets-voice-failed", + "pipeline-error-smallest-ai-voice-failed", + "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-gladia-transcriber-failed", + "pipeline-error-assembly-ai-transcriber-failed", + "pipeline-error-talkscriber-transcriber-failed", + "pipeline-error-azure-speech-transcriber-failed", + "pipeline-error-vapi-llm-failed", + "pipeline-error-vapi-400-bad-request-validation-failed", + "pipeline-error-vapi-401-unauthorized", + "pipeline-error-vapi-403-model-access-denied", + "pipeline-error-vapi-429-exceeded-quota", + "pipeline-error-vapi-500-server-error", + "pipeline-no-available-model", + "worker-shutdown", + "unknown-error", + "vonage-disconnected", + "vonage-failed-to-connect-call", + "phone-call-provider-bypass-enabled-but-no-call-received", + "vapifault-phone-call-worker-setup-socket-error", + "vapifault-phone-call-worker-worker-setup-socket-timeout", + "vapifault-phone-call-worker-could-not-find-call", + "vapifault-transport-never-connected", + "vapifault-web-call-worker-setup-failed", + "vapifault-transport-connected-but-call-not-active", + "vapifault-call-started-but-connection-to-transport-missing", + "pipeline-error-openai-llm-failed", + "pipeline-error-azure-openai-llm-failed", + "pipeline-error-groq-llm-failed", + "pipeline-error-google-llm-failed", + "pipeline-error-xai-llm-failed", + "pipeline-error-inflection-ai-llm-failed", + "pipeline-error-cerebras-llm-failed", + "pipeline-error-deep-seek-llm-failed", + "pipeline-error-openai-400-bad-request-validation-failed", + "pipeline-error-openai-401-unauthorized", + "pipeline-error-openai-403-model-access-denied", + "pipeline-error-openai-429-exceeded-quota", + "pipeline-error-openai-500-server-error", + "pipeline-error-google-400-bad-request-validation-failed", + "pipeline-error-google-401-unauthorized", + "pipeline-error-google-403-model-access-denied", + "pipeline-error-google-429-exceeded-quota", + "pipeline-error-google-500-server-error", + "pipeline-error-xai-400-bad-request-validation-failed", + "pipeline-error-xai-401-unauthorized", + "pipeline-error-xai-403-model-access-denied", + "pipeline-error-xai-429-exceeded-quota", + "pipeline-error-xai-500-server-error", + "pipeline-error-inflection-ai-400-bad-request-validation-failed", + "pipeline-error-inflection-ai-401-unauthorized", + "pipeline-error-inflection-ai-403-model-access-denied", + "pipeline-error-inflection-ai-429-exceeded-quota", + "pipeline-error-inflection-ai-500-server-error", + "pipeline-error-deep-seek-400-bad-request-validation-failed", + "pipeline-error-deep-seek-401-unauthorized", + "pipeline-error-deep-seek-403-model-access-denied", + "pipeline-error-deep-seek-429-exceeded-quota", + "pipeline-error-deep-seek-500-server-error", + "pipeline-error-azure-openai-400-bad-request-validation-failed", + "pipeline-error-azure-openai-401-unauthorized", + "pipeline-error-azure-openai-403-model-access-denied", + "pipeline-error-azure-openai-429-exceeded-quota", + "pipeline-error-azure-openai-500-server-error", + "pipeline-error-groq-400-bad-request-validation-failed", + "pipeline-error-groq-401-unauthorized", + "pipeline-error-groq-403-model-access-denied", + "pipeline-error-groq-429-exceeded-quota", + "pipeline-error-groq-500-server-error", + "pipeline-error-cerebras-400-bad-request-validation-failed", + "pipeline-error-cerebras-401-unauthorized", + "pipeline-error-cerebras-403-model-access-denied", + "pipeline-error-cerebras-429-exceeded-quota", + "pipeline-error-cerebras-500-server-error", + "pipeline-error-anthropic-400-bad-request-validation-failed", + "pipeline-error-anthropic-401-unauthorized", + "pipeline-error-anthropic-403-model-access-denied", + "pipeline-error-anthropic-429-exceeded-quota", + "pipeline-error-anthropic-500-server-error", + "pipeline-error-anthropic-llm-failed", + "pipeline-error-together-ai-400-bad-request-validation-failed", + "pipeline-error-together-ai-401-unauthorized", + "pipeline-error-together-ai-403-model-access-denied", + "pipeline-error-together-ai-429-exceeded-quota", + "pipeline-error-together-ai-500-server-error", + "pipeline-error-together-ai-llm-failed", + "pipeline-error-anyscale-400-bad-request-validation-failed", + "pipeline-error-anyscale-401-unauthorized", + "pipeline-error-anyscale-403-model-access-denied", + "pipeline-error-anyscale-429-exceeded-quota", + "pipeline-error-anyscale-500-server-error", + "pipeline-error-anyscale-llm-failed", + "pipeline-error-openrouter-400-bad-request-validation-failed", + "pipeline-error-openrouter-401-unauthorized", + "pipeline-error-openrouter-403-model-access-denied", + "pipeline-error-openrouter-429-exceeded-quota", + "pipeline-error-openrouter-500-server-error", + "pipeline-error-openrouter-llm-failed", + "pipeline-error-perplexity-ai-400-bad-request-validation-failed", + "pipeline-error-perplexity-ai-401-unauthorized", + "pipeline-error-perplexity-ai-403-model-access-denied", + "pipeline-error-perplexity-ai-429-exceeded-quota", + "pipeline-error-perplexity-ai-500-server-error", + "pipeline-error-perplexity-ai-llm-failed", + "pipeline-error-deepinfra-400-bad-request-validation-failed", + "pipeline-error-deepinfra-401-unauthorized", + "pipeline-error-deepinfra-403-model-access-denied", + "pipeline-error-deepinfra-429-exceeded-quota", + "pipeline-error-deepinfra-500-server-error", + "pipeline-error-deepinfra-llm-failed", + "pipeline-error-runpod-400-bad-request-validation-failed", + "pipeline-error-runpod-401-unauthorized", + "pipeline-error-runpod-403-model-access-denied", + "pipeline-error-runpod-429-exceeded-quota", + "pipeline-error-runpod-500-server-error", + "pipeline-error-runpod-llm-failed", + "pipeline-error-custom-llm-400-bad-request-validation-failed", + "pipeline-error-custom-llm-401-unauthorized", + "pipeline-error-custom-llm-403-model-access-denied", + "pipeline-error-custom-llm-429-exceeded-quota", + "pipeline-error-custom-llm-500-server-error", + "pipeline-error-custom-llm-llm-failed", + "pipeline-error-custom-voice-failed", + "pipeline-error-cartesia-socket-hang-up", + "pipeline-error-cartesia-requested-payment", + "pipeline-error-cartesia-500-server-error", + "pipeline-error-cartesia-503-server-error", + "pipeline-error-cartesia-522-server-error", + "pipeline-error-eleven-labs-voice-not-found", + "pipeline-error-eleven-labs-quota-exceeded", + "pipeline-error-eleven-labs-unauthorized-access", + "pipeline-error-eleven-labs-unauthorized-to-access-model", + "pipeline-error-eleven-labs-professional-voices-only-for-creator-plus", + "pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade", + "pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade", + "pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade", + "pipeline-error-eleven-labs-system-busy-and-requested-upgrade", + "pipeline-error-eleven-labs-voice-not-fine-tuned", + "pipeline-error-eleven-labs-invalid-api-key", + "pipeline-error-eleven-labs-invalid-voice-samples", + "pipeline-error-eleven-labs-voice-disabled-by-owner", + "pipeline-error-eleven-labs-blocked-account-in-probation", + "pipeline-error-eleven-labs-blocked-content-against-their-policy", + "pipeline-error-eleven-labs-missing-samples-for-voice-clone", + "pipeline-error-eleven-labs-voice-not-fine-tuned-and-cannot-be-used", + "pipeline-error-eleven-labs-voice-not-allowed-for-free-users", + "pipeline-error-eleven-labs-500-server-error", + "pipeline-error-eleven-labs-max-character-limit-exceeded", + "pipeline-error-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + "pipeline-error-playht-request-timed-out", + "pipeline-error-playht-invalid-voice", + "pipeline-error-playht-unexpected-error", + "pipeline-error-playht-out-of-credits", + "pipeline-error-playht-invalid-emotion", + "pipeline-error-playht-voice-must-be-a-valid-voice-manifest-uri", + "pipeline-error-playht-401-unauthorized", + "pipeline-error-playht-403-forbidden-out-of-characters", + "pipeline-error-playht-403-forbidden-api-access-not-available", + "pipeline-error-playht-429-exceeded-quota", + "pipeline-error-playht-502-gateway-error", + "pipeline-error-playht-504-gateway-error", + "pipeline-error-tavus-video-failed", + "pipeline-error-custom-transcriber-failed", + "pipeline-error-deepgram-returning-403-model-access-denied", + "pipeline-error-deepgram-returning-401-invalid-credentials", + "pipeline-error-deepgram-returning-404-not-found", + "pipeline-error-deepgram-returning-400-no-such-model-language-tier-combination", + "pipeline-error-deepgram-returning-500-invalid-json", + "pipeline-error-deepgram-returning-502-network-error", + "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "silence-timed-out", + "sip-gateway-failed-to-connect-call", + "twilio-failed-to-connect-call", + "twilio-reported-customer-misdialed", + "vonage-rejected", + "voicemail" ] - } - }, - "required": [ - "areaCode" - ] - }, - "ImportVonagePhoneNumberDTO": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + }, + "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": [ { "$ref": "#/components/schemas/TransferDestinationNumber", @@ -12514,2160 +12898,1885 @@ } ] }, - "vonagePhoneNumber": { + "id": { "type": "string", - "description": "These are the digits of the phone number you own on your Vonage.", - "deprecated": true + "description": "This is the unique identifier for the call." }, - "credentialId": { + "orgId": { "type": "string", - "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up.\n\nYou can add the Vonage Credential in the Provider Credentials page on the dashboard to get the credentialId." + "description": "This is the unique identifier for the org that this call belongs to." }, - "name": { + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the call was created." + }, + "updatedAt": { + "format": "date-time", "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 + "description": "This is the ISO 8601 date-time string of when the call was last updated." }, - "assistantId": { + "startedAt": { + "format": "date-time", "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the ISO 8601 date-time string of when the call was started." }, - "squadId": { + "endedAt": { + "format": "date-time", "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the ISO 8601 date-time string of when the call was ended." }, - "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\n2. phoneNumber.server\n3. org.server", + "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": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/CostBreakdown" } ] - } - }, - "required": [ - "vonagePhoneNumber", - "credentialId" - ] - }, - "PhoneNumberPaginatedResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "description": "A list of phone numbers, which can be of any provider type.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ByoPhoneNumber" - }, - { - "$ref": "#/components/schemas/TwilioPhoneNumber" - }, - { - "$ref": "#/components/schemas/VonagePhoneNumber" - }, - { - "$ref": "#/components/schemas/VapiPhoneNumber" - } - ] - } }, - "metadata": { - "description": "Metadata about the pagination.", + "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": [ { - "$ref": "#/components/schemas/PaginationMeta" + "$ref": "#/components/schemas/ArtifactPlan" } ] - } - }, - "required": [ - "results", - "metadata" - ] - }, - "UpdatePhoneNumberDTO": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ + }, + "analysis": { + "description": "This is the analysis of the call. Configure in `assistant.analysisPlan`.", + "allOf": [ { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, + "$ref": "#/components/schemas/Analysis" + } + ] + }, + "monitor": { + "description": "This is to real-time monitor the call. Configure in `assistant.monitorPlan`.", + "allOf": [ { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" + "$ref": "#/components/schemas/Monitor" } ] }, - "name": { - "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 + "artifact": { + "description": "These are the artifacts created from the call. Configure in `assistant.artifactPlan`.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] }, - "assistantId": { + "transport": { + "description": "This is the transport used for the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Transport" + } + ] + }, + "phoneCallProviderId": { "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." }, - "squadId": { + "assistantId": { "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." }, - "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\n2. phoneNumber.server\n3. org.server", + "assistant": { + "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/CreateAssistantDTO" } ] - } - } - }, - "Squad": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the squad." - }, - "members": { - "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SquadMemberDTO" - } }, - "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.", + "assistantOverrides": { + "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", "allOf": [ { "$ref": "#/components/schemas/AssistantOverrides" } ] }, - "id": { + "squadId": { "type": "string", - "description": "This is the unique identifier for the squad." + "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this squad belongs to." + "squad": { + "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateSquadDTO" + } + ] }, - "createdAt": { - "format": "date-time", + "phoneNumberId": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the squad was created." + "description": "This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the squad was last updated." - } - }, - "required": [ - "members", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "UpdateSquadDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the squad." + "phoneNumber": { + "description": "This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", + "allOf": [ + { + "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" + } + ] }, - "members": { - "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SquadMemberDTO" - } + "customerId": { + "type": "string", + "description": "This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." }, - "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.", + "customer": { + "description": "This is the customer that will be called. To call an existing customer, use `customerId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", "allOf": [ { - "$ref": "#/components/schemas/AssistantOverrides" + "$ref": "#/components/schemas/CreateCustomerDTO" } ] + }, + "name": { + "type": "string", + "description": "This is the name of the call. This is just for your own reference.", + "maxLength": 40 } }, "required": [ - "members" + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "TrieveKnowledgeBaseVectorStoreSearchPlan": { + "PaginationMeta": { "type": "object", "properties": { - "removeStopWords": { - "type": "boolean", - "description": "If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. This will preserve queries that are entirely stop words." + "itemsPerPage": { + "type": "number" }, - "scoreThreshold": { - "type": "number", - "description": "This is the score threshold to filter out chunks with a score below the threshold for cosine distance metric. For Manhattan Distance, Euclidean Distance, and Dot Product, it will filter out scores above the threshold distance. This threshold applies before weight and bias modifications. If not specified, this defaults to no threshold. A threshold of 0 will default to no threshold." + "totalItems": { + "type": "number" }, - "searchType": { - "type": "string", - "description": "This is the search method used when searching for relevant chunks from the vector store.", - "enum": [ - "fulltext", - "semantic", - "hybrid", - "bm25" - ] + "currentPage": { + "type": "number" } }, "required": [ - "searchType" + "itemsPerPage", + "totalItems", + "currentPage" ] - }, - "TrieveKnowledgeBaseVectorStoreCreatePlan": { - "type": "object", - "properties": { - "fileIds": { - "description": "These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.", - "type": "array", - "items": { - "type": "string" - } - }, - "targetSplitsPerChunk": { - "type": "number", - "description": "This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number." - }, - "splitDelimiters": { - "description": "This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.", + }, + "CallPaginatedResponse": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Call" } }, - "rebalanceChunks": { - "type": "boolean", - "description": "This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each." + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" } }, "required": [ - "fileIds" + "results", + "metadata" ] }, - "TrieveKnowledgeBase": { + "CreateOutboundCallDTO": { "type": "object", "properties": { - "provider": { + "name": { "type": "string", - "description": "This knowledge base is provided by Trieve.\n\nTo learn more about Trieve, visit https://trieve.ai.", - "enum": [ - "trieve" - ] + "description": "This is the name of the call. This is just for your own reference.", + "maxLength": 40 }, - "name": { + "assistantId": { "type": "string", - "description": "This is the name of the knowledge base." + "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." }, - "vectorStoreSearchPlan": { - "description": "This is the plan on how to search the vector store while a call is going on.", + "assistant": { + "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + "$ref": "#/components/schemas/CreateAssistantDTO" } ] }, - "vectorStoreCreatePlan": { - "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", + "assistantOverrides": { + "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + "$ref": "#/components/schemas/AssistantOverrides" } ] }, - "vectorStoreProviderId": { - "type": "string", - "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." - }, - "id": { - "type": "string", - "description": "This is the id of the knowledge base." - }, - "orgId": { - "type": "string", - "description": "This is the org id of the knowledge base." - } - }, - "required": [ - "provider", - "vectorStoreSearchPlan", - "id", - "orgId" - ] - }, - "CustomKnowledgeBase": { - "type": "object", - "properties": { - "provider": { + "squadId": { "type": "string", - "description": "This knowledge base is bring your own knowledge base implementation.", - "enum": [ - "custom-knowledge-base" - ] + "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." }, - "server": { - "description": "/**\nThis is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", + "squad": { + "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/CreateSquadDTO" } ] }, - "id": { - "type": "string", - "description": "This is the id of the knowledge base." - }, - "orgId": { - "type": "string", - "description": "This is the org id of the knowledge base." - } - }, - "required": [ - "provider", - "server", - "id", - "orgId" - ] - }, - "CreateTrieveKnowledgeBaseDTO": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This knowledge base is provided by Trieve.\n\nTo learn more about Trieve, visit https://trieve.ai.", - "enum": [ - "trieve" - ] - }, - "name": { + "phoneNumberId": { "type": "string", - "description": "This is the name of the knowledge base." + "description": "This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." }, - "vectorStoreSearchPlan": { - "description": "This is the plan on how to search the vector store while a call is going on.", + "phoneNumber": { + "description": "This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + "$ref": "#/components/schemas/ImportTwilioPhoneNumberDTO" } ] }, - "vectorStoreCreatePlan": { - "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", + "customerId": { + "type": "string", + "description": "This is the customer that will be called. To call a transient customer , use `customer` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type." + }, + "customer": { + "description": "This is the customer that will be called. To call an existing customer, use `customerId` instead.\n\nOnly relevant for `outboundPhoneCall` and `inboundPhoneCall` type.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + "$ref": "#/components/schemas/CreateCustomerDTO" } ] - }, - "vectorStoreProviderId": { - "type": "string", - "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." } - }, - "required": [ - "provider", - "vectorStoreSearchPlan" - ] + } }, - "ConversationBlock": { + "CreateWebCallDTO": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] - } + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "assistant": { + "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", "allOf": [ { - "$ref": "#/components/schemas/JsonSchema" + "$ref": "#/components/schemas/CreateAssistantDTO" } ] }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "assistantOverrides": { + "description": "These are the overrides for the `assistant` or `assistantId`'s settings and template variables.", "allOf": [ { - "$ref": "#/components/schemas/JsonSchema" + "$ref": "#/components/schemas/AssistantOverrides" } ] }, - "type": { - "type": "string", - "description": "This block is used for conversation. This can be a free flow conversation or a conversation with a specific goal like collecting some information.\n\nFor free block conversation, put clearly in the `instruction` when the block can be considered done.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Chit chat with the user asking them about their day. When user asks a specific question or once you have talked to the user for a couple of turns of conversation, move on.\"\n}\n```\n\nFor conversation with a specific goal, you can define an `outputSchema` with required fields. The block won't be considered done until the user has provided all the required fields in the `outputSchema`.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Ask the user about their hobbies, hopes and dreams.\",\n \"outputSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"hobbies\": {\n \"type\": \"string\"\n },\n \"hopes\": {\n \"type\": \"string\"\n },\n \"dreams\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hobbies\"]\n }\n}\n```\nFor the above example, the conversation block will be considered done once the user has provided the `hobbies` (even if they have not provided the `hopes` and `dreams`).", - "enum": [ - "conversation" - ] - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the block." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this block belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the block was created." - }, - "updatedAt": { - "format": "date-time", + "squadId": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the block was last updated." + "description": "This is the squad that will be used for the call. To use a transient squad, use `squad` instead." }, + "squad": { + "description": "This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateSquadDTO" + } + ] + } + } + }, + "UpdateCallDTO": { + "type": "object", + "properties": { "name": { "type": "string", - "description": "This is the name of the block. This is just for your reference." - }, - "instruction": { - "type": "string", - "description": "This is the instruction to the model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{input.your-property-name}}\" for the current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nThis can be as simple or as complex as you want it to be.\n- \"say hello and ask the user about their day!\"\n- \"collect the user's first and last name\"\n- \"user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "minLength": 1 + "description": "This is the name of the call. This is just for your own reference.", + "maxLength": 40 } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt", - "instruction" - ] + } }, - "ToolCallBlock": { + "Assistant": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] - } - }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", - "allOf": [ + "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/JsonSchema" + "$ref": "#/components/schemas/DeepgramTranscriber", + "title": "Deepgram" + }, + { + "$ref": "#/components/schemas/GladiaTranscriber", + "title": "Gladia" + }, + { + "$ref": "#/components/schemas/TalkscriberTranscriber", + "title": "Talkscriber" } ] }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "allOf": [ + "model": { + "description": "These are the options for the assistant's LLM.", + "oneOf": [ { - "$ref": "#/components/schemas/JsonSchema" + "$ref": "#/components/schemas/AnyscaleModel", + "title": "Anyscale" + }, + { + "$ref": "#/components/schemas/AnthropicModel", + "title": "Anthropic" + }, + { + "$ref": "#/components/schemas/CustomLLMModel", + "title": "CustomLLM" + }, + { + "$ref": "#/components/schemas/DeepInfraModel", + "title": "DeepInfra" + }, + { + "$ref": "#/components/schemas/GoogleModel", + "title": "Google" + }, + { + "$ref": "#/components/schemas/GroqModel", + "title": "Groq" + }, + { + "$ref": "#/components/schemas/InflectionAIModel", + "title": "InflectionAI" + }, + { + "$ref": "#/components/schemas/DeepSeekModel", + "title": "DeepSeek" + }, + { + "$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" } ] }, - "type": { - "type": "string", - "description": "This block makes a tool call.", - "enum": [ - "tool-call" - ] - }, - "tool": { - "description": "This is the tool that the block will call. To use an existing tool, use `toolId`.", + "voice": { + "description": "These are the options for the assistant's voice.", "oneOf": [ { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" + "$ref": "#/components/schemas/AzureVoice", + "title": "Azure" }, { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" + "$ref": "#/components/schemas/CartesiaVoice", + "title": "Cartesia" }, { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/CustomVoice", + "title": "CustomVoice" }, { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" + "$ref": "#/components/schemas/DeepgramVoice", + "title": "Deepgram" }, { - "$ref": "#/components/schemas/CreateGhlToolDTO", - "title": "GhlTool" + "$ref": "#/components/schemas/ElevenLabsVoice", + "title": "ElevenLabs" }, { - "$ref": "#/components/schemas/CreateMakeToolDTO", - "title": "MakeTool" + "$ref": "#/components/schemas/LMNTVoice", + "title": "LMNT" }, { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" + "$ref": "#/components/schemas/NeetsVoice", + "title": "Neets" + }, + { + "$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" } - ] - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the block." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this block belongs to." + ], + "default": { + "provider": "playht", + "voiceId": "jennifer" + } }, - "createdAt": { - "format": "date-time", + "firstMessage": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the block was created." + "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?" }, - "updatedAt": { - "format": "date-time", + "firstMessageMode": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the block was last updated." + "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" }, - "name": { - "type": "string", - "description": "This is the name of the block. This is just for your reference." + "hipaaEnabled": { + "type": "boolean", + "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", + "example": false }, - "toolId": { - "type": "string", - "description": "This is the id of the tool that the block will call. To use a transient tool, use `tool`." - } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "WorkflowBlock": { - "type": "object", - "properties": { - "messages": { + "clientMessages": { "type": "array", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] - } - }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "type": { - "type": "string", - "description": "This creates a workflow which can contain any number of steps (block executions).", "enum": [ - "workflow" - ] + "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" + ], + "example": [ + "conversation-update", + "function-call", + "hang", + "model-output", + "speech-update", + "status-update", + "transfer-update", + "transcript", + "tool-calls", + "user-interrupted", + "voice-input" + ], + "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. 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" + ] + } }, - "steps": { + "serverMessages": { "type": "array", - "description": "These are the steps in the workflow.", + "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", + "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": { - "oneOf": [ - { - "$ref": "#/components/schemas/HandoffStep", - "title": "HandoffStep" - }, - { - "$ref": "#/components/schemas/CallbackStep", - "title": "CallbackStep" - } + "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", + "tool-calls", + "transfer-destination-request", + "transfer-update", + "user-interrupted", + "voice-input" ] } }, - "id": { - "type": "string", - "description": "This is the unique identifier for the block." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this block belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the block was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the block was last updated." + "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 }, - "name": { - "type": "string", - "description": "This is the name of the block. This is just for your reference." - } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "RuleBasedCondition": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This condition is based on a strict rule.", - "enum": [ - "rule-based" - ] + "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 }, - "operator": { + "backgroundSound": { "type": "string", - "description": "This is the operator you want to use to compare the left side and right side.\n\nThe operation becomes `(leftSide) operator (rightSide)`.", + "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.", "enum": [ - "eq", - "neq", - "gt", - "gte", - "lt", - "lte" - ] + "off", + "office" + ], + "example": "office" }, - "leftSide": { - "type": "string", - "description": "This is the left side of the operation.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{output.your-property-name}}\" for current step's output\n- \"{{input.your-property-name}}\" for current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nOr, you can use a constant:\n- \"1\"\n- \"text\"\n- \"true\"\n- \"false\"\n\nOr, you can mix and match with string interpolation:\n- \"{{your-property-name}}-{{input.your-property-name-2}}-1\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "maxLength": 1000 + "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 }, - "rightSide": { - "type": "string", - "description": "This is the right side of the operation.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{output.your-property-name}}\" for current step's output\n- \"{{input.your-property-name}}\" for current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nOr, you can use a constant:\n- \"1\"\n- \"text\"\n- \"true\"\n- \"false\"\n\nOr, you can mix and match with string interpolation:\n- \"{{your-property-name}}-{{input.your-property-name-2}}-1\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "maxLength": 1000 - } - }, - "required": [ - "type", - "operator", - "leftSide", - "rightSide" - ] - }, - "ModelBasedCondition": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This condition is based on a model.", - "enum": [ - "model-based" - ] + "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 }, - "instruction": { - "type": "string", - "description": "This is the instruction which should output a boolean value when passed to a model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{output.your-property-name}}\" for current step's output\n- \"{{input.your-property-name}}\" for current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nYou can also talk about the current step's output or input directly:\n- \"{{output.your-property-name}} is greater than 10\"\n- \"{{input.your-property-name}} is greater than 10\"\n\nExamples:\n - \"{{input.age}} is greater than 10\"\n - \"{{input.age}} is greater than {{input.age2}}\"\n - \"{{output.age}} is greater than 10\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "minLength": 1 - } - }, - "required": [ - "type", - "instruction" - ] - }, - "BlockStartMessage": { - "type": "object", - "properties": { - "contents": { + "transportConfigurations": { "type": "array", - "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", + "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/TextContent", - "title": "Text" + "$ref": "#/components/schemas/TransportConfigurationTwilio", + "title": "Twilio" } ] } }, - "conditions": { + "credentials": { "type": "array", - "description": "This is an optional array of conditions that must be met for this message to be triggered.", + "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/ModelBasedCondition", - "title": "ModelBasedCondition" + "$ref": "#/components/schemas/CreateAnthropicCredentialDTO", + "title": "AnthropicCredential" + }, + { + "$ref": "#/components/schemas/CreateAnyscaleCredentialDTO", + "title": "AnyscaleCredential" + }, + { + "$ref": "#/components/schemas/CreateAssemblyAICredentialDTO", + "title": "AssemblyAICredential" + }, + { + "$ref": "#/components/schemas/CreateAzureOpenAICredentialDTO", + "title": "AzureOpenAICredential" + }, + { + "$ref": "#/components/schemas/CreateAzureCredentialDTO", + "title": "AzureCredential" + }, + { + "$ref": "#/components/schemas/CreateByoSipTrunkCredentialDTO", + "title": "ByoSipTrunkCredential" + }, + { + "$ref": "#/components/schemas/CreateCartesiaCredentialDTO", + "title": "CartesiaCredential" + }, + { + "$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/CreateGroqCredentialDTO", + "title": "GroqCredential" + }, + { + "$ref": "#/components/schemas/CreateLangfuseCredentialDTO", + "title": "LangfuseCredential" + }, + { + "$ref": "#/components/schemas/CreateLmntCredentialDTO", + "title": "LmntCredential" + }, + { + "$ref": "#/components/schemas/CreateMakeCredentialDTO", + "title": "MakeCredential" + }, + { + "$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/CreateTavusCredentialDTO", + "title": "TavusCredential" + }, + { + "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", + "title": "TogetherAICredential" }, { - "$ref": "#/components/schemas/RuleBasedCondition", - "title": "RuleBasedCondition" - } - ] - } - }, - "type": { - "type": "string", - "description": "This is the message type that is triggered when the block starts.", - "enum": [ - "block-start" - ] - }, - "content": { - "type": "string", - "description": "This is the content that the assistant will say when this message is triggered.", - "maxLength": 1000 - } - }, - "required": [ - "type" - ] - }, - "BlockCompleteMessage": { - "type": "object", - "properties": { - "contents": { - "type": "array", - "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", - "items": { - "oneOf": [ + "$ref": "#/components/schemas/CreateTwilioCredentialDTO", + "title": "TwilioCredential" + }, { - "$ref": "#/components/schemas/TextContent", - "title": "Text" - } - ] - } - }, - "conditions": { - "type": "array", - "description": "This is an optional array of conditions that must be met for this message to be triggered.", - "items": { - "oneOf": [ + "$ref": "#/components/schemas/CreateVonageCredentialDTO", + "title": "VonageCredential" + }, { - "$ref": "#/components/schemas/ModelBasedCondition", - "title": "ModelBasedCondition" + "$ref": "#/components/schemas/CreateWebhookCredentialDTO", + "title": "WebhookCredential" }, { - "$ref": "#/components/schemas/RuleBasedCondition", - "title": "RuleBasedCondition" + "$ref": "#/components/schemas/CreateXAiCredentialDTO", + "title": "XAiCredential" } ] } }, - "type": { + "name": { "type": "string", - "description": "This is the message type that is triggered when the block completes.", - "enum": [ - "block-complete" + "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call.", + "maxLength": 40 + }, + "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.", + "allOf": [ + { + "$ref": "#/components/schemas/TwilioVoicemailDetection" + } ] }, - "content": { + "voicemailMessage": { "type": "string", - "description": "This is the content that the assistant will say when this message is triggered.", + "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 - } - }, - "required": [ - "type" - ] - }, - "CreateConversationBlockDTO": { - "type": "object", - "properties": { - "messages": { + }, + "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", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] + "type": "string", + "maxLength": 140, + "minLength": 2 } }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "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": [ { - "$ref": "#/components/schemas/JsonSchema" + "$ref": "#/components/schemas/AnalysisPlan" } ] }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "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/JsonSchema" + "$ref": "#/components/schemas/ArtifactPlan" } ] }, - "type": { - "type": "string", - "description": "This block is used for conversation. This can be a free flow conversation or a conversation with a specific goal like collecting some information.\n\nFor free block conversation, put clearly in the `instruction` when the block can be considered done.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Chit chat with the user asking them about their day. When user asks a specific question or once you have talked to the user for a couple of turns of conversation, move on.\"\n}\n```\n\nFor conversation with a specific goal, you can define an `outputSchema` with required fields. The block won't be considered done until the user has provided all the required fields in the `outputSchema`.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Ask the user about their hobbies, hopes and dreams.\",\n \"outputSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"hobbies\": {\n \"type\": \"string\"\n },\n \"hopes\": {\n \"type\": \"string\"\n },\n \"dreams\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hobbies\"]\n }\n}\n```\nFor the above example, the conversation block will be considered done once the user has provided the `hobbies` (even if they have not provided the `hopes` and `dreams`).", - "enum": [ - "conversation" - ] - }, - "instruction": { - "type": "string", - "description": "This is the instruction to the model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{input.your-property-name}}\" for the current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nThis can be as simple or as complex as you want it to be.\n- \"say hello and ask the user about their day!\"\n- \"collect the user's first and last name\"\n- \"user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "This is the name of the block. This is just for your reference." - } - }, - "required": [ - "type", - "instruction" - ] - }, - "CreateToolCallBlockDTO": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] - } - }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "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/JsonSchema" + "$ref": "#/components/schemas/MessagePlan" } ] }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "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/JsonSchema" + "$ref": "#/components/schemas/StartSpeakingPlan" } ] }, - "type": { - "type": "string", - "description": "This block makes a tool call.", - "enum": [ - "tool-call" + "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/StopSpeakingPlan" + } ] }, - "tool": { - "description": "This is the tool that the block will call. To use an existing tool, use `toolId`.", - "oneOf": [ - { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" - }, - { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/CreateGhlToolDTO", - "title": "GhlTool" - }, - { - "$ref": "#/components/schemas/CreateMakeToolDTO", - "title": "MakeTool" - }, + "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/CreateTransferCallToolDTO", - "title": "TransferCallTool" + "$ref": "#/components/schemas/MonitorPlan" } ] }, - "toolId": { - "type": "string", - "description": "This is the id of the tool that the block will call. To use a transient tool, use `tool`." - }, - "name": { - "type": "string", - "description": "This is the name of the block. This is just for your reference." - } - }, - "required": [ - "type" - ] - }, - "CreateWorkflowBlockDTO": { - "type": "object", - "properties": { - "messages": { + "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.", "type": "array", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] + "type": "string" } }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "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/JsonSchema" + "$ref": "#/components/schemas/Server" } ] }, - "type": { + "id": { "type": "string", - "description": "This creates a workflow which can contain any number of steps (block executions).", - "enum": [ - "workflow" - ] + "description": "This is the unique identifier for the assistant." }, - "steps": { - "type": "array", - "description": "These are the steps in the workflow.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/HandoffStep", - "title": "HandoffStep" - }, - { - "$ref": "#/components/schemas/CallbackStep", - "title": "CallbackStep" - } - ] - } + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this assistant belongs to." }, - "name": { + "createdAt": { + "format": "date-time", "type": "string", - "description": "This is the name of the block. This is just for your reference." + "description": "This is the ISO 8601 date-time string of when the assistant was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." } }, "required": [ - "type" + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "UpdateBlockDTO": { + "UpdateAssistantDTO": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BlockStartMessage", - "title": "BlockStartMessage" - }, - { - "$ref": "#/components/schemas/BlockCompleteMessage", - "title": "BlockCompleteMessage" - } - ] - } - }, - "inputSchema": { - "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", - "allOf": [ + "transcriber": { + "description": "These are the options for the assistant's transcriber.", + "oneOf": [ { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "outputSchema": { - "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "allOf": [ + "$ref": "#/components/schemas/AssemblyAITranscriber", + "title": "AssemblyAI" + }, { - "$ref": "#/components/schemas/JsonSchema" + "$ref": "#/components/schemas/AzureSpeechTranscriber", + "title": "Azure" + }, + { + "$ref": "#/components/schemas/CustomTranscriber", + "title": "CustomTranscriber" + }, + { + "$ref": "#/components/schemas/DeepgramTranscriber", + "title": "Deepgram" + }, + { + "$ref": "#/components/schemas/GladiaTranscriber", + "title": "Gladia" + }, + { + "$ref": "#/components/schemas/TalkscriberTranscriber", + "title": "Talkscriber" } ] }, - "tool": { - "description": "This is the tool that the block will call. To use an existing tool, use `toolId`.", + "model": { + "description": "These are the options for the assistant's LLM.", "oneOf": [ { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" + "$ref": "#/components/schemas/AnyscaleModel", + "title": "Anyscale" }, { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" + "$ref": "#/components/schemas/AnthropicModel", + "title": "Anthropic" }, { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/CustomLLMModel", + "title": "CustomLLM" }, { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" + "$ref": "#/components/schemas/DeepInfraModel", + "title": "DeepInfra" }, { - "$ref": "#/components/schemas/CreateGhlToolDTO", - "title": "GhlTool" + "$ref": "#/components/schemas/GoogleModel", + "title": "Google" }, { - "$ref": "#/components/schemas/CreateMakeToolDTO", - "title": "MakeTool" + "$ref": "#/components/schemas/GroqModel", + "title": "Groq" }, { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" + "$ref": "#/components/schemas/InflectionAIModel", + "title": "InflectionAI" + }, + { + "$ref": "#/components/schemas/DeepSeekModel", + "title": "DeepSeek" + }, + { + "$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" } ] }, - "steps": { - "type": "array", - "description": "These are the steps in the workflow.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/HandoffStep", - "title": "HandoffStep" - }, - { - "$ref": "#/components/schemas/CallbackStep", - "title": "CallbackStep" - } - ] - } - }, - "name": { - "type": "string", - "description": "This is the name of the block. This is just for your reference." - }, - "instruction": { - "type": "string", - "description": "This is the instruction to the model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{input.your-property-name}}\" for the current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nThis can be as simple or as complex as you want it to be.\n- \"say hello and ask the user about their day!\"\n- \"collect the user's first and last name\"\n- \"user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", - "minLength": 1 - }, - "toolId": { - "type": "string", - "description": "This is the id of the tool that the block will call. To use a transient tool, use `tool`." - } - } - }, - "DtmfTool": { - "type": "object", - "properties": { - "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", - "enum": [ - "dtmf" + "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/LMNTVoice", + "title": "LMNT" + }, + { + "$ref": "#/components/schemas/NeetsVoice", + "title": "Neets" + }, + { + "$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" + } ], - "description": "The type of tool. \"dtmf\" for DTMF tool." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the tool." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." + "default": { + "provider": "playht", + "voiceId": "jennifer" + } }, - "createdAt": { - "format": "date-time", + "firstMessage": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "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?" }, - "updatedAt": { - "format": "date-time", + "firstMessageMode": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." - }, - "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" - } - ] + "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" }, - "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": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "EndCallTool": { - "type": "object", - "properties": { - "async": { + "hipaaEnabled": { "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`).", + "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", "example": false }, - "messages": { + "clientMessages": { "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.", + "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" + ], + "example": [ + "conversation-update", + "function-call", + "hang", + "model-output", + "speech-update", + "status-update", + "transfer-update", + "transcript", + "tool-calls", + "user-interrupted", + "voice-input" + ], + "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. You can check the shape of the messages in ClientMessage schema.", "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": "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" ] } }, - "type": { - "type": "string", + "serverMessages": { + "type": "array", "enum": [ - "endCall" + "conversation-update", + "end-of-call-report", + "function-call", + "hang", + "language-changed", + "language-change-detected", + "model-output", + "phone-call-control", + "speech-update", + "status-update", + "transcript", + "tool-calls", + "transfer-destination-request", + "transfer-update", + "user-interrupted", + "voice-input" ], - "description": "The type of tool. \"endCall\" for End Call tool." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the tool." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." - }, - "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" - } - ] - }, - "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": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "FunctionTool": { - "type": "object", - "properties": { - "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.", + "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": { - "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": "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", + "tool-calls", + "transfer-destination-request", + "transfer-update", + "user-interrupted", + "voice-input" ] } }, - "type": { - "type": "string", - "enum": [ - "function" - ], - "description": "The type of tool. \"function\" for Function tool." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the tool." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." + "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 }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "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 }, - "updatedAt": { - "format": "date-time", + "backgroundSound": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." + "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.", + "enum": [ + "off", + "office" + ], + "example": "office" }, - "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" - } - ] + "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 }, - "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": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "GhlTool": { - "type": "object", - "properties": { - "async": { + "modelOutputInMessagesEnabled": { "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`).", + "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 }, - "messages": { + "transportConfigurations": { "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.", + "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/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" + "$ref": "#/components/schemas/TransportConfigurationTwilio", + "title": "Twilio" } ] } }, - "type": { - "type": "string", - "enum": [ - "ghl" - ], - "description": "The type of tool. \"ghl\" for GHL tool." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the tool." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." - }, - "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" - } - ] - }, - "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" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/GhlToolMetadata" - } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt", - "metadata" - ] - }, - "MakeTool": { - "type": "object", - "properties": { - "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": { + "credentials": { "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.", + "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/ToolMessageStart", - "title": "ToolMessageStart" + "$ref": "#/components/schemas/CreateAnthropicCredentialDTO", + "title": "AnthropicCredential" }, { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" + "$ref": "#/components/schemas/CreateAnyscaleCredentialDTO", + "title": "AnyscaleCredential" }, { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" + "$ref": "#/components/schemas/CreateAssemblyAICredentialDTO", + "title": "AssemblyAICredential" }, { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, - "type": { - "type": "string", - "enum": [ - "make" - ], - "description": "The type of tool. \"make\" for Make tool." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the tool." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." - }, - "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" - } - ] - }, - "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" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/MakeToolMetadata" - } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt", - "metadata" - ] - }, - "TransferCallTool": { - "type": "object", - "properties": { - "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/CreateAzureOpenAICredentialDTO", + "title": "AzureOpenAICredential" + }, + { + "$ref": "#/components/schemas/CreateAzureCredentialDTO", + "title": "AzureCredential" + }, + { + "$ref": "#/components/schemas/CreateByoSipTrunkCredentialDTO", + "title": "ByoSipTrunkCredential" + }, + { + "$ref": "#/components/schemas/CreateCartesiaCredentialDTO", + "title": "CartesiaCredential" + }, + { + "$ref": "#/components/schemas/CreateCloudflareCredentialDTO", + "title": "CloudflareCredential" + }, { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" + "$ref": "#/components/schemas/CreateCustomLLMCredentialDTO", + "title": "CustomLLMCredential" }, { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" + "$ref": "#/components/schemas/CreateDeepgramCredentialDTO", + "title": "DeepgramCredential" }, { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" + "$ref": "#/components/schemas/CreateDeepInfraCredentialDTO", + "title": "DeepInfraCredential" }, { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, - "type": { - "type": "string", - "enum": [ - "transferCall" - ] - }, - "destinations": { - "type": "array", - "description": "These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called.", - "items": { - "oneOf": [ + "$ref": "#/components/schemas/CreateDeepSeekCredentialDTO", + "title": "DeepSeekCredential" + }, { - "$ref": "#/components/schemas/TransferDestinationAssistant", - "title": "Assistant" + "$ref": "#/components/schemas/CreateElevenLabsCredentialDTO", + "title": "ElevenLabsCredential" }, { - "$ref": "#/components/schemas/TransferDestinationStep", - "title": "Step" + "$ref": "#/components/schemas/CreateGcpCredentialDTO", + "title": "GcpCredential" }, { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "Number" + "$ref": "#/components/schemas/CreateGladiaCredentialDTO", + "title": "GladiaCredential" }, { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "Sip" + "$ref": "#/components/schemas/CreateGoHighLevelCredentialDTO", + "title": "GhlCredential" + }, + { + "$ref": "#/components/schemas/CreateGroqCredentialDTO", + "title": "GroqCredential" + }, + { + "$ref": "#/components/schemas/CreateLangfuseCredentialDTO", + "title": "LangfuseCredential" + }, + { + "$ref": "#/components/schemas/CreateLmntCredentialDTO", + "title": "LmntCredential" + }, + { + "$ref": "#/components/schemas/CreateMakeCredentialDTO", + "title": "MakeCredential" + }, + { + "$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/CreateTavusCredentialDTO", + "title": "TavusCredential" + }, + { + "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", + "title": "TogetherAICredential" + }, + { + "$ref": "#/components/schemas/CreateTwilioCredentialDTO", + "title": "TwilioCredential" + }, + { + "$ref": "#/components/schemas/CreateVonageCredentialDTO", + "title": "VonageCredential" + }, + { + "$ref": "#/components/schemas/CreateWebhookCredentialDTO", + "title": "WebhookCredential" + }, + { + "$ref": "#/components/schemas/CreateXAiCredentialDTO", + "title": "XAiCredential" } ] } }, - "id": { + "name": { "type": "string", - "description": "This is the unique identifier for the tool." + "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call.", + "maxLength": 40 }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." + "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.", + "allOf": [ + { + "$ref": "#/components/schemas/TwilioVoicemailDetection" + } + ] }, - "createdAt": { - "format": "date-time", + "voicemailMessage": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "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 }, - "updatedAt": { - "format": "date-time", + "endCallMessage": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." + "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 }, - "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.", + "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 + } + }, + "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": [ { - "$ref": "#/components/schemas/OpenAIFunction" + "$ref": "#/components/schemas/AnalysisPlan" } ] }, - "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.", + "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/Server" + "$ref": "#/components/schemas/ArtifactPlan" } ] - } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "OutputTool": { - "type": "object", - "properties": { - "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", - "enum": [ - "output" - ], - "description": "The type of tool. \"output\" for Output tool." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the tool." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "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/MessagePlan" + } + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." + "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/StartSpeakingPlan" + } + ] }, - "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.", + "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/OpenAIFunction" + "$ref": "#/components/schemas/StopSpeakingPlan" } ] }, - "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.", + "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/Server" + "$ref": "#/components/schemas/MonitorPlan" } ] - } - }, - "required": [ - "type", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "BashTool": { - "type": "object", - "properties": { - "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": { + "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.", "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": "string" } }, - "type": { + "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" + } + ] + } + } + }, + "ByoPhoneNumber": { + "type": "object", + "properties": { + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] + }, + "provider": { "type": "string", + "description": "This is to bring your own phone numbers from your own SIP trunks or Carriers.", "enum": [ - "bash" - ], - "description": "The type of tool. \"bash\" for Bash tool." + "byo-phone-number" + ] }, - "subType": { - "type": "string", - "enum": [ - "bash_20241022" - ], - "description": "The sub type of tool." + "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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + "default": true }, "id": { "type": "string", - "description": "This is the unique identifier for the tool." + "description": "This is the unique identifier for the phone number." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." + "description": "This is the unique identifier for the org that this phone number belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "description": "This is the ISO 8601 date-time string of when the phone number was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." + "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, - "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" - } - ] + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" } ] }, - "name": { + "number": { "type": "string", - "description": "The name of the tool, fixed to 'bash'", - "default": "bash", - "enum": [ - "bash" - ] + "description": "This is the number of the customer.", + "minLength": 3, + "maxLength": 40 + }, + "credentialId": { + "type": "string", + "description": "This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId." } }, "required": [ - "type", - "subType", + "provider", "id", "orgId", "createdAt", "updatedAt", - "name" + "credentialId" ] }, - "ComputerTool": { + "TwilioPhoneNumber": { "type": "object", "properties": { - "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", - "enum": [ - "computer" - ], - "description": "The type of tool. \"computer\" for Computer tool." + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "subType": { + "provider": { "type": "string", + "description": "This is to use numbers bought on Twilio.", "enum": [ - "computer_20241022" - ], - "description": "The sub type of tool." + "twilio" + ] }, "id": { "type": "string", - "description": "This is the unique identifier for the tool." + "description": "This is the unique identifier for the phone number." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." + "description": "This is the unique identifier for the org that this phone number belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "description": "This is the ISO 8601 date-time string of when the phone number was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." + "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, - "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" - } - ] + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" } ] }, - "name": { + "number": { "type": "string", - "description": "The name of the tool, fixed to 'computer'", - "default": "computer", - "enum": [ - "computer" - ] - }, - "displayWidthPx": { - "type": "number", - "description": "The display width in pixels" + "description": "These are the digits of the phone number you own on your Twilio." }, - "displayHeightPx": { - "type": "number", - "description": "The display height in pixels" + "twilioAccountSid": { + "type": "string", + "description": "This is the Twilio Account SID for the phone number." }, - "displayNumber": { - "type": "number", - "description": "Optional display number" + "twilioAuthToken": { + "type": "string", + "description": "This is the Twilio Auth Token for the phone number." } }, "required": [ - "type", - "subType", + "provider", "id", "orgId", "createdAt", "updatedAt", - "name", - "displayWidthPx", - "displayHeightPx" + "number", + "twilioAccountSid", + "twilioAuthToken" ] }, - "TextEditorTool": { + "VonagePhoneNumber": { "type": "object", "properties": { - "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", - "enum": [ - "textEditor" - ], - "description": "The type of tool. \"textEditor\" for Text Editor tool." + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "subType": { + "provider": { "type": "string", + "description": "This is to use numbers bought on Vonage.", "enum": [ - "text_editor_20241022" - ], - "description": "The sub type of tool." + "vonage" + ] }, "id": { "type": "string", - "description": "This is the unique identifier for the tool." + "description": "This is the unique identifier for the phone number." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the organization that this tool belongs to." + "description": "This is the unique identifier for the org that this phone number belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was created." + "description": "This is the ISO 8601 date-time string of when the phone number was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the tool was last updated." + "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, - "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" - } - ] + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" } ] }, - "name": { + "number": { "type": "string", - "description": "The name of the tool, fixed to 'str_replace_editor'", - "default": "str_replace_editor", - "enum": [ - "str_replace_editor" - ] + "description": "These are the digits of the phone number you own on your Vonage." + }, + "credentialId": { + "type": "string", + "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up." } }, "required": [ - "type", - "subType", + "provider", "id", "orgId", "createdAt", "updatedAt", - "name" + "number", + "credentialId" ] }, - "CreateOutputToolDTO": { + "SipAuthentication": { "type": "object", "properties": { - "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 + "realm": { + "type": "string", + "description": "This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to sip.vapi.ai." }, - "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" - } - ] - } + "username": { + "type": "string", + "description": "This will be expected in the `username` field of the `authorization` header of the SIP INVITE.", + "minLength": 20, + "maxLength": 40 }, - "type": { + "password": { + "type": "string", + "description": "This will be expected to generate the `response` field of the `authorization` header of the SIP INVITE, through digest authentication.", + "minLength": 20, + "maxLength": 40 + } + }, + "required": [ + "username", + "password" + ] + }, + "VapiPhoneNumber": { + "type": "object", + "properties": { + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] + }, + "provider": { "type": "string", + "description": "This is to create free SIP phone numbers on Vapi.", "enum": [ - "output" - ], - "description": "The type of tool. \"output\" for Output tool." + "vapi" + ] }, - "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.", + "id": { + "type": "string", + "description": "This is the unique identifier for the phone number." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this phone number belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the phone number was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the phone number was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { - "$ref": "#/components/schemas/OpenAIFunction" + "$ref": "#/components/schemas/Server" } ] }, - "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.", + "sipUri": { + "type": "string", + "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." + }, + "authentication": { + "description": "This enables authentication for incoming SIP INVITE requests to the `sipUri`.\n\nIf not set, any username/password to the 401 challenge of the SIP INVITE will be accepted.", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/SipAuthentication" } ] } }, "required": [ - "type" + "provider", + "id", + "orgId", + "createdAt", + "updatedAt", + "sipUri" ] }, - "CreateBashToolDTO": { + "CreateByoPhoneNumberDTO": { "type": "object", "properties": { - "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" - } - ] - } + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "type": { + "provider": { "type": "string", + "description": "This is to bring your own phone numbers from your own SIP trunks or Carriers.", "enum": [ - "bash" - ], - "description": "The type of tool. \"bash\" for Bash tool." + "byo-phone-number" + ] }, - "subType": { + "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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + "default": true + }, + "number": { "type": "string", - "enum": [ - "bash_20241022" - ], - "description": "The sub type of tool." + "description": "This is the number of the customer.", + "minLength": 3, + "maxLength": 40 + }, + "credentialId": { + "type": "string", + "description": "This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId." }, "name": { "type": "string", - "description": "The name of the tool, fixed to 'bash'", - "default": "bash", - "enum": [ - "bash" - ] + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "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" - } - ] + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" @@ -14676,87 +14785,60 @@ } }, "required": [ - "type", - "subType", - "name" + "provider", + "credentialId" ] }, - "CreateComputerToolDTO": { + "CreateTwilioPhoneNumberDTO": { "type": "object", "properties": { - "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" - } - ] - } + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "type": { + "provider": { "type": "string", + "description": "This is to use numbers bought on Twilio.", "enum": [ - "computer" - ], - "description": "The type of tool. \"computer\" for Computer tool." + "twilio" + ] }, - "subType": { + "number": { "type": "string", - "enum": [ - "computer_20241022" - ], - "description": "The sub type of tool." + "description": "These are the digits of the phone number you own on your Twilio." }, - "name": { + "twilioAccountSid": { "type": "string", - "description": "The name of the tool, fixed to 'computer'", - "default": "computer", - "enum": [ - "computer" - ] + "description": "This is the Twilio Account SID for the phone number." }, - "displayWidthPx": { - "type": "number", - "description": "The display width in pixels" + "twilioAuthToken": { + "type": "string", + "description": "This is the Twilio Auth Token for the phone number." }, - "displayHeightPx": { - "type": "number", - "description": "The display height in pixels" + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 }, - "displayNumber": { - "type": "number", - "description": "Optional display number" + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "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" - } - ] + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" @@ -14765,77 +14847,58 @@ } }, "required": [ - "type", - "subType", - "name", - "displayWidthPx", - "displayHeightPx" + "provider", + "number", + "twilioAccountSid", + "twilioAuthToken" ] }, - "CreateTextEditorToolDTO": { + "CreateVonagePhoneNumberDTO": { "type": "object", "properties": { - "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" - } - ] - } + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "type": { + "provider": { "type": "string", + "description": "This is to use numbers bought on Vonage.", "enum": [ - "textEditor" - ], - "description": "The type of tool. \"textEditor\" for Text Editor tool." + "vonage" + ] }, - "subType": { + "number": { "type": "string", - "enum": [ - "text_editor_20241022" - ], - "description": "The sub type of tool." + "description": "These are the digits of the phone number you own on your Vonage." + }, + "credentialId": { + "type": "string", + "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up." }, "name": { "type": "string", - "description": "The name of the tool, fixed to 'str_replace_editor'", - "default": "str_replace_editor", - "enum": [ - "str_replace_editor" - ] + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 }, - "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" - } - ] + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" @@ -14844,2636 +14907,3957 @@ } }, "required": [ - "type", - "subType", - "name" + "provider", + "number", + "credentialId" ] }, - "UpdateToolDTO": { + "CreateVapiPhoneNumberDTO": { "type": "object", "properties": { - "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 + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "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" - } - ] - } + "provider": { + "type": "string", + "description": "This is to create free SIP phone numbers on Vapi.", + "enum": [ + "vapi" + ] }, - "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.", + "sipUri": { + "type": "string", + "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." + }, + "authentication": { + "description": "This enables authentication for incoming SIP INVITE requests to the `sipUri`.\n\nIf not set, any username/password to the 401 challenge of the SIP INVITE will be accepted.", "allOf": [ { - "$ref": "#/components/schemas/OpenAIFunction" + "$ref": "#/components/schemas/SipAuthentication" } ] }, + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, "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.", + "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\n2. phoneNumber.server\n3. org.server", "allOf": [ { "$ref": "#/components/schemas/Server" } ] } - } - }, - "CreateFileDTO": { - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "This is the File you want to upload for use with the Knowledge Base.", - "format": "binary" - } }, "required": [ - "file" + "provider", + "sipUri" ] }, - "File": { + "UpdateByoPhoneNumberDTO": { "type": "object", "properties": { - "object": { - "type": "string", - "enum": [ - "file" + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } ] }, - "status": { - "enum": [ - "indexed", - "not_indexed" - ], - "type": "string" + "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 your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + "default": true }, "name": { "type": "string", - "description": "This is the name of the file. This is just for your own reference.", + "description": "This is the name of the phone number. This is just for your own reference.", "maxLength": 40 }, - "originalName": { - "type": "string" - }, - "bytes": { - "type": "number" - }, - "purpose": { - "type": "string" + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "mimetype": { - "type": "string" + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "key": { - "type": "string" + "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\n2. phoneNumber.server\n3. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] }, - "path": { - "type": "string" + "number": { + "type": "string", + "description": "This is the number of the customer.", + "minLength": 3, + "maxLength": 40 }, - "bucket": { - "type": "string" + "credentialId": { + "type": "string", + "description": "This is the credential of your own SIP trunk or Carrier (type `byo-sip-trunk`) which can be used to make calls to this phone number.\n\nYou can add the SIP trunk or Carrier credential in the Provider Credentials page on the Dashboard to get the credentialId." + } + } + }, + "UpdateTwilioPhoneNumberDTO": { + "type": "object", + "properties": { + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "url": { - "type": "string" + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 }, - "metadata": { - "type": "object" + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "id": { + "squadId": { "type": "string", - "description": "This is the unique identifier for the file." + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "orgId": { + "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\n2. phoneNumber.server\n3. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "number": { "type": "string", - "description": "This is the unique identifier for the org that this file belongs to." + "description": "These are the digits of the phone number you own on your Twilio." }, - "createdAt": { - "format": "date-time", + "twilioAccountSid": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the file was created." + "description": "This is the Twilio Account SID for the phone number." }, - "updatedAt": { - "format": "date-time", + "twilioAuthToken": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the file was last updated." + "description": "This is the Twilio Auth Token for the phone number." } - }, - "required": [ - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "UpdateFileDTO": { + "UpdateVonagePhoneNumberDTO": { "type": "object", "properties": { + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] + }, "name": { "type": "string", - "description": "This is the name of the file. This is just for your own reference.", - "minLength": 1, + "description": "This is the name of the phone number. This is just for your own reference.", "maxLength": 40 + }, + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "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\n2. phoneNumber.server\n3. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "number": { + "type": "string", + "description": "These are the digits of the phone number you own on your Vonage." + }, + "credentialId": { + "type": "string", + "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up." } } }, - "Metrics": { + "UpdateVapiPhoneNumberDTO": { "type": "object", "properties": { - "orgId": { - "type": "string" - }, - "rangeStart": { - "type": "string" - }, - "rangeEnd": { - "type": "string" + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "bill": { - "type": "number" + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 }, - "billWithinBillingLimit": { - "type": "boolean" + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "billDailyBreakdown": { - "type": "object" + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "callActive": { - "type": "number" + "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\n2. phoneNumber.server\n3. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] }, - "callActiveWithinConcurrencyLimit": { - "type": "boolean" + "sipUri": { + "type": "string", + "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." }, - "callMinutes": { - "type": "number" + "authentication": { + "description": "This enables authentication for incoming SIP INVITE requests to the `sipUri`.\n\nIf not set, any username/password to the 401 challenge of the SIP INVITE will be accepted.", + "allOf": [ + { + "$ref": "#/components/schemas/SipAuthentication" + } + ] + } + } + }, + "BuyPhoneNumberDTO": { + "type": "object", + "properties": { + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] }, - "callMinutesDailyBreakdown": { - "type": "object" + "areaCode": { + "type": "string", + "description": "This is the area code of the phone number to purchase.", + "minLength": 3, + "maxLength": 3 }, - "callMinutesAverage": { - "type": "number" + "name": { + "type": "string", + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 }, - "callMinutesAverageDailyBreakdown": { - "type": "object" + "assistantId": { + "type": "string", + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "callCount": { - "type": "number" + "squadId": { + "type": "string", + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "callCountDailyBreakdown": { - "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\n2. phoneNumber.server\n3. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] } }, "required": [ - "orgId", - "rangeStart", - "rangeEnd", - "bill", - "billWithinBillingLimit", - "billDailyBreakdown", - "callActive", - "callActiveWithinConcurrencyLimit", - "callMinutes", - "callMinutesDailyBreakdown", - "callMinutesAverage", - "callMinutesAverageDailyBreakdown", - "callCount", - "callCountDailyBreakdown" + "areaCode" ] }, - "TimeRange": { + "ImportVonagePhoneNumberDTO": { "type": "object", "properties": { - "step": { - "type": "string", - "description": "This is the time step for aggregations.\n\nIf not provided, defaults to returning for the entire time range.", - "enum": [ - "minute", - "hour", - "day", - "week", - "month", - "quarter", - "year", - "decade", - "century", - "millennium" + "fallbackDestination": { + "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } ] }, - "start": { - "format": "date-time", + "vonagePhoneNumber": { "type": "string", - "description": "This is the start date for the time range.\n\nIf not provided, defaults to the 7 days ago." + "description": "These are the digits of the phone number you own on your Vonage.", + "deprecated": true }, - "end": { - "format": "date-time", + "credentialId": { "type": "string", - "description": "This is the end date for the time range.\n\nIf not provided, defaults to now." + "description": "This is the credential that is used to make outgoing calls, and do operations like call transfer and hang up.\n\nYou can add the Vonage Credential in the Provider Credentials page on the dashboard to get the credentialId." }, - "timezone": { - "type": "string", - "description": "This is the timezone you want to set for the query.\n\nIf not provided, defaults to UTC." - } - } - }, - "AnalyticsOperation": { - "type": "object", - "properties": { - "operation": { + "name": { "type": "string", - "description": "This is the aggregation operation you want to perform.", - "enum": [ - "sum", - "avg", - "count", - "min", - "max" - ] + "description": "This is the name of the phone number. This is just for your own reference.", + "maxLength": 40 }, - "column": { + "assistantId": { "type": "string", - "description": "This is the columns you want to perform the aggregation operation on.", - "enum": [ - "id", - "cost", - "costBreakdown.llm", - "costBreakdown.stt", - "costBreakdown.tts", - "costBreakdown.vapi", - "costBreakdown.ttsCharacters", - "costBreakdown.llmPromptTokens", - "costBreakdown.llmCompletionTokens", - "duration" - ] + "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." }, - "alias": { + "squadId": { "type": "string", - "description": "This is the alias for column name returned. Defaults to `${operation}${column}`.", - "maxLength": 40 + "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." + }, + "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\n2. phoneNumber.server\n3. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] } }, "required": [ - "operation", - "column" + "vonagePhoneNumber", + "credentialId" ] }, - "AnalyticsQuery": { + "PhoneNumberPaginatedResponse": { "type": "object", "properties": { - "table": { - "type": "string", - "description": "This is the table you want to query.", - "enum": [ - "call" - ] - }, - "groupBy": { + "results": { "type": "array", - "description": "This is the list of columns you want to group by.", - "enum": [ - "type", - "assistantId", - "endedReason", - "analysis.successEvaluation", - "status" - ], + "description": "A list of phone numbers, which can be of any provider type.", "items": { - "type": "string", - "enum": [ - "type", - "assistantId", - "endedReason", - "analysis.successEvaluation", - "status" + "oneOf": [ + { + "$ref": "#/components/schemas/ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/VapiPhoneNumber" + } ] } }, + "metadata": { + "description": "Metadata about the pagination.", + "allOf": [ + { + "$ref": "#/components/schemas/PaginationMeta" + } + ] + } + }, + "required": [ + "results", + "metadata" + ] + }, + "Squad": { + "type": "object", + "properties": { "name": { "type": "string", - "description": "This is the name of the query. This will be used to identify the query in the response.", - "maxLength": 40 + "description": "This is the name of the squad." }, - "timeRange": { - "description": "This is the time range for the query.", + "members": { + "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SquadMemberDTO" + } + }, + "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.", "allOf": [ { - "$ref": "#/components/schemas/TimeRange" + "$ref": "#/components/schemas/AssistantOverrides" } ] }, - "operations": { - "description": "This is the list of operations you want to perform.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalyticsOperation" - } + "id": { + "type": "string", + "description": "This is the unique identifier for the squad." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this squad belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the squad was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the squad was last updated." } }, "required": [ - "table", - "name", - "operations" + "members", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "AnalyticsQueryDTO": { + "UpdateSquadDTO": { "type": "object", "properties": { - "queries": { - "description": "This is the list of metric queries you want to perform.", + "name": { + "type": "string", + "description": "This is the name of the squad." + }, + "members": { + "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", "type": "array", "items": { - "$ref": "#/components/schemas/AnalyticsQuery" + "$ref": "#/components/schemas/SquadMemberDTO" } - } - }, - "required": [ - "queries" - ] - }, - "AnalyticsQueryResult": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the unique key for the query." }, - "timeRange": { - "description": "This is the time range for the query.", + "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.", "allOf": [ { - "$ref": "#/components/schemas/TimeRange" + "$ref": "#/components/schemas/AssistantOverrides" } ] - }, - "result": { - "description": "This is the result of the query, a list of unique groups with result of their aggregations.\n\nExample:\n\"result\": [\n { \"date\": \"2023-01-01\", \"assistantId\": \"123\", \"endedReason\": \"customer-ended-call\", \"sumDuration\": 120, \"avgCost\": 10.5 },\n { \"date\": \"2023-01-02\", \"assistantId\": \"123\", \"endedReason\": \"customer-did-not-give-microphone-permission\", \"sumDuration\": 0, \"avgCost\": 0 },\n // Additional results\n]", - "type": "array", - "items": { - "type": "object" - } } }, "required": [ - "name", - "timeRange", - "result" + "members" ] }, - "CallLogPrivileged": { + "TrieveKnowledgeBaseVectorStoreSearchPlan": { "type": "object", "properties": { - "callId": { - "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 log belongs to." + "removeStopWords": { + "type": "boolean", + "description": "If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. This will preserve queries that are entirely stop words." }, - "log": { - "type": "string", - "description": "This is the log message associated with the call." + "scoreThreshold": { + "type": "number", + "description": "This is the score threshold to filter out chunks with a score below the threshold for cosine distance metric. For Manhattan Distance, Euclidean Distance, and Dot Product, it will filter out scores above the threshold distance. This threshold applies before weight and bias modifications. If not specified, this defaults to no threshold. A threshold of 0 will default to no threshold." }, - "level": { + "searchType": { "type": "string", - "description": "This is the level of the log message.", + "description": "This is the search method used when searching for relevant chunks from the vector store.", "enum": [ - "INFO", - "LOG", - "WARN", - "ERROR", - "CHECKPOINT" + "fulltext", + "semantic", + "hybrid", + "bm25" ] - }, - "time": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the log was created." } }, "required": [ - "callId", - "orgId", - "log", - "level", - "time" + "searchType" ] }, - "CallLogsPaginatedResponse": { + "TrieveKnowledgeBaseVectorStoreCreatePlan": { "type": "object", "properties": { - "results": { + "fileIds": { + "description": "These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.", "type": "array", "items": { - "$ref": "#/components/schemas/CallLogPrivileged" + "type": "string" } }, - "metadata": { - "$ref": "#/components/schemas/PaginationMeta" - } - }, - "required": [ - "results", - "metadata" - ] - }, - "Error": { - "type": "object", - "properties": { - "message": { - "type": "string" + "targetSplitsPerChunk": { + "type": "number", + "description": "This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number." + }, + "splitDelimiters": { + "description": "This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.", + "type": "array", + "items": { + "type": "string" + } + }, + "rebalanceChunks": { + "type": "boolean", + "description": "This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each." } }, "required": [ - "message" + "fileIds" ] }, - "Log": { + "TrieveKnowledgeBase": { "type": "object", "properties": { - "time": { + "provider": { "type": "string", - "description": "This is the timestamp at which the log was written." + "description": "This knowledge base is provided by Trieve.\n\nTo learn more about Trieve, visit https://trieve.ai.", + "enum": [ + "trieve" + ] }, - "orgId": { + "name": { "type": "string", - "description": "This is the unique identifier for the org that this log belongs to." + "description": "This is the name of the knowledge base." }, - "type": { - "type": "string", - "description": "This is the type of the log.", - "enum": [ - "API", - "Webhook", - "Call", - "Provider" + "vectorStoreSearchPlan": { + "description": "This is the plan on how to search the vector store while a call is going on.", + "allOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + } ] }, - "webhookType": { + "vectorStoreCreatePlan": { + "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", + "allOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + } + ] + }, + "vectorStoreProviderId": { "type": "string", - "description": "This is the type of the webhook, given the log is from a webhook." + "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." }, - "resource": { + "id": { "type": "string", - "description": "This is the specific resource, relevant only to API logs.", + "description": "This is the id of the knowledge base." + }, + "orgId": { + "type": "string", + "description": "This is the org id of the knowledge base." + } + }, + "required": [ + "provider", + "vectorStoreSearchPlan", + "id", + "orgId" + ] + }, + "CustomKnowledgeBase": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This knowledge base is bring your own knowledge base implementation.", "enum": [ - "org", - "assistant", - "analytics", - "credential", - "phone-number", - "block", - "voice-library", - "provider", - "tool", - "token", - "template", - "squad", - "call", - "file", - "metric", - "log" + "custom-knowledge-base" ] }, - "requestDurationSeconds": { - "type": "number", - "description": "'This is how long the request took.", - "minimum": 0 + "server": { + "description": "/**\nThis is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] }, - "requestStartedAt": { + "id": { "type": "string", - "description": "This is the timestamp at which the request began." + "description": "This is the id of the knowledge base." }, - "requestFinishedAt": { + "orgId": { "type": "string", - "description": "This is the timestamp at which the request finished." - }, - "requestBody": { - "type": "object", - "description": "This is the body of the request." - }, - "requestHttpMethod": { + "description": "This is the org id of the knowledge base." + } + }, + "required": [ + "provider", + "server", + "id", + "orgId" + ] + }, + "CreateTrieveKnowledgeBaseDTO": { + "type": "object", + "properties": { + "provider": { "type": "string", - "description": "This is the request method.", + "description": "This knowledge base is provided by Trieve.\n\nTo learn more about Trieve, visit https://trieve.ai.", "enum": [ - "POST", - "GET", - "PUT", - "PATCH", - "DELETE" + "trieve" ] }, - "requestUrl": { + "name": { "type": "string", - "description": "This is the request URL." + "description": "This is the name of the knowledge base." }, - "requestPath": { - "type": "string", - "description": "This is the request path." + "vectorStoreSearchPlan": { + "description": "This is the plan on how to search the vector store while a call is going on.", + "allOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + } + ] }, - "requestQuery": { + "vectorStoreCreatePlan": { + "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", + "allOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + } + ] + }, + "vectorStoreProviderId": { "type": "string", - "description": "This is the request query." + "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." + } + }, + "required": [ + "provider", + "vectorStoreSearchPlan" + ] + }, + "UpdateTrieveKnowledgeBaseDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the knowledge base." }, - "responseHttpCode": { - "type": "number", - "description": "This the HTTP status code of the response." + "vectorStoreSearchPlan": { + "description": "This is the plan on how to search the vector store while a call is going on.", + "allOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + } + ] }, - "requestIpAddress": { - "type": "string", - "description": "This is the request IP address." + "vectorStoreCreatePlan": { + "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", + "allOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + } + ] }, - "requestOrigin": { + "vectorStoreProviderId": { "type": "string", - "description": "This is the origin of the request" - }, - "responseBody": { - "type": "object", - "description": "This is the body of the response." + "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." + } + } + }, + "UpdateCustomKnowledgeBaseDTO": { + "type": "object", + "properties": { + "server": { + "description": "/**\nThis is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + } + } + }, + "ConversationBlock": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] + } }, - "requestHeaders": { - "type": "object", - "description": "These are the headers of the request." + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "error": { - "description": "This is the error, if one occurred.", + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", "allOf": [ { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/JsonSchema" } ] }, - "assistantId": { + "type": { "type": "string", - "description": "This is the ID of the assistant." + "description": "This block is used for conversation. This can be a free flow conversation or a conversation with a specific goal like collecting some information.\n\nFor free block conversation, put clearly in the `instruction` when the block can be considered done.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Chit chat with the user asking them about their day. When user asks a specific question or once you have talked to the user for a couple of turns of conversation, move on.\"\n}\n```\n\nFor conversation with a specific goal, you can define an `outputSchema` with required fields. The block won't be considered done until the user has provided all the required fields in the `outputSchema`.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Ask the user about their hobbies, hopes and dreams.\",\n \"outputSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"hobbies\": {\n \"type\": \"string\"\n },\n \"hopes\": {\n \"type\": \"string\"\n },\n \"dreams\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hobbies\"]\n }\n}\n```\nFor the above example, the conversation block will be considered done once the user has provided the `hobbies` (even if they have not provided the `hopes` and `dreams`).", + "enum": [ + "conversation" + ] }, - "phoneNumberId": { + "id": { "type": "string", - "description": "This is the ID of the phone number." + "description": "This is the unique identifier for the block." }, - "customerId": { + "orgId": { "type": "string", - "description": "This is the ID of the customer." + "description": "This is the unique identifier for the organization that this block belongs to." }, - "squadId": { + "createdAt": { + "format": "date-time", "type": "string", - "description": "This is the ID of the squad." + "description": "This is the ISO 8601 date-time string of when the block was created." }, - "callId": { + "updatedAt": { + "format": "date-time", "type": "string", - "description": "This is the ID of the call." + "description": "This is the ISO 8601 date-time string of when the block was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of the block. This is just for your reference." + }, + "instruction": { + "type": "string", + "description": "This is the instruction to the model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{input.your-property-name}}\" for the current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nThis can be as simple or as complex as you want it to be.\n- \"say hello and ask the user about their day!\"\n- \"collect the user's first and last name\"\n- \"user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "minLength": 1 } }, "required": [ - "time", - "orgId", "type", - "requestDurationSeconds", - "requestStartedAt", - "requestFinishedAt", - "requestBody", - "requestHttpMethod", - "requestUrl", - "requestPath", - "responseHttpCode" + "id", + "orgId", + "createdAt", + "updatedAt", + "instruction" ] }, - "LogsPaginatedResponse": { + "ToolCallBlock": { "type": "object", "properties": { - "results": { + "messages": { "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", "items": { - "$ref": "#/components/schemas/Log" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] } }, - "metadata": { - "$ref": "#/components/schemas/PaginationMeta" + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "type": { + "type": "string", + "description": "This block makes a tool call.", + "enum": [ + "tool-call" + ] + }, + "tool": { + "description": "This is the tool that the block will call. To use an existing tool, use `toolId`.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGhlToolDTO", + "title": "GhlTool" + }, + { + "$ref": "#/components/schemas/CreateMakeToolDTO", + "title": "MakeTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + } + ] + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the block." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the organization that this block belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the block was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the block was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of the block. This is just for your reference." + }, + "toolId": { + "type": "string", + "description": "This is the id of the tool that the block will call. To use a transient tool, use `tool`." } }, "required": [ - "results", - "metadata" + "type", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "ChatDTO": { + "WorkflowBlock": { "type": "object", "properties": { "messages": { "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", "items": { - "$ref": "#/components/schemas/OpenAIMessage" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] } }, - "assistantId": { - "type": "string" + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "assistant": { - "$ref": "#/components/schemas/CreateAssistantDTO" + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "assistantOverrides": { - "$ref": "#/components/schemas/AssistantOverrides" - } - }, - "required": [ - "messages" - ] - }, - "ChatServiceResponse": { - "type": "object", - "properties": {} - }, - "AnthropicCredential": { - "type": "object", - "properties": { - "provider": { + "type": { "type": "string", + "description": "This creates a workflow which can contain any number of steps (block executions).", "enum": [ - "anthropic" + "workflow" ] }, - "apiKey": { - "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." + "steps": { + "type": "array", + "description": "These are the steps in the workflow.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/HandoffStep", + "title": "HandoffStep" + }, + { + "$ref": "#/components/schemas/CallbackStep", + "title": "CallbackStep" + } + ] + } }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the block." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this block belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the block was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the block was last updated." }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the name of the block. This is just for your reference." } }, "required": [ - "provider", - "apiKey", + "type", "id", "orgId", "createdAt", "updatedAt" ] }, - "AnyscaleCredential": { + "RuleBasedCondition": { "type": "object", "properties": { - "provider": { + "type": { "type": "string", + "description": "This condition is based on a strict rule.", "enum": [ - "anyscale" + "rule-based" ] }, - "apiKey": { - "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." - }, - "createdAt": { - "format": "date-time", + "operator": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the operator you want to use to compare the left side and right side.\n\nThe operation becomes `(leftSide) operator (rightSide)`.", + "enum": [ + "eq", + "neq", + "gt", + "gte", + "lt", + "lte" + ] }, - "updatedAt": { - "format": "date-time", + "leftSide": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the left side of the operation.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{output.your-property-name}}\" for current step's output\n- \"{{input.your-property-name}}\" for current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nOr, you can use a constant:\n- \"1\"\n- \"text\"\n- \"true\"\n- \"false\"\n\nOr, you can mix and match with string interpolation:\n- \"{{your-property-name}}-{{input.your-property-name-2}}-1\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "maxLength": 1000 }, - "name": { + "rightSide": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the right side of the operation.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{output.your-property-name}}\" for current step's output\n- \"{{input.your-property-name}}\" for current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nOr, you can use a constant:\n- \"1\"\n- \"text\"\n- \"true\"\n- \"false\"\n\nOr, you can mix and match with string interpolation:\n- \"{{your-property-name}}-{{input.your-property-name-2}}-1\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "maxLength": 1000 } }, "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "type", + "operator", + "leftSide", + "rightSide" ] }, - "AssemblyAICredential": { + "ModelBasedCondition": { "type": "object", "properties": { - "provider": { + "type": { "type": "string", + "description": "This condition is based on a model.", "enum": [ - "assembly-ai" + "model-based" ] }, - "apiKey": { + "instruction": { "type": "string", - "description": "This is not returned in the API." + "description": "This is the instruction which should output a boolean value when passed to a model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{output.your-property-name}}\" for current step's output\n- \"{{input.your-property-name}}\" for current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nYou can also talk about the current step's output or input directly:\n- \"{{output.your-property-name}} is greater than 10\"\n- \"{{input.your-property-name}} is greater than 10\"\n\nExamples:\n - \"{{input.age}} is greater than 10\"\n - \"{{input.age}} is greater than {{input.age2}}\"\n - \"{{output.age}} is greater than 10\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.input/output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.input/output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "minLength": 1 + } + }, + "required": [ + "type", + "instruction" + ] + }, + "BlockStartMessage": { + "type": "object", + "properties": { + "contents": { + "type": "array", + "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TextContent", + "title": "Text" + } + ] + } }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "conditions": { + "type": "array", + "description": "This is an optional array of conditions that must be met for this message to be triggered.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ModelBasedCondition", + "title": "ModelBasedCondition" + }, + { + "$ref": "#/components/schemas/RuleBasedCondition", + "title": "RuleBasedCondition" + } + ] + } }, - "orgId": { + "type": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the message type that is triggered when the block starts.", + "enum": [ + "block-start" + ] }, - "createdAt": { - "format": "date-time", + "content": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the content that the assistant will say when this message is triggered.", + "maxLength": 1000 + } + }, + "required": [ + "type" + ] + }, + "BlockCompleteMessage": { + "type": "object", + "properties": { + "contents": { + "type": "array", + "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TextContent", + "title": "Text" + } + ] + } + }, + "conditions": { + "type": "array", + "description": "This is an optional array of conditions that must be met for this message to be triggered.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ModelBasedCondition", + "title": "ModelBasedCondition" + }, + { + "$ref": "#/components/schemas/RuleBasedCondition", + "title": "RuleBasedCondition" + } + ] + } }, - "updatedAt": { - "format": "date-time", + "type": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the message type that is triggered when the block completes.", + "enum": [ + "block-complete" + ] }, - "name": { + "content": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the content that the assistant will say when this message is triggered.", + "maxLength": 1000 } }, "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "type" ] }, - "AzureCredential": { + "CreateConversationBlockDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "azure" + "messages": { + "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] + } + }, + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } ] }, - "service": { - "type": "string", - "description": "This is the service being used in Azure.", - "enum": [ - "speech" - ], - "default": "speech" + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "region": { + "type": { "type": "string", - "description": "This is the region of the Azure resource.", + "description": "This block is used for conversation. This can be a free flow conversation or a conversation with a specific goal like collecting some information.\n\nFor free block conversation, put clearly in the `instruction` when the block can be considered done.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Chit chat with the user asking them about their day. When user asks a specific question or once you have talked to the user for a couple of turns of conversation, move on.\"\n}\n```\n\nFor conversation with a specific goal, you can define an `outputSchema` with required fields. The block won't be considered done until the user has provided all the required fields in the `outputSchema`.\n```\n{\n \"type\": \"conversation\",\n \"instruction\": \"Ask the user about their hobbies, hopes and dreams.\",\n \"outputSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"hobbies\": {\n \"type\": \"string\"\n },\n \"hopes\": {\n \"type\": \"string\"\n },\n \"dreams\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hobbies\"]\n }\n}\n```\nFor the above example, the conversation block will be considered done once the user has provided the `hobbies` (even if they have not provided the `hopes` and `dreams`).", "enum": [ - "australia", - "canada", - "eastus2", - "eastus", - "france", - "india", - "japan", - "uaenorth", - "northcentralus", - "norway", - "southcentralus", - "swedencentral", - "switzerland", - "uk", - "westus", - "westus3" + "conversation" ] }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API.", - "maxLength": 10000 - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." - }, - "updatedAt": { - "format": "date-time", + "instruction": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the instruction to the model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{input.your-property-name}}\" for the current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nThis can be as simple or as complex as you want it to be.\n- \"say hello and ask the user about their day!\"\n- \"collect the user's first and last name\"\n- \"user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "minLength": 1 }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the name of the block. This is just for your reference." } }, "required": [ - "provider", - "service", - "id", - "orgId", - "createdAt", - "updatedAt" + "type", + "instruction" ] }, - "AzureOpenAICredential": { + "CreateToolCallBlockDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "azure-openai" - ] - }, - "region": { - "type": "string", - "enum": [ - "australia", - "canada", - "eastus2", - "eastus", - "france", - "india", - "japan", - "uaenorth", - "northcentralus", - "norway", - "southcentralus", - "swedencentral", - "switzerland", - "uk", - "westus", - "westus3" - ] - }, - "models": { + "messages": { "type": "array", - "enum": [ - "gpt-4o-2024-08-06", - "gpt-4o-mini-2024-07-18", - "gpt-4o-2024-05-13", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-1106-preview", - "gpt-4-0613", - "gpt-35-turbo-0125", - "gpt-35-turbo-1106" - ], - "example": [ - "gpt-4-0125-preview", - "gpt-4-0613" - ], + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", "items": { - "type": "string", - "enum": [ - "gpt-4o-2024-08-06", - "gpt-4o-mini-2024-07-18", - "gpt-4o-2024-05-13", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-1106-preview", - "gpt-4-0613", - "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } ] } }, - "openAIKey": { - "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "orgId": { + "type": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This block makes a tool call.", + "enum": [ + "tool-call" + ] }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "tool": { + "description": "This is the tool that the block will call. To use an existing tool, use `toolId`.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGhlToolDTO", + "title": "GhlTool" + }, + { + "$ref": "#/components/schemas/CreateMakeToolDTO", + "title": "MakeTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + } + ] }, - "updatedAt": { - "format": "date-time", + "toolId": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the id of the tool that the block will call. To use a transient tool, use `tool`." }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - }, - "openAIEndpoint": { - "type": "string", - "maxLength": 10000 + "description": "This is the name of the block. This is just for your reference." } }, "required": [ - "provider", - "region", - "models", - "openAIKey", - "id", - "orgId", - "createdAt", - "updatedAt", - "openAIEndpoint" + "type" ] }, - "SipTrunkGateway": { + "CreateWorkflowBlockDTO": { "type": "object", "properties": { - "ip": { - "type": "string", - "description": "This is the address of the gateway. It can be an IPv4 address like 1.1.1.1 or a fully qualified domain name like my-sip-trunk.pstn.twilio.com." - }, - "port": { - "type": "number", - "description": "This is the port number of the gateway. Default is 5060.\n\n@default 5060", - "minimum": 1, - "maximum": 65535 - }, - "netmask": { - "type": "number", - "description": "This is the netmask of the gateway. Defaults to 32.\n\n@default 32", - "minimum": 24, - "maximum": 32 + "messages": { + "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] + } }, - "inboundEnabled": { - "type": "boolean", - "description": "This is whether inbound calls are allowed from this gateway. Default is true.\n\n@default true" + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "outboundEnabled": { - "type": "boolean", - "description": "This is whether outbound calls should be sent to this gateway. Default is true.\n\nNote, if netmask is less than 32, it doesn't affect the outbound IPs that are tried. 1 attempt is made to `ip:port`.\n\n@default true" + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "outboundProtocol": { + "type": { "type": "string", - "description": "This is the protocol to use for SIP signaling outbound calls. Default is udp.\n\n@default udp", + "description": "This creates a workflow which can contain any number of steps (block executions).", "enum": [ - "tls/srtp", - "tcp", - "tls", - "udp" + "workflow" ] }, - "optionsPingEnabled": { - "type": "boolean", - "description": "This is whether to send options ping to the gateway. This can be used to check if the gateway is reachable. Default is false.\n\nThis is useful for high availability setups where you want to check if the gateway is reachable before routing calls to it. Note, if no gateway for a trunk is reachable, outbound calls will be rejected.\n\n@default false" + "steps": { + "type": "array", + "description": "These are the steps in the workflow.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/HandoffStep", + "title": "HandoffStep" + }, + { + "$ref": "#/components/schemas/CallbackStep", + "title": "CallbackStep" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the block. This is just for your reference." } }, "required": [ - "ip" + "type" ] }, - "SipTrunkOutboundSipRegisterPlan": { + "UpdateConversationBlockDTO": { "type": "object", "properties": { - "domain": { - "type": "string" + "messages": { + "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] + } }, - "username": { - "type": "string" + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "realm": { - "type": "string" + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of the block. This is just for your reference." + }, + "instruction": { + "type": "string", + "description": "This is the instruction to the model.\n\nYou can reference any variable in the context of the current block execution (step):\n- \"{{input.your-property-name}}\" for the current step's input\n- \"{{your-step-name.output.your-property-name}}\" for another step's output (in the same workflow; read caveat #1)\n- \"{{your-step-name.input.your-property-name}}\" for another step's input (in the same workflow; read caveat #1)\n- \"{{your-block-name.output.your-property-name}}\" for another block's output (in the same workflow; read caveat #2)\n- \"{{your-block-name.input.your-property-name}}\" for another block's input (in the same workflow; read caveat #2)\n- \"{{workflow.input.your-property-name}}\" for the current workflow's input\n- \"{{global.your-property-name}}\" for the global context\n\nThis can be as simple or as complex as you want it to be.\n- \"say hello and ask the user about their day!\"\n- \"collect the user's first and last name\"\n- \"user is {{input.firstName}} {{input.lastName}}. their age is {{input.age}}. ask them about their salary and if they might be interested in buying a house. we offer {{input.offer}}\"\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output/input.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output/input.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "minLength": 1 } } }, - "SipTrunkOutboundAuthenticationPlan": { + "UpdateToolCallBlockDTO": { "type": "object", "properties": { - "authPassword": { + "messages": { + "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] + } + }, + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "tool": { + "description": "This is the tool that the block will call. To use an existing tool, use `toolId`.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGhlToolDTO", + "title": "GhlTool" + }, + { + "$ref": "#/components/schemas/CreateMakeToolDTO", + "title": "MakeTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + } + ] + }, + "name": { "type": "string", - "description": "This is not returned in the API." + "description": "This is the name of the block. This is just for your reference." }, - "authUsername": { - "type": "string" + "toolId": { + "type": "string", + "description": "This is the id of the tool that the block will call. To use a transient tool, use `tool`." + } + } + }, + "UpdateWorkflowBlockDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the pre-configured messages that will be spoken to the user while the block is running.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BlockStartMessage", + "title": "BlockStartMessage" + }, + { + "$ref": "#/components/schemas/BlockCompleteMessage", + "title": "BlockCompleteMessage" + } + ] + } + }, + "inputSchema": { + "description": "This is the input schema for the block. This is the input the block needs to run. It's given to the block as `steps[0].input`\n\nThese are accessible as variables:\n- ({{input.propertyName}}) in context of the block execution (step)\n- ({{stepName.input.propertyName}}) in context of the workflow", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "sipRegisterPlan": { - "description": "This can be used to configure if SIP register is required by the SIP trunk. If not provided, no SIP registration will be attempted.", + "outputSchema": { + "description": "This is the output schema for the block. This is the output the block will return to the workflow (`{{stepName.output}}`).\n\nThese are accessible as variables:\n- ({{output.propertyName}}) in context of the block execution (step)\n- ({{stepName.output.propertyName}}) in context of the workflow (read caveat #1)\n- ({{blockName.output.propertyName}}) in context of the workflow (read caveat #2)\n\nCaveats:\n1. a workflow can execute a step multiple times. example, if a loop is used in the graph. {{stepName.output.propertyName}} will reference the latest usage of the step.\n2. a workflow can execute a block multiple times. example, if a step is called multiple times or if a block is used in multiple steps. {{blockName.output.propertyName}} will reference the latest usage of the block. this liquid variable is just provided for convenience when creating blocks outside of a workflow with steps.", "allOf": [ { - "$ref": "#/components/schemas/SipTrunkOutboundSipRegisterPlan" + "$ref": "#/components/schemas/JsonSchema" } ] + }, + "steps": { + "type": "array", + "description": "These are the steps in the workflow.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/HandoffStep", + "title": "HandoffStep" + }, + { + "$ref": "#/components/schemas/CallbackStep", + "title": "CallbackStep" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the block. This is just for your reference." } } }, - "SbcConfiguration": { - "type": "object", - "properties": {} - }, - "ByoSipTrunkCredential": { + "DtmfTool": { "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 can be used to bring your own SIP trunks or to connect to a Carrier.", "enum": [ - "byo-sip-trunk" - ] + "dtmf" + ], + "description": "The type of tool. \"dtmf\" for DTMF tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - }, - "gateways": { - "description": "This is the list of SIP trunk's gateways.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SipTrunkGateway" - } + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "outboundAuthenticationPlan": { - "description": "This can be used to configure the outbound authentication if required by the SIP trunk.", + "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/SipTrunkOutboundAuthenticationPlan" + "$ref": "#/components/schemas/OpenAIFunction" } ] }, - "outboundLeadingPlusEnabled": { - "type": "boolean", - "description": "This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false" - }, - "techPrefix": { - "type": "string", - "description": "This can be used to configure the tech prefix on outbound calls. This is an advanced property.", - "maxLength": 10000 - }, - "sipDiversionHeader": { - "type": "string", - "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", - "maxLength": 10000 - }, - "sbcConfiguration": { - "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", + "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/SbcConfiguration" + "$ref": "#/components/schemas/Server" } ] } }, "required": [ + "type", "id", "orgId", "createdAt", - "updatedAt", - "gateways" + "updatedAt" ] }, - "CartesiaCredential": { + "EndCallTool": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "cartesia" - ] + "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 }, - "apiKey": { + "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 not returned in the API." + "enum": [ + "endCall" + ], + "description": "The type of tool. \"endCall\" for End Call tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] + }, + "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", - "apiKey", + "type", "id", "orgId", "createdAt", "updatedAt" ] }, - "OAuth2AuthenticationPlan": { + "FunctionTool": { "type": "object", "properties": { + "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", "enum": [ - "oauth2" - ] + "function" + ], + "description": "The type of tool. \"function\" for Function tool." }, - "url": { + "id": { "type": "string", - "description": "This is the OAuth2 URL." + "description": "This is the unique identifier for the tool." }, - "clientId": { + "orgId": { "type": "string", - "description": "This is the OAuth2 client ID." + "description": "This is the unique identifier for the organization that this tool belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was last updated." + }, + "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" + } + ] }, - "clientSecret": { - "type": "string", - "description": "This is the OAuth2 client secret." + "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": [ "type", - "url", - "clientId", - "clientSecret" + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "Oauth2AuthenticationSession": { + "GhlTool": { "type": "object", "properties": { - "accessToken": { - "type": "string", - "description": "This is the OAuth2 access token." + "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 }, - "expiresAt": { - "format": "date-time", - "type": "string", - "description": "This is the OAuth2 access token expiration." - } - } - }, - "CustomLLMCredential": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": [ - "custom-llm" - ] + "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" + } + ] + } }, - "apiKey": { + "type": { "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." - }, - "authenticationPlan": { - "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", - "allOf": [ - { - "$ref": "#/components/schemas/OAuth2AuthenticationPlan" - } - ] + "enum": [ + "ghl" + ], + "description": "The type of tool. \"ghl\" for GHL tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "authenticationSession": { - "description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.", + "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/Oauth2AuthenticationSession" + "$ref": "#/components/schemas/OpenAIFunction" } ] }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/GhlToolMetadata" } }, "required": [ - "provider", - "apiKey", + "type", "id", "orgId", "createdAt", - "updatedAt" + "updatedAt", + "metadata" ] }, - "DeepgramCredential": { + "MakeTool": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "deepgram" - ] + "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 }, - "apiKey": { + "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 not returned in the API." + "enum": [ + "make" + ], + "description": "The type of tool. \"make\" for Make tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] }, - "apiUrl": { - "type": "string", - "description": "This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com." + "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" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/MakeToolMetadata" } }, "required": [ - "provider", - "apiKey", + "type", "id", "orgId", "createdAt", - "updatedAt" + "updatedAt", + "metadata" ] }, - "DeepInfraCredential": { + "TransferCallTool": { "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", "enum": [ - "deepinfra" + "transferCall" ] }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "destinations": { + "type": "array", + "description": "These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationAssistant", + "title": "Assistant" + }, + { + "$ref": "#/components/schemas/TransferDestinationStep", + "title": "Step" + }, + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "Number" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "Sip" + } + ] + } }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] + }, + "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", - "apiKey", + "type", "id", "orgId", "createdAt", "updatedAt" ] }, - "ElevenLabsCredential": { + "OutputTool": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "11labs" - ] + "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 }, - "apiKey": { + "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", - "maxLength": 10000, - "description": "This is not returned in the API." + "enum": [ + "output" + ], + "description": "The type of tool. \"output\" for Output tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] + }, + "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", - "apiKey", + "type", "id", "orgId", "createdAt", "updatedAt" ] }, - "GcpKey": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of the key. Most likely, this is \"service_account\"." - }, - "projectId": { - "type": "string", - "description": "This is the ID of the Google Cloud project associated with this key." - }, - "privateKeyId": { - "type": "string", - "description": "This is the unique identifier for the private key." - }, - "privateKey": { - "type": "string", - "description": "This is the private key in PEM format.\n\nNote: This is not returned in the API." - }, - "clientEmail": { - "type": "string", - "description": "This is the email address associated with the service account." - }, - "clientId": { - "type": "string", - "description": "This is the unique identifier for the client." - }, - "authUri": { - "type": "string", - "description": "This is the URI for the auth provider's authorization endpoint." - }, - "tokenUri": { - "type": "string", - "description": "This is the URI for the auth provider's token endpoint." - }, - "authProviderX509CertUrl": { - "type": "string", - "description": "This is the URL of the public x509 certificate for the auth provider." - }, - "clientX509CertUrl": { - "type": "string", - "description": "This is the URL of the public x509 certificate for the client." - }, - "universeDomain": { - "type": "string", - "description": "This is the domain associated with the universe this service account belongs to." - } - }, - "required": [ - "type", - "projectId", - "privateKeyId", - "privateKey", - "clientEmail", - "clientId", - "authUri", - "tokenUri", - "authProviderX509CertUrl", - "clientX509CertUrl", - "universeDomain" - ] - }, - "BucketPlan": { + "BashTool": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "This is the name of the bucket." - }, - "region": { - "type": "string", - "description": "This is the region of the bucket.\n\nUsage:\n- If `credential.type` is `aws`, then this is required.\n- If `credential.type` is `gcp`, then this is optional since GCP allows buckets to be accessed without a region but region is required for data residency requirements. Read here: https://cloud.google.com/storage/docs/request-endpoints" + "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 }, - "path": { - "type": "string", - "description": "This is the path where call artifacts will be stored.\n\nUsage:\n- To store call artifacts in a specific folder, set this to the full path. Eg. \"/folder-name1/folder-name2\".\n- To store call artifacts in the root of the bucket, leave this blank.\n\n@default \"/\"" + "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" + } + ] + } }, - "hmacAccessKey": { + "type": { "type": "string", - "description": "This is the HMAC access key offered by GCP for interoperability with S3 clients. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console\n\nUsage:\n- If `credential.type` is `gcp`, then this is required.\n- If `credential.type` is `aws`, then this is not required since credential.awsAccessKeyId is used instead." + "enum": [ + "bash" + ], + "description": "The type of tool. \"bash\" for Bash tool." }, - "hmacSecret": { - "type": "string", - "description": "This is the secret for the HMAC access key. Here is the guide on how to create: https://cloud.google.com/storage/docs/authentication/managing-hmackeys#console\n\nUsage:\n- If `credential.type` is `gcp`, then this is required.\n- If `credential.type` is `aws`, then this is not required since credential.awsSecretAccessKey is used instead.\n\nNote: This is not returned in the API." - } - }, - "required": [ - "name" - ] - }, - "GcpCredential": { - "type": "object", - "properties": { - "provider": { + "subType": { "type": "string", "enum": [ - "gcp" - ] + "bash_20241022" + ], + "description": "The sub type of tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the ISO 8601 date-time string of when the tool was last updated." }, - "gcpKey": { - "description": "This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", + "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/GcpKey" + "$ref": "#/components/schemas/OpenAIFunction" } ] }, - "bucketPlan": { - "description": "This is the bucket plan that can be provided to store call artifacts in GCP.", + "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/BucketPlan" + "$ref": "#/components/schemas/Server" } ] + }, + "name": { + "type": "string", + "description": "The name of the tool, fixed to 'bash'", + "default": "bash", + "enum": [ + "bash" + ] } }, "required": [ - "provider", + "type", + "subType", "id", "orgId", "createdAt", "updatedAt", - "gcpKey" + "name" ] }, - "GladiaCredential": { + "ComputerTool": { "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", "enum": [ - "gladia" - ] + "computer" + ], + "description": "The type of tool. \"computer\" for Computer tool." }, - "apiKey": { + "subType": { "type": "string", - "description": "This is not returned in the API." + "enum": [ + "computer_20241022" + ], + "description": "The sub type of tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." + }, + "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" + } + ] + }, + "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" + } + ] }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "The name of the tool, fixed to 'computer'", + "default": "computer", + "enum": [ + "computer" + ] + }, + "displayWidthPx": { + "type": "number", + "description": "The display width in pixels" + }, + "displayHeightPx": { + "type": "number", + "description": "The display height in pixels" + }, + "displayNumber": { + "type": "number", + "description": "Optional display number" } }, "required": [ - "provider", - "apiKey", + "type", + "subType", "id", "orgId", "createdAt", - "updatedAt" + "updatedAt", + "name", + "displayWidthPx", + "displayHeightPx" ] }, - "GoHighLevelCredential": { + "TextEditorTool": { "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", "enum": [ - "gohighlevel" - ] + "textEditor" + ], + "description": "The type of tool. \"textEditor\" for Text Editor tool." }, - "apiKey": { + "subType": { "type": "string", - "description": "This is not returned in the API." + "enum": [ + "text_editor_20241022" + ], + "description": "The sub type of tool." }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the tool." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the organization that this tool belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the tool was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the ISO 8601 date-time string of when the tool was last updated." + }, + "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" + } + ] + }, + "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" + } + ] }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "The name of the tool, fixed to 'str_replace_editor'", + "default": "str_replace_editor", + "enum": [ + "str_replace_editor" + ] } }, "required": [ - "provider", - "apiKey", + "type", + "subType", "id", "orgId", "createdAt", - "updatedAt" + "updatedAt", + "name" + ] + }, + "CreateOutputToolDTO": { + "type": "object", + "properties": { + "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", + "enum": [ + "output" + ], + "description": "The type of tool. \"output\" for Output 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" + } + ] + }, + "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": [ + "type" ] }, - "GoogleCredential": { + "CreateBashToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "description": "This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey", - "enum": [ - "google" - ] + "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 }, - "apiKey": { - "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." + "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" + } + ] + } }, - "id": { + "type": { "type": "string", - "description": "This is the unique identifier for the credential." + "enum": [ + "bash" + ], + "description": "The type of tool. \"bash\" for Bash tool." }, - "orgId": { + "subType": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "enum": [ + "bash_20241022" + ], + "description": "The sub type of tool." }, - "createdAt": { - "format": "date-time", + "name": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "The name of the tool, fixed to 'bash'", + "default": "bash", + "enum": [ + "bash" + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "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" + } + ] }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "type", + "subType", + "name" ] }, - "GroqCredential": { + "CreateComputerToolDTO": { "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", "enum": [ - "groq" - ] + "computer" + ], + "description": "The type of tool. \"computer\" for Computer tool." }, - "apiKey": { + "subType": { "type": "string", - "description": "This is not returned in the API." + "enum": [ + "computer_20241022" + ], + "description": "The sub type of tool." }, - "id": { + "name": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "The name of the tool, fixed to 'computer'", + "default": "computer", + "enum": [ + "computer" + ] }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "displayWidthPx": { + "type": "number", + "description": "The display width in pixels" }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "displayHeightPx": { + "type": "number", + "description": "The display height in pixels" }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "displayNumber": { + "type": "number", + "description": "Optional display number" }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] + }, + "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", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "type", + "subType", + "name", + "displayWidthPx", + "displayHeightPx" ] }, - "InflectionAICredential": { + "CreateTextEditorToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "description": "This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup", - "enum": [ - "inflection-ai" - ] - }, - "apiKey": { - "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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 }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "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" + } + ] + } }, - "createdAt": { - "format": "date-time", + "type": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "enum": [ + "textEditor" + ], + "description": "The type of tool. \"textEditor\" for Text Editor tool." }, - "updatedAt": { - "format": "date-time", + "subType": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "enum": [ + "text_editor_20241022" + ], + "description": "The sub type of tool." }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "The name of the tool, fixed to 'str_replace_editor'", + "default": "str_replace_editor", + "enum": [ + "str_replace_editor" + ] + }, + "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" + } + ] + }, + "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", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "type", + "subType", + "name" ] }, - "LangfuseCredential": { + "UpdateDtmfToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "langfuse" + "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" + } + ] + } + }, + "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" + } ] }, - "publicKey": { - "type": "string", - "description": "The public key for Langfuse project. Eg: pk-lf-..." + "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" + } + ] + } + } + }, + "UpdateEndCallToolDTO": { + "type": "object", + "properties": { + "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 }, - "apiKey": { - "type": "string", - "description": "The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API." + "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" + } + ] + } }, - "apiUrl": { - "type": "string", - "description": "The host URL for Langfuse project. Eg: https://cloud.langfuse.com" + "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" + } + ] }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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" + } + ] + } + } + }, + "UpdateFunctionToolDTO": { + "type": "object", + "properties": { + "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 }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "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" + } + ] + } }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "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" + } + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "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" + } + ] + } + } + }, + "UpdateGhlToolDTO": { + "type": "object", + "properties": { + "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 }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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" + } + ] + } + }, + "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" + } + ] + }, + "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" + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/GhlToolMetadata" } - }, - "required": [ - "provider", - "publicKey", - "apiKey", - "apiUrl", - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "LmntCredential": { + "UpdateMakeToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "lmnt" - ] - }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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 }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "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" + } + ] + } }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "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" + } + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "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" + } + ] }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "metadata": { + "$ref": "#/components/schemas/MakeToolMetadata" } - }, - "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "MakeCredential": { + "UpdateTransferCallToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "make" - ] - }, - "teamId": { - "type": "string", - "description": "Team ID" + "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 }, - "region": { - "type": "string", - "description": "Region of your application. For example: eu1, eu2, us1, us2" + "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" + } + ] + } }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "destinations": { + "type": "array", + "description": "These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationAssistant", + "title": "Assistant" + }, + { + "$ref": "#/components/schemas/TransferDestinationStep", + "title": "Step" + }, + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "Number" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "Sip" + } + ] + } }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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" + } + ] }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "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" + } + ] + } + } + }, + "UpdateOutputToolDTO": { + "type": "object", + "properties": { + "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 }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "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" + } + ] + } }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "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" + } + ] }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "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", - "teamId", - "region", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "OpenAICredential": { + "UpdateBashToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "openai" - ] - }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "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 }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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" + } + ] + } }, - "orgId": { + "subType": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "enum": [ + "bash_20241022" + ], + "description": "The sub type of tool." }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "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" + } + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "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" + } + ] }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "The name of the tool, fixed to 'bash'", + "default": "bash", + "enum": [ + "bash" + ] } - }, - "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "OpenRouterCredential": { + "UpdateComputerToolDTO": { "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" + } + ] + } + }, + "subType": { "type": "string", "enum": [ - "openrouter" - ] + "computer_20241022" + ], + "description": "The sub type of tool." }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "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" + } + ] }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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" + } + ] }, - "orgId": { + "name": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "The name of the tool, fixed to 'computer'", + "default": "computer", + "enum": [ + "computer" + ] }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "displayWidthPx": { + "type": "number", + "description": "The display width in pixels" }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "displayHeightPx": { + "type": "number", + "description": "The display height in pixels" }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "displayNumber": { + "type": "number", + "description": "Optional display number" } - }, - "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "PerplexityAICredential": { + "UpdateTextEditorToolDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "perplexity-ai" - ] - }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "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 }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "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" + } + ] + } }, - "orgId": { + "subType": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "enum": [ + "text_editor_20241022" + ], + "description": "The sub type of tool." }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "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" + } + ] }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "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" + } + ] }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "The name of the tool, fixed to 'str_replace_editor'", + "default": "str_replace_editor", + "enum": [ + "str_replace_editor" + ] + } + } + }, + "CreateFileDTO": { + "type": "object", + "properties": { + "file": { + "type": "string", + "description": "This is the File you want to upload for use with the Knowledge Base.", + "format": "binary" } }, "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "file" ] }, - "PlayHTCredential": { + "File": { "type": "object", "properties": { - "provider": { + "object": { "type": "string", "enum": [ - "playht" + "file" ] }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "status": { + "enum": [ + "indexed", + "not_indexed" + ], + "type": "string" }, - "id": { + "name": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the name of the file. This is just for your own reference.", + "maxLength": 40 }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "originalName": { + "type": "string" }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "bytes": { + "type": "number" }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "purpose": { + "type": "string" }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "mimetype": { + "type": "string" }, - "userId": { + "key": { "type": "string" - } - }, - "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt", - "userId" - ] - }, - "RimeAICredential": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": [ - "rime-ai" - ] }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "path": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "url": { + "type": "string" + }, + "metadata": { + "type": "object" }, "id": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the file." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the org that this file belongs to." }, "createdAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ISO 8601 date-time string of when the file was created." }, "updatedAt": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the ISO 8601 date-time string of when the file was last updated." } }, "required": [ - "provider", - "apiKey", "id", "orgId", "createdAt", "updatedAt" ] }, - "RunpodCredential": { + "UpdateFileDTO": { "type": "object", "properties": { - "provider": { + "name": { "type": "string", - "enum": [ - "runpod" - ] + "description": "This is the name of the file. This is just for your own reference.", + "minLength": 1, + "maxLength": 40 + } + } + }, + "Metrics": { + "type": "object", + "properties": { + "orgId": { + "type": "string" }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." + "rangeStart": { + "type": "string" }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." + "rangeEnd": { + "type": "string" }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "bill": { + "type": "number" }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "billWithinBillingLimit": { + "type": "boolean" }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "billDailyBreakdown": { + "type": "object" }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "callActive": { + "type": "number" + }, + "callActiveWithinConcurrencyLimit": { + "type": "boolean" + }, + "callMinutes": { + "type": "number" + }, + "callMinutesDailyBreakdown": { + "type": "object" + }, + "callMinutesAverage": { + "type": "number" + }, + "callMinutesAverageDailyBreakdown": { + "type": "object" + }, + "callCount": { + "type": "number" + }, + "callCountDailyBreakdown": { + "type": "object" } }, "required": [ - "provider", - "apiKey", - "id", "orgId", - "createdAt", - "updatedAt" + "rangeStart", + "rangeEnd", + "bill", + "billWithinBillingLimit", + "billDailyBreakdown", + "callActive", + "callActiveWithinConcurrencyLimit", + "callMinutes", + "callMinutesDailyBreakdown", + "callMinutesAverage", + "callMinutesAverageDailyBreakdown", + "callCount", + "callCountDailyBreakdown" ] }, - "S3Credential": { + "TimeRange": { "type": "object", "properties": { - "provider": { + "step": { "type": "string", + "description": "This is the time step for aggregations.\n\nIf not provided, defaults to returning for the entire time range.", "enum": [ - "s3" - ], - "description": "Credential provider. Only allowed value is s3" - }, - "awsAccessKeyId": { - "type": "string", - "description": "AWS access key ID." - }, - "awsSecretAccessKey": { - "type": "string", - "description": "AWS access key secret. This is not returned in the API." - }, - "region": { - "type": "string", - "description": "AWS region in which the S3 bucket is located." - }, - "s3BucketName": { - "type": "string", - "description": "AWS S3 bucket name." - }, - "s3PathPrefix": { - "type": "string", - "description": "The path prefix for the uploaded recording. Ex. \"recordings/\"" - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year", + "decade", + "century", + "millennium" + ] }, - "createdAt": { + "start": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the start date for the time range.\n\nIf not provided, defaults to the 7 days ago." }, - "updatedAt": { + "end": { "format": "date-time", "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the end date for the time range.\n\nIf not provided, defaults to now." }, - "name": { + "timezone": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the timezone you want to set for the query.\n\nIf not provided, defaults to UTC." } - }, - "required": [ - "provider", - "awsAccessKeyId", - "awsSecretAccessKey", - "region", - "s3BucketName", - "s3PathPrefix", - "id", - "orgId", - "createdAt", - "updatedAt" - ] + } }, - "TavusCredential": { + "AnalyticsOperation": { "type": "object", "properties": { - "provider": { + "operation": { "type": "string", + "description": "This is the aggregation operation you want to perform.", "enum": [ - "tavus" + "sum", + "avg", + "count", + "min", + "max" ] }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." - }, - "updatedAt": { - "format": "date-time", + "column": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the columns you want to perform the aggregation operation on.", + "enum": [ + "id", + "cost", + "costBreakdown.llm", + "costBreakdown.stt", + "costBreakdown.tts", + "costBreakdown.vapi", + "costBreakdown.ttsCharacters", + "costBreakdown.llmPromptTokens", + "costBreakdown.llmCompletionTokens", + "duration" + ] }, - "name": { + "alias": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, + "description": "This is the alias for column name returned. Defaults to `${operation}${column}`.", "maxLength": 40 } }, "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "operation", + "column" ] }, - "TogetherAICredential": { + "AnalyticsQuery": { "type": "object", "properties": { - "provider": { + "table": { "type": "string", + "description": "This is the table you want to query.", "enum": [ - "together-ai" + "call" ] }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "groupBy": { + "type": "array", + "description": "This is the list of columns you want to group by.", + "enum": [ + "type", + "assistantId", + "endedReason", + "analysis.successEvaluation", + "status" + ], + "items": { + "type": "string", + "enum": [ + "type", + "assistantId", + "endedReason", + "analysis.successEvaluation", + "status" + ] + } }, "name": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, + "description": "This is the name of the query. This will be used to identify the query in the response.", "maxLength": 40 + }, + "timeRange": { + "description": "This is the time range for the query.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeRange" + } + ] + }, + "operations": { + "description": "This is the list of operations you want to perform.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AnalyticsOperation" + } } }, "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" + "table", + "name", + "operations" ] }, - "TwilioCredential": { + "AnalyticsQueryDTO": { "type": "object", "properties": { - "provider": { + "queries": { + "description": "This is the list of metric queries you want to perform.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AnalyticsQuery" + } + } + }, + "required": [ + "queries" + ] + }, + "AnalyticsQueryResult": { + "type": "object", + "properties": { + "name": { "type": "string", - "enum": [ - "twilio" - ] + "description": "This is the unique key for the query." }, - "authToken": { - "type": "string", - "description": "This is not returned in the API." + "timeRange": { + "description": "This is the time range for the query.", + "allOf": [ + { + "$ref": "#/components/schemas/TimeRange" + } + ] }, - "id": { + "result": { + "description": "This is the result of the query, a list of unique groups with result of their aggregations.\n\nExample:\n\"result\": [\n { \"date\": \"2023-01-01\", \"assistantId\": \"123\", \"endedReason\": \"customer-ended-call\", \"sumDuration\": 120, \"avgCost\": 10.5 },\n { \"date\": \"2023-01-02\", \"assistantId\": \"123\", \"endedReason\": \"customer-did-not-give-microphone-permission\", \"sumDuration\": 0, \"avgCost\": 0 },\n // Additional results\n]", + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "name", + "timeRange", + "result" + ] + }, + "CallLogPrivileged": { + "type": "object", + "properties": { + "callId": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the unique identifier for the call." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the unique identifier for the org that this call log belongs to." }, - "createdAt": { - "format": "date-time", + "log": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the log message associated with the call." }, - "updatedAt": { - "format": "date-time", + "level": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the level of the log message.", + "enum": [ + "INFO", + "LOG", + "WARN", + "ERROR", + "CHECKPOINT" + ] }, - "name": { + "time": { + "format": "date-time", "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the ISO 8601 date-time string of when the log was created." + } + }, + "required": [ + "callId", + "orgId", + "log", + "level", + "time" + ] + }, + "CallLogsPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallLogPrivileged" + } }, - "accountSid": { + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, + "Error": { + "type": "object", + "properties": { + "message": { "type": "string" } }, "required": [ - "provider", - "authToken", - "id", - "orgId", - "createdAt", - "updatedAt", - "accountSid" + "message" ] }, - "VonageCredential": { + "Log": { "type": "object", "properties": { - "vonageApplicationPrivateKey": { + "time": { "type": "string", - "description": "This is not returned in the API.", - "maxLength": 10000 + "description": "This is the timestamp at which the log was written." }, - "provider": { + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this log belongs to." + }, + "type": { "type": "string", + "description": "This is the type of the log.", "enum": [ - "vonage" + "API", + "Webhook", + "Call", + "Provider" ] }, - "apiSecret": { + "webhookType": { "type": "string", - "description": "This is not returned in the API." + "description": "This is the type of the webhook, given the log is from a webhook." }, - "id": { + "resource": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the specific resource, relevant only to API logs.", + "enum": [ + "org", + "assistant", + "analytics", + "credential", + "phone-number", + "block", + "voice-library", + "provider", + "tool", + "token", + "template", + "squad", + "call", + "file", + "metric", + "log" + ] }, - "orgId": { + "requestDurationSeconds": { + "type": "number", + "description": "'This is how long the request took.", + "minimum": 0 + }, + "requestStartedAt": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the timestamp at which the request began." }, - "createdAt": { - "format": "date-time", + "requestFinishedAt": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the timestamp at which the request finished." }, - "updatedAt": { - "format": "date-time", + "requestBody": { + "type": "object", + "description": "This is the body of the request." + }, + "requestHttpMethod": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + "description": "This is the request method.", + "enum": [ + "POST", + "GET", + "PUT", + "PATCH", + "DELETE" + ] }, - "vonageApplicationId": { + "requestUrl": { "type": "string", - "description": "This is the Vonage Application ID for the credential.\n\nOnly relevant for Vonage credentials.", - "maxLength": 10000 + "description": "This is the request URL." }, - "name": { + "requestPath": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the request path." }, - "apiKey": { - "type": "string" - } - }, - "required": [ - "vonageApplicationPrivateKey", - "provider", - "apiSecret", - "id", - "orgId", - "createdAt", - "updatedAt", - "vonageApplicationId", - "apiKey" - ] - }, - "WebhookCredential": { - "type": "object", - "properties": { - "provider": { + "requestQuery": { "type": "string", - "enum": [ - "webhook" - ] + "description": "This is the request query." }, - "authenticationPlan": { - "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749.", + "responseHttpCode": { + "type": "number", + "description": "This the HTTP status code of the response." + }, + "requestIpAddress": { + "type": "string", + "description": "This is the request IP address." + }, + "requestOrigin": { + "type": "string", + "description": "This is the origin of the request" + }, + "responseBody": { + "type": "object", + "description": "This is the body of the response." + }, + "requestHeaders": { + "type": "object", + "description": "These are the headers of the request." + }, + "error": { + "description": "This is the error, if one occurred.", "allOf": [ { - "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + "$ref": "#/components/schemas/Error" } ] }, - "id": { + "assistantId": { "type": "string", - "description": "This is the unique identifier for the credential." + "description": "This is the ID of the assistant." }, - "orgId": { + "phoneNumberId": { "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." + "description": "This is the ID of the phone number." }, - "createdAt": { - "format": "date-time", + "customerId": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." + "description": "This is the ID of the customer." }, - "updatedAt": { - "format": "date-time", + "squadId": { "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." - }, - "authenticationSession": { - "description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.", - "allOf": [ - { - "$ref": "#/components/schemas/Oauth2AuthenticationSession" - } - ] + "description": "This is the ID of the squad." }, - "name": { + "callId": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This is the ID of the call." } }, "required": [ - "provider", - "authenticationPlan", - "id", + "time", "orgId", - "createdAt", - "updatedAt", - "authenticationSession" + "type", + "requestDurationSeconds", + "requestStartedAt", + "requestFinishedAt", + "requestBody", + "requestHttpMethod", + "requestUrl", + "requestPath", + "responseHttpCode" + ] + }, + "LogsPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, + "ChatDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } + }, + "assistantId": { + "type": "string" + }, + "assistant": { + "$ref": "#/components/schemas/CreateAssistantDTO" + }, + "assistantOverrides": { + "$ref": "#/components/schemas/AssistantOverrides" + } + }, + "required": [ + "messages" ] }, - "XAiCredential": { + "ChatServiceResponse": { + "type": "object", + "properties": {} + }, + "AnthropicCredential": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai", "enum": [ - "xai" + "anthropic" ] }, "apiKey": { @@ -17515,13 +18899,13 @@ "updatedAt" ] }, - "CreateAnthropicCredentialDTO": { + "AnyscaleCredential": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "anthropic" + "anyscale" ] }, "apiKey": { @@ -17529,31 +18913,23 @@ "maxLength": 10000, "description": "This is not returned in the API." }, - "name": { + "id": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - } - }, - "required": [ - "provider", - "apiKey" - ] - }, - "CreateAnyscaleCredentialDTO": { - "type": "object", - "properties": { - "provider": { + "description": "This is the unique identifier for the credential." + }, + "orgId": { "type": "string", - "enum": [ - "anyscale" - ] + "description": "This is the unique identifier for the org that this credential belongs to." }, - "apiKey": { + "createdAt": { + "format": "date-time", "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", @@ -17564,10 +18940,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateAssemblyAICredentialDTO": { + "AssemblyAICredential": { "type": "object", "properties": { "provider": { @@ -17580,6 +18960,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -17589,10 +18987,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateAzureCredentialDTO": { + "AzureCredential": { "type": "object", "properties": { "provider": { @@ -17605,7 +19007,8 @@ "type": "string", "description": "This is the service being used in Azure.", "enum": [ - "speech" + "speech", + "blob_storage" ], "default": "speech" }, @@ -17636,19 +19039,49 @@ "description": "This is not returned in the API.", "maxLength": 10000 }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.", + "allOf": [ + { + "$ref": "#/components/schemas/AzureBlobStorageBucketPlan" + } + ] } }, "required": [ "provider", - "service" + "service", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateAzureOpenAICredentialDTO": { + "AzureOpenAICredential": { "type": "object", "properties": { "provider": { @@ -17710,14 +19143,166 @@ ] } }, - "openAIKey": { + "openAIKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "ocpApimSubscriptionKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + }, + "openAIEndpoint": { + "type": "string", + "maxLength": 10000 + } + }, + "required": [ + "provider", + "region", + "models", + "openAIKey", + "id", + "orgId", + "createdAt", + "updatedAt", + "openAIEndpoint" + ] + }, + "ByoSipTrunkCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This can be used to bring your own SIP trunks or to connect to a Carrier.", + "enum": [ + "byo-sip-trunk" + ] + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + }, + "gateways": { + "description": "This is the list of SIP trunk's gateways.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SipTrunkGateway" + } + }, + "outboundAuthenticationPlan": { + "description": "This can be used to configure the outbound authentication if required by the SIP trunk.", + "allOf": [ + { + "$ref": "#/components/schemas/SipTrunkOutboundAuthenticationPlan" + } + ] + }, + "outboundLeadingPlusEnabled": { + "type": "boolean", + "description": "This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false" + }, + "techPrefix": { + "type": "string", + "description": "This can be used to configure the tech prefix on outbound calls. This is an advanced property.", + "maxLength": 10000 + }, + "sipDiversionHeader": { + "type": "string", + "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", + "maxLength": 10000 + }, + "sbcConfiguration": { + "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", + "allOf": [ + { + "$ref": "#/components/schemas/SbcConfiguration" + } + ] + } + }, + "required": [ + "id", + "orgId", + "createdAt", + "updatedAt", + "gateways" + ] + }, + "CartesiaCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "cartesia" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", "type": "string", - "maxLength": 10000, - "description": "This is not returned in the API." + "description": "This is the ISO 8601 date-time string of when the credential was created." }, - "openAIEndpoint": { + "updatedAt": { + "format": "date-time", "type": "string", - "maxLength": 10000 + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", @@ -17728,58 +19313,44 @@ }, "required": [ "provider", - "region", - "models", - "openAIKey", - "openAIEndpoint" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateByoSipTrunkCredentialDTO": { + "CerebrasCredential": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This can be used to bring your own SIP trunks or to connect to a Carrier.", "enum": [ - "byo-sip-trunk" + "cerebras" ] }, - "gateways": { - "description": "This is the list of SIP trunk's gateways.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SipTrunkGateway" - } - }, - "outboundAuthenticationPlan": { - "description": "This can be used to configure the outbound authentication if required by the SIP trunk.", - "allOf": [ - { - "$ref": "#/components/schemas/SipTrunkOutboundAuthenticationPlan" - } - ] + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." }, - "outboundLeadingPlusEnabled": { - "type": "boolean", - "description": "This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false" + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." }, - "techPrefix": { + "orgId": { "type": "string", - "description": "This can be used to configure the tech prefix on outbound calls. This is an advanced property.", - "maxLength": 10000 + "description": "This is the unique identifier for the org that this credential belongs to." }, - "sipDiversionHeader": { + "createdAt": { + "format": "date-time", "type": "string", - "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", - "maxLength": 10000 + "description": "This is the ISO 8601 date-time string of when the credential was created." }, - "sbcConfiguration": { - "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", - "allOf": [ - { - "$ref": "#/components/schemas/SbcConfiguration" - } - ] + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", @@ -17789,35 +19360,92 @@ } }, "required": [ - "gateways" + "provider", + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateCartesiaCredentialDTO": { + "CloudflareCredential": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "cartesia" - ] + "cloudflare" + ], + "description": "Credential provider. Only allowed value is cloudflare" + }, + "accountId": { + "type": "string", + "description": "Cloudflare Account Id." }, "apiKey": { "type": "string", - "description": "This is not returned in the API." + "description": "Cloudflare API Key / Token." + }, + "accountEmail": { + "type": "string", + "description": "Cloudflare Account Email." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in R2", + "allOf": [ + { + "$ref": "#/components/schemas/CloudflareR2BucketPlan" + } + ] } }, "required": [ "provider", - "apiKey" + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateCustomLLMCredentialDTO": { + "Oauth2AuthenticationSession": { + "type": "object", + "properties": { + "accessToken": { + "type": "string", + "description": "This is the OAuth2 access token." + }, + "expiresAt": { + "format": "date-time", + "type": "string", + "description": "This is the OAuth2 access token expiration." + } + } + }, + "CustomLLMCredential": { "type": "object", "properties": { "provider": { @@ -17839,6 +19467,32 @@ } ] }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "authenticationSession": { + "description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.", + "allOf": [ + { + "$ref": "#/components/schemas/Oauth2AuthenticationSession" + } + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -17848,10 +19502,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateDeepgramCredentialDTO": { + "DeepgramCredential": { "type": "object", "properties": { "provider": { @@ -17864,9 +19522,74 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + }, "apiUrl": { "type": "string", "description": "This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com." + } + }, + "required": [ + "provider", + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, + "DeepInfraCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "deepinfra" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", @@ -17877,21 +19600,43 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateDeepInfraCredentialDTO": { + "DeepSeekCredential": { "type": "object", "properties": { "provider": { "type": "string", - "enum": [ - "deepinfra" - ] + "enum": [ + "deep-seek" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." }, - "apiKey": { + "updatedAt": { + "format": "date-time", "type": "string", - "description": "This is not returned in the API." + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", @@ -17902,10 +19647,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateElevenLabsCredentialDTO": { + "ElevenLabsCredential": { "type": "object", "properties": { "provider": { @@ -17919,6 +19668,24 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -17928,10 +19695,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateGcpCredentialDTO": { + "GcpCredential": { "type": "object", "properties": { "provider": { @@ -17940,6 +19711,30 @@ "gcp" ] }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + }, "gcpKey": { "description": "This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", "allOf": [ @@ -17955,20 +19750,18 @@ "$ref": "#/components/schemas/BucketPlan" } ] - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 } }, "required": [ "provider", + "id", + "orgId", + "createdAt", + "updatedAt", "gcpKey" ] }, - "CreateGladiaCredentialDTO": { + "GladiaCredential": { "type": "object", "properties": { "provider": { @@ -17981,6 +19774,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -17990,10 +19801,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateGoHighLevelCredentialDTO": { + "GoHighLevelCredential": { "type": "object", "properties": { "provider": { @@ -18006,6 +19821,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18015,10 +19848,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateGoogleCredentialDTO": { + "GoogleCredential": { "type": "object", "properties": { "provider": { @@ -18033,6 +19870,24 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18042,10 +19897,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateGroqCredentialDTO": { + "GroqCredential": { "type": "object", "properties": { "provider": { @@ -18058,6 +19917,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18067,10 +19944,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateInflectionAICredentialDTO": { + "InflectionAICredential": { "type": "object", "properties": { "provider": { @@ -18085,6 +19966,24 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18094,10 +19993,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateLangfuseCredentialDTO": { + "LangfuseCredential": { "type": "object", "properties": { "provider": { @@ -18118,6 +20021,24 @@ "type": "string", "description": "The host URL for Langfuse project. Eg: https://cloud.langfuse.com" }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18129,10 +20050,14 @@ "provider", "publicKey", "apiKey", - "apiUrl" + "apiUrl", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateLmntCredentialDTO": { + "LmntCredential": { "type": "object", "properties": { "provider": { @@ -18145,6 +20070,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18154,10 +20097,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateMakeCredentialDTO": { + "MakeCredential": { "type": "object", "properties": { "provider": { @@ -18178,6 +20125,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18189,10 +20154,14 @@ "provider", "teamId", "region", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateOpenAICredentialDTO": { + "OpenAICredential": { "type": "object", "properties": { "provider": { @@ -18205,6 +20174,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18214,10 +20201,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateOpenRouterCredentialDTO": { + "OpenRouterCredential": { "type": "object", "properties": { "provider": { @@ -18230,6 +20221,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18239,10 +20248,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreatePerplexityAICredentialDTO": { + "PerplexityAICredential": { "type": "object", "properties": { "provider": { @@ -18255,6 +20268,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18264,10 +20295,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreatePlayHTCredentialDTO": { + "PlayHTCredential": { "type": "object", "properties": { "provider": { @@ -18280,23 +20315,45 @@ "type": "string", "description": "This is not returned in the API." }, - "userId": { - "type": "string" + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "userId": { + "type": "string" } }, "required": [ "provider", "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt", "userId" ] }, - "CreateRimeAICredentialDTO": { + "RimeAICredential": { "type": "object", "properties": { "provider": { @@ -18309,6 +20366,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18318,10 +20393,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateRunpodCredentialDTO": { + "RunpodCredential": { "type": "object", "properties": { "provider": { @@ -18334,6 +20413,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18343,10 +20440,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateS3CredentialDTO": { + "S3Credential": { "type": "object", "properties": { "provider": { @@ -18372,9 +20473,78 @@ "type": "string", "description": "AWS S3 bucket name." }, - "s3PathPrefix": { + "s3PathPrefix": { + "type": "string", + "description": "The path prefix for the uploaded recording. Ex. \"recordings/\"" + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "awsAccessKeyId", + "awsSecretAccessKey", + "region", + "s3BucketName", + "s3PathPrefix", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, + "SmallestAICredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "smallest-ai" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", "type": "string", - "description": "The path prefix for the uploaded recording. Ex. \"recordings/\"" + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", @@ -18385,14 +20555,14 @@ }, "required": [ "provider", - "awsAccessKeyId", - "awsSecretAccessKey", - "region", - "s3BucketName", - "s3PathPrefix" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateTavusCredentialDTO": { + "TavusCredential": { "type": "object", "properties": { "provider": { @@ -18405,6 +20575,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18414,10 +20602,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateTogetherAICredentialDTO": { + "TogetherAICredential": { "type": "object", "properties": { "provider": { @@ -18430,6 +20622,24 @@ "type": "string", "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18439,10 +20649,14 @@ }, "required": [ "provider", - "apiKey" + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" ] }, - "CreateTwilioCredentialDTO": { + "TwilioCredential": { "type": "object", "properties": { "provider": { @@ -18455,25 +20669,52 @@ "type": "string", "description": "This is not returned in the API." }, - "accountSid": { - "type": "string" + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "accountSid": { + "type": "string" } }, "required": [ "provider", "authToken", + "id", + "orgId", + "createdAt", + "updatedAt", "accountSid" ] }, - "CreateVonageCredentialDTO": { + "VonageCredential": { "type": "object", "properties": { + "vonageApplicationPrivateKey": { + "type": "string", + "description": "This is not returned in the API.", + "maxLength": 10000 + }, "provider": { "type": "string", "enum": [ @@ -18484,23 +20725,52 @@ "type": "string", "description": "This is not returned in the API." }, - "apiKey": { - "type": "string" + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "vonageApplicationId": { + "type": "string", + "description": "This is the Vonage Application ID for the credential.\n\nOnly relevant for Vonage credentials.", + "maxLength": 10000 }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "apiKey": { + "type": "string" } }, "required": [ + "vonageApplicationPrivateKey", "provider", "apiSecret", + "id", + "orgId", + "createdAt", + "updatedAt", + "vonageApplicationId", "apiKey" ] }, - "CreateWebhookCredentialDTO": { + "WebhookCredential": { "type": "object", "properties": { "provider": { @@ -18517,6 +20787,32 @@ } ] }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "authenticationSession": { + "description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.", + "allOf": [ + { + "$ref": "#/components/schemas/Oauth2AuthenticationSession" + } + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18526,10 +20822,15 @@ }, "required": [ "provider", - "authenticationPlan" + "authenticationPlan", + "id", + "orgId", + "createdAt", + "updatedAt", + "authenticationSession" ] }, - "CreateXAiCredentialDTO": { + "XAiCredential": { "type": "object", "properties": { "provider": { @@ -18544,6 +20845,54 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, + "CreateCerebrasCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "cerebras" + ] + }, + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18556,13 +20905,14 @@ "apiKey" ] }, - "UpdateAnthropicCredentialDTO": { + "CreateGoogleCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", + "description": "This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey", "enum": [ - "anthropic" + "google" ] }, "apiKey": { @@ -18582,13 +20932,14 @@ "apiKey" ] }, - "UpdateAnyscaleCredentialDTO": { + "CreateInflectionAICredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", + "description": "This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup", "enum": [ - "anyscale" + "inflection-ai" ] }, "apiKey": { @@ -18608,15 +20959,41 @@ "apiKey" ] }, + "UpdateAnthropicCredentialDTO": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + } + }, + "UpdateAnyscaleCredentialDTO": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + } + }, "UpdateAssemblyAICredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "assembly-ai" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -18627,26 +21004,17 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateAzureCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "azure" - ] - }, "service": { "type": "string", "description": "This is the service being used in Azure.", "enum": [ - "speech" + "speech", + "blob_storage" ], "default": "speech" }, @@ -18682,22 +21050,20 @@ "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.", + "allOf": [ + { + "$ref": "#/components/schemas/AzureBlobStorageBucketPlan" + } + ] } - }, - "required": [ - "provider", - "service" - ] + } }, "UpdateAzureOpenAICredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "azure-openai" - ] - }, "region": { "type": "string", "enum": [ @@ -18756,34 +21122,30 @@ "maxLength": 10000, "description": "This is not returned in the API." }, - "openAIEndpoint": { + "ocpApimSubscriptionKey": { "type": "string", - "maxLength": 10000 + "description": "This is not returned in the API." }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "openAIEndpoint": { + "type": "string", + "maxLength": 10000 } - }, - "required": [ - "provider", - "region", - "models", - "openAIKey", - "openAIEndpoint" - ] + } }, "UpdateByoSipTrunkCredentialDTO": { "type": "object", "properties": { - "provider": { + "name": { "type": "string", - "description": "This can be used to bring your own SIP trunks or to connect to a Carrier.", - "enum": [ - "byo-sip-trunk" - ] + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 }, "gateways": { "description": "This is the list of SIP trunk's gateways.", @@ -18821,6 +21183,15 @@ "$ref": "#/components/schemas/SbcConfiguration" } ] + } + } + }, + "UpdateCartesiaCredentialDTO": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, "name": { "type": "string", @@ -18828,22 +21199,14 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "gateways" - ] + } }, - "UpdateCartesiaCredentialDTO": { + "UpdateCerebrasCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "cartesia" - ] - }, "apiKey": { "type": "string", + "maxLength": 10000, "description": "This is not returned in the API." }, "name": { @@ -18852,21 +21215,42 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, - "UpdateCustomLLMCredentialDTO": { + "UpdateCloudflareCredentialDTO": { "type": "object", "properties": { - "provider": { + "accountId": { "type": "string", - "enum": [ - "custom-llm" - ] + "description": "Cloudflare Account Id." + }, + "apiKey": { + "type": "string", + "description": "Cloudflare API Key / Token." + }, + "accountEmail": { + "type": "string", + "description": "Cloudflare Account Email." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 }, + "bucketPlan": { + "description": "This is the bucket plan that can be provided to store call artifacts in R2", + "allOf": [ + { + "$ref": "#/components/schemas/CloudflareR2BucketPlan" + } + ] + } + } + }, + "UpdateCustomLLMCredentialDTO": { + "type": "object", + "properties": { "apiKey": { "type": "string", "maxLength": 10000, @@ -18886,28 +21270,33 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateDeepgramCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "deepgram" - ] - }, "apiKey": { "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.", + "minLength": 1, + "maxLength": 40 + }, "apiUrl": { "type": "string", "description": "This can be used to point to an onprem Deepgram instance. Defaults to api.deepgram.com." + } + } + }, + "UpdateDeepInfraCredentialDTO": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "This is not returned in the API." }, "name": { "type": "string", @@ -18915,21 +21304,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, - "UpdateDeepInfraCredentialDTO": { + "UpdateDeepSeekCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "deepinfra" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -18940,21 +21319,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateElevenLabsCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "11labs" - ] - }, "apiKey": { "type": "string", "maxLength": 10000, @@ -18966,20 +21335,16 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateGcpCredentialDTO": { "type": "object", "properties": { - "provider": { + "name": { "type": "string", - "enum": [ - "gcp" - ] + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 }, "gcpKey": { "description": "This is the GCP key. This is the JSON that can be generated in the Google Cloud Console at https://console.cloud.google.com/iam-admin/serviceaccounts/details//keys.\n\nThe schema is identical to the JSON that GCP outputs.", @@ -18996,28 +21361,12 @@ "$ref": "#/components/schemas/BucketPlan" } ] - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 } - }, - "required": [ - "provider", - "gcpKey" - ] + } }, "UpdateGladiaCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "gladia" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19028,21 +21377,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateGoHighLevelCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "gohighlevel" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19053,22 +21392,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateGoogleCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "description": "This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey", - "enum": [ - "google" - ] - }, "apiKey": { "type": "string", "maxLength": 10000, @@ -19080,21 +21408,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateGroqCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "groq" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19105,22 +21423,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateInflectionAICredentialDTO": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup", - "enum": [ - "inflection-ai" - ] - }, + "type": "object", + "properties": { "apiKey": { "type": "string", "maxLength": 10000, @@ -19132,21 +21439,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateLangfuseCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "langfuse" - ] - }, "publicKey": { "type": "string", "description": "The public key for Langfuse project. Eg: pk-lf-..." @@ -19165,23 +21462,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "publicKey", - "apiKey", - "apiUrl" - ] + } }, "UpdateLmntCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "lmnt" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19192,21 +21477,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateMakeCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "make" - ] - }, "teamId": { "type": "string", "description": "Team ID" @@ -19225,23 +21500,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "teamId", - "region", - "apiKey" - ] + } }, "UpdateOpenAICredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "openai" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19252,21 +21515,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateOpenRouterCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "openrouter" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19277,21 +21530,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdatePerplexityAICredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "perplexity-ai" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19302,50 +21545,29 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdatePlayHTCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "playht" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." }, - "userId": { - "type": "string" - }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "userId": { + "type": "string" } - }, - "required": [ - "provider", - "apiKey", - "userId" - ] + } }, "UpdateRimeAICredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "rime-ai" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19356,21 +21578,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateRunpodCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "runpod" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19381,22 +21593,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateS3CredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "s3" - ], - "description": "Credential provider. Only allowed value is s3" - }, "awsAccessKeyId": { "type": "string", "description": "AWS access key ID." @@ -19423,25 +21624,26 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "awsAccessKeyId", - "awsSecretAccessKey", - "region", - "s3BucketName", - "s3PathPrefix" - ] + } }, - "UpdateTavusCredentialDTO": { + "UpdateSmallestAICredentialDTO": { "type": "object", "properties": { - "provider": { + "apiKey": { "type": "string", - "enum": [ - "tavus" - ] + "description": "This is not returned in the API." }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + } + }, + "UpdateTavusCredentialDTO": { + "type": "object", + "properties": { "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19452,21 +21654,11 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateTogetherAICredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "together-ai" - ] - }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -19477,80 +21669,47 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "UpdateTwilioCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "twilio" - ] - }, "authToken": { "type": "string", "description": "This is not returned in the API." }, - "accountSid": { - "type": "string" - }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "accountSid": { + "type": "string" } - }, - "required": [ - "provider", - "authToken", - "accountSid" - ] + } }, "UpdateVonageCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "enum": [ - "vonage" - ] - }, "apiSecret": { "type": "string", "description": "This is not returned in the API." }, - "apiKey": { - "type": "string" - }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "apiKey": { + "type": "string" } - }, - "required": [ - "provider", - "apiSecret", - "apiKey" - ] + } }, "UpdateXAiCredentialDTO": { "type": "object", "properties": { - "provider": { - "type": "string", - "description": "This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai", - "enum": [ - "xai" - ] - }, "apiKey": { "type": "string", "maxLength": 10000, @@ -19562,11 +21721,7 @@ "minLength": 1, "maxLength": 40 } - }, - "required": [ - "provider", - "apiKey" - ] + } }, "CreateOrgDTO": { "type": "object", @@ -20210,6 +22365,7 @@ "openai", "playht", "rime-ai", + "smallest-ai", "tavus" ] }, @@ -20857,6 +23013,32 @@ "value" ] }, + "UpdateTokenDTO": { + "type": "object", + "properties": { + "tag": { + "type": "string", + "description": "This is the tag for the token. It represents its scope.", + "enum": [ + "private", + "public" + ] + }, + "name": { + "type": "string", + "description": "This is the name of the token. This is just for your own reference.", + "maxLength": 40 + }, + "restrictions": { + "description": "This are the restrictions for the token.", + "allOf": [ + { + "$ref": "#/components/schemas/TokenRestrictions" + } + ] + } + } + }, "SyncVoiceLibraryDTO": { "type": "object", "properties": { @@ -20874,6 +23056,7 @@ "openai", "playht", "rime-ai", + "smallest-ai", "tavus" ], "items": { @@ -20889,6 +23072,7 @@ "openai", "playht", "rime-ai", + "smallest-ai", "tavus" ] } @@ -21617,6 +23801,7 @@ "pipeline-error-azure-voice-failed", "pipeline-error-rime-ai-voice-failed", "pipeline-error-neets-voice-failed", + "pipeline-error-smallest-ai-voice-failed", "pipeline-error-deepgram-transcriber-failed", "pipeline-error-gladia-transcriber-failed", "pipeline-error-assembly-ai-transcriber-failed", @@ -21647,6 +23832,8 @@ "pipeline-error-google-llm-failed", "pipeline-error-xai-llm-failed", "pipeline-error-inflection-ai-llm-failed", + "pipeline-error-cerebras-llm-failed", + "pipeline-error-deep-seek-llm-failed", "pipeline-error-openai-400-bad-request-validation-failed", "pipeline-error-openai-401-unauthorized", "pipeline-error-openai-403-model-access-denied", @@ -21667,6 +23854,11 @@ "pipeline-error-inflection-ai-403-model-access-denied", "pipeline-error-inflection-ai-429-exceeded-quota", "pipeline-error-inflection-ai-500-server-error", + "pipeline-error-deep-seek-400-bad-request-validation-failed", + "pipeline-error-deep-seek-401-unauthorized", + "pipeline-error-deep-seek-403-model-access-denied", + "pipeline-error-deep-seek-429-exceeded-quota", + "pipeline-error-deep-seek-500-server-error", "pipeline-error-azure-openai-400-bad-request-validation-failed", "pipeline-error-azure-openai-401-unauthorized", "pipeline-error-azure-openai-403-model-access-denied", @@ -21677,6 +23869,11 @@ "pipeline-error-groq-403-model-access-denied", "pipeline-error-groq-429-exceeded-quota", "pipeline-error-groq-500-server-error", + "pipeline-error-cerebras-400-bad-request-validation-failed", + "pipeline-error-cerebras-401-unauthorized", + "pipeline-error-cerebras-403-model-access-denied", + "pipeline-error-cerebras-429-exceeded-quota", + "pipeline-error-cerebras-500-server-error", "pipeline-error-anthropic-400-bad-request-validation-failed", "pipeline-error-anthropic-401-unauthorized", "pipeline-error-anthropic-403-model-access-denied", @@ -22399,6 +24596,7 @@ "pipeline-error-azure-voice-failed", "pipeline-error-rime-ai-voice-failed", "pipeline-error-neets-voice-failed", + "pipeline-error-smallest-ai-voice-failed", "pipeline-error-deepgram-transcriber-failed", "pipeline-error-gladia-transcriber-failed", "pipeline-error-assembly-ai-transcriber-failed", @@ -22429,6 +24627,8 @@ "pipeline-error-google-llm-failed", "pipeline-error-xai-llm-failed", "pipeline-error-inflection-ai-llm-failed", + "pipeline-error-cerebras-llm-failed", + "pipeline-error-deep-seek-llm-failed", "pipeline-error-openai-400-bad-request-validation-failed", "pipeline-error-openai-401-unauthorized", "pipeline-error-openai-403-model-access-denied", @@ -22449,6 +24649,11 @@ "pipeline-error-inflection-ai-403-model-access-denied", "pipeline-error-inflection-ai-429-exceeded-quota", "pipeline-error-inflection-ai-500-server-error", + "pipeline-error-deep-seek-400-bad-request-validation-failed", + "pipeline-error-deep-seek-401-unauthorized", + "pipeline-error-deep-seek-403-model-access-denied", + "pipeline-error-deep-seek-429-exceeded-quota", + "pipeline-error-deep-seek-500-server-error", "pipeline-error-azure-openai-400-bad-request-validation-failed", "pipeline-error-azure-openai-401-unauthorized", "pipeline-error-azure-openai-403-model-access-denied", @@ -22459,6 +24664,11 @@ "pipeline-error-groq-403-model-access-denied", "pipeline-error-groq-429-exceeded-quota", "pipeline-error-groq-500-server-error", + "pipeline-error-cerebras-400-bad-request-validation-failed", + "pipeline-error-cerebras-401-unauthorized", + "pipeline-error-cerebras-403-model-access-denied", + "pipeline-error-cerebras-429-exceeded-quota", + "pipeline-error-cerebras-500-server-error", "pipeline-error-anthropic-400-bad-request-validation-failed", "pipeline-error-anthropic-401-unauthorized", "pipeline-error-anthropic-403-model-access-denied",