From 44470c8bc290b23b050edcc119b7fe67cc464ee9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 25 Sep 2025 00:25:56 +0000 Subject: [PATCH] Update API specifications with fern api update --- fern/apis/api/openapi.json | 688 +++++++++++++++++++++++++++++++++++-- 1 file changed, 661 insertions(+), 27 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 59bd996e5..8f176bb04 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -734,6 +734,379 @@ ] } }, + "/v2/call": { + "get": { + "operationId": "CallController_findAllPaginated", + "summary": "List Calls", + "parameters": [ + { + "name": "assistantId", + "required": false, + "in": "query", + "description": "This will return calls with the specified assistantId.", + "schema": { + "type": "string" + } + }, + { + "name": "assistantName", + "required": false, + "in": "query", + "description": "This will return calls where the transient assistant name exactly matches the specified value (case-insensitive).", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "This will return calls with the specified callId.", + "schema": { + "type": "string" + } + }, + { + "name": "idAny", + "required": false, + "in": "query", + "description": "This will return calls with the specified callIds.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "costLe", + "required": false, + "in": "query", + "description": "This will return calls where the cost is less than or equal to the specified value.", + "schema": { + "type": "number" + } + }, + { + "name": "costGe", + "required": false, + "in": "query", + "description": "This will return calls where the cost is greater than or equal to the specified value.", + "schema": { + "type": "number" + } + }, + { + "name": "cost", + "required": false, + "in": "query", + "description": "This will return calls with the exact specified cost.", + "schema": { + "type": "number" + } + }, + { + "name": "successEvaluation", + "required": false, + "in": "query", + "description": "This will return calls with the specified successEvaluation.", + "schema": { + "maxLength": 1000, + "type": "string" + } + }, + { + "name": "endedReason", + "required": false, + "in": "query", + "description": "This will return calls with the specified endedReason.", + "schema": { + "maxLength": 1000, + "type": "string" + } + }, + { + "name": "phoneNumberId", + "required": false, + "in": "query", + "description": "This will return calls with the specified phoneNumberId.", + "schema": { + "type": "string" + } + }, + { + "required": false, + "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)", + "name": "numberE164CheckEnabled", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "required": false, + "description": "This is the extension that will be dialed after the call is answered.", + "name": "extension", + "in": "query", + "schema": { + "maxLength": 10, + "example": null, + "type": "string" + } + }, + { + "name": "assistantOverrides", + "required": false, + "description": "These are the overrides for the assistant's settings and template variables specific to this customer.\nThis allows customization of the assistant's behavior for individual customers in batch calls.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ], + "in": "query", + "schema": {} + }, + { + "required": false, + "description": "This is the number of the customer.", + "name": "number", + "in": "query", + "schema": { + "minLength": 3, + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the SIP URI of the customer.", + "name": "sipUri", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "required": false, + "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\" `.", + "name": "name", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the email of the customer.", + "name": "email", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "This is the external ID of the customer.", + "name": "externalId", + "in": "query", + "schema": { + "maxLength": 40, + "type": "string" + } + }, + { + "required": false, + "description": "Filter calls by structured output values. Use structured output ID as key and filter operators as values.", + "name": "structuredOutputs", + "in": "query", + "schema": { + "additionalProperties": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal to" + }, + "neq": { + "type": "string", + "description": "Not equal to" + }, + "gt": { + "type": "string", + "description": "Greater than" + }, + "gte": { + "type": "string", + "description": "Greater than or equal to" + }, + "lt": { + "type": "string", + "description": "Less than" + }, + "lte": { + "type": "string", + "description": "Less than or equal to" + }, + "contains": { + "type": "string", + "description": "Contains" + }, + "notContains": { + "type": "string", + "description": "Not contains" + } + } + }, + "example": { + "c9dddda4-d70a-4dad-aa5c-aaf117f85cea": { + "eq": "2", + "gt": "1" + } + }, + "type": "object" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallPaginatedResponse" + } + } + } + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/call/{id}": { "get": { "operationId": "CallController_findOne", @@ -2103,6 +2476,158 @@ ] } }, + "/v2/phone-number": { + "get": { + "operationId": "PhoneNumberController_findAllPaginated", + "summary": "List Phone Numbers", + "parameters": [ + { + "name": "search", + "required": false, + "in": "query", + "description": "This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive).", + "schema": { + "maxLength": 100, + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneNumberPaginatedResponse" + } + } + } + } + }, + "tags": [ + "Phone Numbers" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/phone-number/{id}": { "get": { "operationId": "PhoneNumberController_findOne", @@ -9171,6 +9696,12 @@ "voicemail" ] }, + "beepDetectionEnabled": { + "type": "boolean", + "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + "default": false, + "example": false + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -11544,6 +12075,10 @@ "type": "string", "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1" }, + "wordLevelConfidenceEnabled": { + "type": "boolean", + "description": "This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.\nThis only works for Deepgram transcribers." + }, "timeoutSeconds": { "type": "number", "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", @@ -14366,12 +14901,12 @@ "to" ] }, - "RecordingConsentHangUpToDeclinePlan": { + "RecordingConsentPlanStayOnLine": { "type": "object", "properties": { "message": { "type": "string", - "description": "This is the message asking for consent to record the call.", + "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", "maxLength": 1000, "examples": [ "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", @@ -14453,19 +14988,19 @@ }, "type": { "type": "string", - "description": "This is the type of recording consent plan.", + "description": "This is the type of recording consent plan. This type assumes consent is granted if the user stays on the line.", "enum": [ - "hang-up-to-decline" + "stay-on-line" ], - "example": "hang-up-to-decline" + "example": "stay-on-line" }, "waitSeconds": { "type": "number", "description": "Number of seconds to wait before transferring to the assistant if user stays on the call", "minimum": 1, - "maximum": 5, - "default": 2, - "example": 2 + "maximum": 6, + "default": 3, + "example": 3 } }, "required": [ @@ -14473,12 +15008,12 @@ "type" ] }, - "RecordingConsentVerbalPlan": { + "RecordingConsentPlanVerbal": { "type": "object", "properties": { "message": { "type": "string", - "description": "This is the message asking for consent to record the call.", + "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", "maxLength": 1000, "examples": [ "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", @@ -14560,7 +15095,7 @@ }, "type": { "type": "string", - "description": "This is the type of recording consent plan.", + "description": "This is the type of recording consent plan. This type assumes consent is granted if the user verbally consents or declines.", "enum": [ "verbal" ], @@ -14569,12 +15104,15 @@ "declineTool": { "type": "object", "description": "Tool to execute if user verbally declines recording consent" + }, + "declineToolId": { + "type": "string", + "description": "ID of existing tool to execute if user verbally declines recording consent" } }, "required": [ "message", - "type", - "declineTool" + "type" ] }, "SecurityFilterBase": { @@ -14642,19 +15180,19 @@ "recordingConsentPlan": { "oneOf": [ { - "$ref": "#/components/schemas/RecordingConsentHangUpToDeclinePlan", - "title": "RecordingConsentHangUpToDeclinePlan" + "$ref": "#/components/schemas/RecordingConsentPlanStayOnLine", + "title": "RecordingConsentStayOnLinePlan" }, { - "$ref": "#/components/schemas/RecordingConsentVerbalPlan", - "title": "RecordingConsentVerbalPlan" + "$ref": "#/components/schemas/RecordingConsentPlanVerbal", + "title": "RecordingConsentPlanVerbal" } ], "discriminator": { "propertyName": "type", "mapping": { - "hang-up-to-decline": "#/components/schemas/RecordingConsentHangUpToDeclinePlan", - "verbal": "#/components/schemas/RecordingConsentVerbalPlan" + "stay-on-line": "#/components/schemas/RecordingConsentPlanStayOnLine", + "verbal": "#/components/schemas/RecordingConsentPlanVerbal" } } } @@ -14839,6 +15377,11 @@ "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 }, + "fullMessageHistoryEnabled": { + "type": "boolean", + "description": "This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.", + "example": false + }, "pcapEnabled": { "type": "boolean", "description": "This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.\n\nYou can find the packet capture at `call.artifact.pcapUrl` after the call is ended.\n\n@default true", @@ -28674,20 +29217,14 @@ "type": "object", "description": "This is the type of recording consent." }, - "granted": { - "type": "boolean", - "description": "This is whether the user granted recording consent." - }, "grantedAt": { "format": "date-time", "type": "string", - "description": "This is the date and time the recording consent was granted." + "description": "This is the date and time the recording consent was granted.\nIf not specified, it means the recording consent was not granted." } }, "required": [ - "type", - "granted", - "grantedAt" + "type" ] }, "Compliance": { @@ -30311,6 +30848,10 @@ "originalMessage": { "type": "string", "description": "The original message before filtering (only included if content was filtered)." + }, + "metadata": { + "type": "object", + "description": "The metadata associated with the message. Currently used to store the transcriber's word level confidence." } }, "required": [ @@ -48683,6 +49224,95 @@ "analysis" ] }, + "ServerMessageHandoffDestinationRequest": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"handoff-destination-request\" is sent when the model is requesting handoff but destination is unknown.", + "enum": [ + "handoff-destination-request" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "artifact": { + "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "chat": { + "description": "This is the chat object.", + "allOf": [ + { + "$ref": "#/components/schemas/Chat" + } + ] + }, + "parameters": { + "type": "object", + "description": "This is the parameters of the handoff destination request." + } + }, + "required": [ + "type", + "parameters" + ] + }, "ServerMessageHang": { "type": "object", "properties": { @@ -51278,6 +51908,10 @@ "$ref": "#/components/schemas/ServerMessageEndOfCallReport", "title": "EndOfCallReport" }, + { + "$ref": "#/components/schemas/ServerMessageHandoffDestinationRequest", + "title": "HandoffDestinationRequest" + }, { "$ref": "#/components/schemas/ServerMessageHang", "title": "Hang"