diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index c16e331c9..0fc92d0bb 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -4615,6 +4615,48 @@ "role" ] }, + "Mono": { + "type": "object", + "properties": { + "combinedUrl": { + "type": "string", + "description": "This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + }, + "assistantUrl": { + "type": "string", + "description": "This is the mono recording url for the assistant. To enable, set `assistant.artifactPlan.recordingEnabled`." + }, + "customerUrl": { + "type": "string", + "description": "This is the mono recording url for the customer. To enable, set `assistant.artifactPlan.recordingEnabled`." + } + } + }, + "Recording": { + "type": "object", + "properties": { + "stereoUrl": { + "type": "string", + "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + }, + "videoUrl": { + "type": "string", + "description": "This is the video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`." + }, + "videoRecordingStartDelaySeconds": { + "type": "number", + "description": "This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps." + }, + "mono": { + "description": "This is the mono recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "allOf": [ + { + "$ref": "#/components/schemas/Mono" + } + ] + } + } + }, "Artifact": { "type": "object", "properties": { @@ -4655,19 +4697,31 @@ }, "recordingUrl": { "type": "string", - "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "deprecated": true }, "stereoRecordingUrl": { "type": "string", - "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`." + "description": "This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "deprecated": true }, "videoRecordingUrl": { "type": "string", - "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`." + "description": "This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.", + "deprecated": true }, "videoRecordingStartDelaySeconds": { "type": "number", - "description": "This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps." + "description": "This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps.", + "deprecated": true + }, + "recording": { + "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", + "allOf": [ + { + "$ref": "#/components/schemas/Recording" + } + ] }, "transcript": { "type": "string", @@ -8399,6 +8453,10 @@ "$ref": "#/components/schemas/SummaryPlan" } ] + }, + "sipHeadersInReferToEnabled": { + "type": "boolean", + "description": "This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.\n\n@default false" } }, "required": [ @@ -10900,7 +10958,7 @@ }, "liquid": { "type": "string", - "maxLength": 100 + "maxLength": 1000 } }, "required": [ @@ -16223,6 +16281,36 @@ "provider" ] }, + "VapiVoicemailDetectionPlan": { + "type": "object", + "properties": { + "beepMaxAwaitSeconds": { + "type": "number", + "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + "minimum": 0, + "maximum": 30, + "default": 30 + }, + "provider": { + "type": "string", + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "vapi" + ] + }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ + { + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + } + ] + } + }, + "required": [ + "provider" + ] + }, "CompliancePlan": { "type": "object", "properties": { @@ -16592,9 +16680,19 @@ "example": 0.4 }, "smartEndpointingEnabled": { - "type": "object", "example": false, - "deprecated": true + "deprecated": true, + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "livekit" + ] + } + ] }, "smartEndpointingPlan": { "description": "This is the plan for smart endpointing. Pick between Vapi smart endpointing or LiveKit smart endpointing (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.\n\nIf this is set, it will override and take precedence over `transcriptionEndpointingPlan`.\nThis plan will still be overridden by any matching `customEndpointingRules`.", @@ -18508,6 +18606,11 @@ ] } }, + "smsEnabled": { + "type": "boolean", + "description": "Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + "default": true + }, "twilioPhoneNumber": { "type": "string", "description": "These are the digits of the phone number you own on your Twilio.", @@ -18658,6 +18761,10 @@ { "$ref": "#/components/schemas/AnalysisCost", "title": "AnalysisCost" + }, + { + "$ref": "#/components/schemas/KnowledgeBaseCost", + "title": "KnowledgeBaseCost" } ] } @@ -19725,6 +19832,56 @@ "content" ] }, + "Start": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "start" + ] + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "name" + ] + }, + "Assistant": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "assistant" + ] + }, + "assistantId": { + "type": "string" + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "assistantId", + "name" + ] + }, "Say": { "type": "object", "properties": { @@ -20114,7 +20271,43 @@ "messages" ] }, - "Assistant": { + "AssistantPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Assistant" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, + "AssistantVersionPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + }, + "nextPageState": { + "type": "string" + } + }, + "required": [ + "results", + "metadata" + ] + }, + "UpdateAssistantDTO": { "type": "object", "properties": { "transcriber": { @@ -20872,869 +21065,66 @@ }, "keypadInputPlan": { "$ref": "#/components/schemas/KeypadInputPlan" + } + } + }, + "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" + } + ] + }, + "hooks": { + "type": "array", + "description": "This is the hooks that will be used for incoming calls to this phone number.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneNumberHookCallRinging", + "title": "PhoneNumberHookCallRinging" + } + ] + } + }, + "provider": { + "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 }, "id": { "type": "string", - "description": "This is the unique identifier for the assistant." + "description": "This is the unique identifier for the phone number." }, "orgId": { "type": "string", - "description": "This is the unique identifier for the org that this assistant 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 assistant 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 assistant was last updated." - } - }, - "required": [ - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "AssistantPaginatedResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Assistant" - } - }, - "metadata": { - "$ref": "#/components/schemas/PaginationMeta" - } - }, - "required": [ - "results", - "metadata" - ] - }, - "UpdateAssistantDTO": { - "type": "object", - "properties": { - "transcriber": { - "description": "These are the options for the assistant's transcriber.", - "oneOf": [ - { - "$ref": "#/components/schemas/AssemblyAITranscriber", - "title": "AssemblyAI" - }, - { - "$ref": "#/components/schemas/AzureSpeechTranscriber", - "title": "Azure" - }, - { - "$ref": "#/components/schemas/CustomTranscriber", - "title": "CustomTranscriber" - }, - { - "$ref": "#/components/schemas/DeepgramTranscriber", - "title": "Deepgram" - }, - { - "$ref": "#/components/schemas/ElevenLabsTranscriber", - "title": "ElevenLabs" - }, - { - "$ref": "#/components/schemas/GladiaTranscriber", - "title": "Gladia" - }, - { - "$ref": "#/components/schemas/SpeechmaticsTranscriber", - "title": "Speechmatics" - }, - { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "Talkscriber" - }, - { - "$ref": "#/components/schemas/GoogleTranscriber", - "title": "Google" - }, - { - "$ref": "#/components/schemas/OpenAITranscriber", - "title": "OpenAI" - } - ] - }, - "model": { - "description": "These are the options for the assistant's LLM.", - "oneOf": [ - { - "$ref": "#/components/schemas/AnyscaleModel", - "title": "Anyscale" - }, - { - "$ref": "#/components/schemas/AnthropicModel", - "title": "Anthropic" - }, - { - "$ref": "#/components/schemas/CerebrasModel", - "title": "Cerebras" - }, - { - "$ref": "#/components/schemas/CustomLLMModel", - "title": "CustomLLM" - }, - { - "$ref": "#/components/schemas/DeepInfraModel", - "title": "DeepInfra" - }, - { - "$ref": "#/components/schemas/DeepSeekModel", - "title": "DeepSeek" - }, - { - "$ref": "#/components/schemas/GoogleModel", - "title": "Google" - }, - { - "$ref": "#/components/schemas/GroqModel", - "title": "Groq" - }, - { - "$ref": "#/components/schemas/InflectionAIModel", - "title": "InflectionAI" - }, - { - "$ref": "#/components/schemas/OpenAIModel", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/OpenRouterModel", - "title": "OpenRouter" - }, - { - "$ref": "#/components/schemas/PerplexityAIModel", - "title": "PerplexityAI" - }, - { - "$ref": "#/components/schemas/TogetherAIModel", - "title": "Together" - }, - { - "$ref": "#/components/schemas/VapiModel", - "title": "Vapi" - }, - { - "$ref": "#/components/schemas/XaiModel", - "title": "XAI" - } - ] - }, - "voice": { - "description": "These are the options for the assistant's voice.", - "oneOf": [ - { - "$ref": "#/components/schemas/AzureVoice", - "title": "Azure" - }, - { - "$ref": "#/components/schemas/CartesiaVoice", - "title": "Cartesia" - }, - { - "$ref": "#/components/schemas/CustomVoice", - "title": "CustomVoice" - }, - { - "$ref": "#/components/schemas/DeepgramVoice", - "title": "Deepgram" - }, - { - "$ref": "#/components/schemas/ElevenLabsVoice", - "title": "ElevenLabs" - }, - { - "$ref": "#/components/schemas/HumeVoice", - "title": "Hume" - }, - { - "$ref": "#/components/schemas/LMNTVoice", - "title": "LMNT" - }, - { - "$ref": "#/components/schemas/NeuphonicVoice", - "title": "Neuphonic" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHT" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAI" - }, - { - "$ref": "#/components/schemas/SmallestAIVoice", - "title": "SmallestAI" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - }, - { - "$ref": "#/components/schemas/VapiVoice", - "title": "Vapi" - } - ], - "default": { - "provider": "playht", - "voiceId": "jennifer" - } - }, - "firstMessage": { - "type": "string", - "description": "This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", - "example": "Hello! How can I help you today?" - }, - "firstMessageInterruptionsEnabled": { - "type": "boolean", - "default": false - }, - "firstMessageMode": { - "type": "string", - "description": "This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).\n\n@default 'assistant-speaks-first'", - "enum": [ - "assistant-speaks-first", - "assistant-speaks-first-with-model-generated-message", - "assistant-waits-for-user" - ], - "example": "assistant-speaks-first" - }, - "voicemailDetection": { - "description": "These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].\nThis uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.\nYou can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.", - "oneOf": [ - { - "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", - "title": "Google" - }, - { - "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", - "title": "Twilio" - }, - { - "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", - "title": "Vapi" - } - ] - }, - "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", - "tool.completed", - "transfer-update", - "user-interrupted", - "voice-input", - "workflow.node.started" - ], - "example": [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started" - ], - "description": "These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.", - "items": { - "type": "string", - "enum": [ - "conversation-update", - "function-call", - "function-call-result", - "hang", - "language-changed", - "metadata", - "model-output", - "speech-update", - "status-update", - "transcript", - "tool-calls", - "tool-calls-result", - "tool.completed", - "transfer-update", - "user-interrupted", - "voice-input", - "workflow.node.started" - ] - } - }, - "serverMessages": { - "type": "array", - "enum": [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "language-changed", - "language-change-detected", - "model-output", - "phone-call-control", - "speech-update", - "status-update", - "transcript", - "transcript[transcriptType=\"final\"]", - "tool-calls", - "transfer-destination-request", - "transfer-update", - "user-interrupted", - "voice-input" - ], - "example": [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "user-interrupted" - ], - "description": "These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.", - "items": { - "type": "string", - "enum": [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "language-changed", - "language-change-detected", - "model-output", - "phone-call-control", - "speech-update", - "status-update", - "transcript", - "transcript[transcriptType=\"final\"]", - "tool-calls", - "transfer-destination-request", - "transfer-update", - "user-interrupted", - "voice-input" - ] - } - }, - "silenceTimeoutSeconds": { - "type": "number", - "description": "How many seconds of silence to wait before ending the call. Defaults to 30.\n\n@default 30", - "minimum": 10, - "maximum": 3600, - "example": 30 - }, - "maxDurationSeconds": { - "type": "number", - "description": "This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.\n\n@default 600 (10 minutes)", - "minimum": 10, - "maximum": 43200, - "example": 600 - }, - "backgroundSound": { - "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", - "maxLength": 1000, - "oneOf": [ - { - "type": "enum", - "enum": [ - "off", - "office" - ], - "example": "office" - }, - { - "type": "string", - "format": "uri", - "example": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3" - } - ] - }, - "backgroundDenoisingEnabled": { - "type": "boolean", - "description": "This enables filtering of noise and background speech while the user is talking.\n\nDefault `false` while in beta.\n\n@default false", - "example": false - }, - "modelOutputInMessagesEnabled": { - "type": "boolean", - "description": "This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.\n\nDefault `false` while in beta.\n\n@default false", - "example": false - }, - "transportConfigurations": { - "type": "array", - "description": "These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransportConfigurationTwilio", - "title": "Twilio" - } - ] - } - }, - "observabilityPlan": { - "description": "This is the plan for observability configuration of assistant's calls.\nCurrently supports Langfuse for tracing and monitoring.", - "oneOf": [ - { - "$ref": "#/components/schemas/LangfuseObservabilityPlan", - "title": "Langfuse" - } - ], - "allOf": [ - { - "$ref": "#/components/schemas/LangfuseObservabilityPlan" - } - ] - }, - "credentials": { - "type": "array", - "description": "These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/CreateAnthropicCredentialDTO", - "title": "AnthropicCredential" - }, - { - "$ref": "#/components/schemas/CreateAnyscaleCredentialDTO", - "title": "AnyscaleCredential" - }, - { - "$ref": "#/components/schemas/CreateAssemblyAICredentialDTO", - "title": "AssemblyAICredential" - }, - { - "$ref": "#/components/schemas/CreateAzureCredentialDTO", - "title": "AzureCredential" - }, - { - "$ref": "#/components/schemas/CreateAzureOpenAICredentialDTO", - "title": "AzureOpenAICredential" - }, - { - "$ref": "#/components/schemas/CreateByoSipTrunkCredentialDTO", - "title": "ByoSipTrunkCredential" - }, - { - "$ref": "#/components/schemas/CreateCartesiaCredentialDTO", - "title": "CartesiaCredential" - }, - { - "$ref": "#/components/schemas/CreateCerebrasCredentialDTO", - "title": "CerebrasCredential" - }, - { - "$ref": "#/components/schemas/CreateCloudflareCredentialDTO", - "title": "CloudflareCredential" - }, - { - "$ref": "#/components/schemas/CreateCustomLLMCredentialDTO", - "title": "CustomLLMCredential" - }, - { - "$ref": "#/components/schemas/CreateDeepgramCredentialDTO", - "title": "DeepgramCredential" - }, - { - "$ref": "#/components/schemas/CreateDeepInfraCredentialDTO", - "title": "DeepInfraCredential" - }, - { - "$ref": "#/components/schemas/CreateDeepSeekCredentialDTO", - "title": "DeepSeekCredential" - }, - { - "$ref": "#/components/schemas/CreateElevenLabsCredentialDTO", - "title": "ElevenLabsCredential" - }, - { - "$ref": "#/components/schemas/CreateGcpCredentialDTO", - "title": "GcpCredential" - }, - { - "$ref": "#/components/schemas/CreateGladiaCredentialDTO", - "title": "GladiaCredential" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCredentialDTO", - "title": "GhlCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleCredentialDTO", - "title": "GoogleCredential" - }, - { - "$ref": "#/components/schemas/CreateGroqCredentialDTO", - "title": "GroqCredential" - }, - { - "$ref": "#/components/schemas/CreateHumeCredentialDTO", - "title": "HumeCredential" - }, - { - "$ref": "#/components/schemas/CreateInflectionAICredentialDTO", - "title": "InflectionAICredential" - }, - { - "$ref": "#/components/schemas/CreateLangfuseCredentialDTO", - "title": "LangfuseCredential" - }, - { - "$ref": "#/components/schemas/CreateLmntCredentialDTO", - "title": "LmntCredential" - }, - { - "$ref": "#/components/schemas/CreateMakeCredentialDTO", - "title": "MakeCredential" - }, - { - "$ref": "#/components/schemas/CreateMistralCredentialDTO", - "title": "MistralCredential" - }, - { - "$ref": "#/components/schemas/CreateNeuphonicCredentialDTO", - "title": "NeuphonicCredential" - }, - { - "$ref": "#/components/schemas/CreateOpenAICredentialDTO", - "title": "OpenAICredential" - }, - { - "$ref": "#/components/schemas/CreateOpenRouterCredentialDTO", - "title": "OpenRouterCredential" - }, - { - "$ref": "#/components/schemas/CreatePerplexityAICredentialDTO", - "title": "PerplexityAICredential" - }, - { - "$ref": "#/components/schemas/CreatePlayHTCredentialDTO", - "title": "PlayHTCredential" - }, - { - "$ref": "#/components/schemas/CreateRimeAICredentialDTO", - "title": "RimeAICredential" - }, - { - "$ref": "#/components/schemas/CreateRunpodCredentialDTO", - "title": "RunpodCredential" - }, - { - "$ref": "#/components/schemas/CreateS3CredentialDTO", - "title": "S3Credential" - }, - { - "$ref": "#/components/schemas/CreateSmallestAICredentialDTO", - "title": "SmallestAICredential" - }, - { - "$ref": "#/components/schemas/CreateSpeechmaticsCredentialDTO", - "title": "SpeechmaticsCredential" - }, - { - "$ref": "#/components/schemas/CreateSupabaseCredentialDTO", - "title": "SupabaseCredential" - }, - { - "$ref": "#/components/schemas/CreateTavusCredentialDTO", - "title": "TavusCredential" - }, - { - "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", - "title": "TogetherAICredential" - }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, - { - "$ref": "#/components/schemas/CreateTwilioCredentialDTO", - "title": "TwilioCredential" - }, - { - "$ref": "#/components/schemas/CreateVonageCredentialDTO", - "title": "VonageCredential" - }, - { - "$ref": "#/components/schemas/CreateWebhookCredentialDTO", - "title": "WebhookCredential" - }, - { - "$ref": "#/components/schemas/CreateXAiCredentialDTO", - "title": "XAiCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", - "title": "GoogleCalendarOAuth2ClientCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", - "title": "GoogleCalendarOAuth2AuthorizationCredential" - }, - { - "$ref": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", - "title": "GoogleSheetsOAuth2AuthorizationCredential" - }, - { - "$ref": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", - "title": "SlackOAuth2AuthorizationCredential" - } - ], - "discriminator": { - "propertyName": "provider", - "mapping": { - "11labs": "#/components/schemas/CreateElevenLabsCredentialDTO", - "anthropic": "#/components/schemas/CreateAnthropicCredentialDTO", - "anyscale": "#/components/schemas/CreateAnyscaleCredentialDTO", - "assembly-ai": "#/components/schemas/CreateAssemblyAICredentialDTO", - "azure-openai": "#/components/schemas/CreateAzureOpenAICredentialDTO", - "azure": "#/components/schemas/CreateAzureCredentialDTO", - "byo-sip-trunk": "#/components/schemas/CreateByoSipTrunkCredentialDTO", - "cartesia": "#/components/schemas/CreateCartesiaCredentialDTO", - "cerebras": "#/components/schemas/CreateCerebrasCredentialDTO", - "cloudflare": "#/components/schemas/CreateCloudflareCredentialDTO", - "custom-llm": "#/components/schemas/CreateCustomLLMCredentialDTO", - "deepgram": "#/components/schemas/CreateDeepgramCredentialDTO", - "deepinfra": "#/components/schemas/CreateDeepInfraCredentialDTO", - "deep-seek": "#/components/schemas/CreateDeepSeekCredentialDTO", - "gcp": "#/components/schemas/CreateGcpCredentialDTO", - "gladia": "#/components/schemas/CreateGladiaCredentialDTO", - "gohighlevel": "#/components/schemas/CreateGoHighLevelCredentialDTO", - "google": "#/components/schemas/CreateGoogleCredentialDTO", - "groq": "#/components/schemas/CreateGroqCredentialDTO", - "inflection-ai": "#/components/schemas/CreateInflectionAICredentialDTO", - "langfuse": "#/components/schemas/CreateLangfuseCredentialDTO", - "lmnt": "#/components/schemas/CreateLmntCredentialDTO", - "make": "#/components/schemas/CreateMakeCredentialDTO", - "openai": "#/components/schemas/CreateOpenAICredentialDTO", - "openrouter": "#/components/schemas/CreateOpenRouterCredentialDTO", - "perplexity-ai": "#/components/schemas/CreatePerplexityAICredentialDTO", - "playht": "#/components/schemas/CreatePlayHTCredentialDTO", - "rime-ai": "#/components/schemas/CreateRimeAICredentialDTO", - "runpod": "#/components/schemas/CreateRunpodCredentialDTO", - "s3": "#/components/schemas/CreateS3CredentialDTO", - "supabase": "#/components/schemas/CreateSupabaseCredentialDTO", - "smallest-ai": "#/components/schemas/CreateSmallestAICredentialDTO", - "tavus": "#/components/schemas/CreateTavusCredentialDTO", - "together-ai": "#/components/schemas/CreateTogetherAICredentialDTO", - "twilio": "#/components/schemas/CreateTwilioCredentialDTO", - "vonage": "#/components/schemas/CreateVonageCredentialDTO", - "webhook": "#/components/schemas/CreateWebhookCredentialDTO", - "xai": "#/components/schemas/CreateXAiCredentialDTO", - "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", - "hume": "#/components/schemas/CreateHumeCredentialDTO", - "mistral": "#/components/schemas/CreateMistralCredentialDTO", - "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", - "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", - "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", - "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", - "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO" - } - } - } - }, - "hooks": { - "type": "array", - "description": "This is a set of actions that will be performed on certain events.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssistantHookCallEnding", - "title": "AssistantHookCallEnding" - } - ] - } - }, - "name": { - "type": "string", - "description": "This is the name of the assistant.\n\nThis is required when you want to transfer between assistants in a call.", - "maxLength": 40 - }, - "voicemailMessage": { - "type": "string", - "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", - "maxLength": 1000 - }, - "endCallMessage": { - "type": "string", - "description": "This is the message that the assistant will say if it ends the call.\n\nIf unspecified, it will hang up without saying anything.", - "maxLength": 1000 - }, - "endCallPhrases": { - "description": "This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.", - "type": "array", - "items": { - "type": "string", - "maxLength": 140, - "minLength": 2 - } - }, - "compliancePlan": { - "$ref": "#/components/schemas/CompliancePlan" - }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the assistant." - }, - "analysisPlan": { - "description": "This is the plan for analysis of assistant's calls. Stored in `call.analysis`.", - "allOf": [ - { - "$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" - } - }, - "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" - } - ] - }, - "keypadInputPlan": { - "$ref": "#/components/schemas/KeypadInputPlan" - } - } - }, - "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" - } - ] - }, - "hooks": { - "type": "array", - "description": "This is the hooks that will be used for incoming calls to this phone number.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/PhoneNumberHookCallRinging", - "title": "PhoneNumberHookCallRinging" - } - ] - } - }, - "provider": { - "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 - }, - "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." + "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, "status": { "type": "string", @@ -21821,6 +21211,11 @@ "twilio" ] }, + "smsEnabled": { + "type": "boolean", + "description": "Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + "default": true + }, "id": { "type": "string", "description": "This is the unique identifier for the phone number." @@ -21848,6 +21243,18 @@ "blocked" ] }, + "twilioAuthToken": { + "type": "string", + "description": "This is the Twilio Auth Token for the phone number." + }, + "twilioApiKey": { + "type": "string", + "description": "This is the Twilio API Key for the phone number." + }, + "twilioApiSecret": { + "type": "string", + "description": "This is the Twilio API Secret for the phone number." + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -21876,18 +21283,6 @@ "twilioAccountSid": { "type": "string", "description": "This is the Twilio Account SID for the phone number." - }, - "twilioAuthToken": { - "type": "string", - "description": "This is the Twilio Auth Token for the phone number." - }, - "twilioApiKey": { - "type": "string", - "description": "This is the Twilio API Key for the phone number." - }, - "twilioApiSecret": { - "type": "string", - "description": "This is the Twilio API Secret for the phone number." } }, "required": [ @@ -22355,6 +21750,11 @@ "twilio" ] }, + "smsEnabled": { + "type": "boolean", + "description": "Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + "default": true + }, "number": { "type": "string", "description": "These are the digits of the phone number you own on your Twilio." @@ -22718,6 +22118,11 @@ ] } }, + "smsEnabled": { + "type": "boolean", + "description": "Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", + "default": true + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -27010,7 +26415,7 @@ "rubric": { "type": "string", "description": "This is the rubric used by the AI scorer.", - "maxLength": 1000 + "maxLength": 10000 } }, "required": [ @@ -27077,7 +26482,7 @@ "rubric": { "type": "string", "description": "This is the rubric used by the AI scorer.", - "maxLength": 1000 + "maxLength": 10000 } }, "required": [ @@ -37035,6 +36440,41 @@ "cost" ] }, + "KnowledgeBaseCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'knowledge-base' for this class.", + "enum": [ + "knowledge-base" + ] + }, + "model": { + "type": "object", + "description": "This is the model that was used for processing the knowledge base." + }, + "promptTokens": { + "type": "number", + "description": "This is the number of prompt tokens used in the knowledge base query." + }, + "completionTokens": { + "type": "number", + "description": "This is the number of completion tokens generated in the knowledge base query." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "model", + "promptTokens", + "completionTokens", + "cost" + ] + }, "FunctionToolWithToolCall": { "type": "object", "properties": {