diff --git a/openapi.json b/openapi.json index 72136c2..1efa866 100644 --- a/openapi.json +++ b/openapi.json @@ -599,6 +599,7 @@ "content": { "application/json": { "schema": { + "title": "PhoneNumber", "oneOf": [ { "$ref": "#/components/schemas/ByoPhoneNumber", @@ -744,6 +745,7 @@ "schema": { "type": "array", "items": { + "title": "PhoneNumber", "oneOf": [ { "$ref": "#/components/schemas/ByoPhoneNumber", @@ -807,6 +809,7 @@ "content": { "application/json": { "schema": { + "title": "PhoneNumber", "oneOf": [ { "$ref": "#/components/schemas/ByoPhoneNumber", @@ -877,6 +880,7 @@ "content": { "application/json": { "schema": { + "title": "PhoneNumber", "oneOf": [ { "$ref": "#/components/schemas/ByoPhoneNumber", @@ -937,6 +941,7 @@ "content": { "application/json": { "schema": { + "title": "PhoneNumber", "oneOf": [ { "$ref": "#/components/schemas/ByoPhoneNumber", @@ -3702,6 +3707,11 @@ "OpenAIFunction": { "type": "object", "properties": { + "strict": { + "type": "boolean", + "description": "This is a boolean that controls whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true. Learn more about Structured Outputs in the [OpenAI guide](https://openai.com/index/introducing-structured-outputs-in-the-api/).\n\n@default false", + "default": false + }, "name": { "type": "string", "description": "This is the the name of the function to be called.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", @@ -3710,6 +3720,7 @@ }, "description": { "type": "string", + "description": "This is the description of what the function does, used by the AI to choose when and how to call the function.", "maxLength": 1000 }, "parameters": { @@ -8446,6 +8457,7 @@ "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-voice-failed", "pipeline-error-cartesia-voice-failed", "pipeline-error-deepgram-transcriber-failed", @@ -9972,6 +9984,31 @@ "credentialId" ] }, + "SipAuthentication": { + "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": { + "type": "string", + "description": "This will be expected in the `username` field of the `authorization` header of the SIP INVITE.", + "minLength": 20, + "maxLength": 40 + }, + "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": { @@ -10037,6 +10074,14 @@ "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/SipAuthentication" + } + ] } }, "required": [ @@ -10263,6 +10308,14 @@ "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/SipAuthentication" + } + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -10505,11 +10558,19 @@ "type": "string", "description": "This is the Stripe payment ID." }, + "slackSupportEnabled": { + "type": "boolean", + "description": "If this flag is true, then the user has purchased slack support." + }, + "slackChannelId": { + "type": "string", + "description": "If this subscription has a slack support subscription, the slack channel's ID will be stored here." + }, "hipaaEnabled": { "type": "boolean", "description": "This is the HIPAA enabled flag for the subscription. It determines whether orgs under this\nsubscription have the option to enable HIPAA compliance." }, - "commonPaperAgreementId": { + "hipaaCommonPaperAgreementId": { "type": "string", "description": "This is the ID for the Common Paper agreement outlining the HIPAA contract." }, @@ -10667,10 +10728,7 @@ } ] } - }, - "required": [ - "credits" - ] + } }, "PaymentRetryDTO": { "type": "object", @@ -12673,7 +12731,7 @@ "type": "object", "properties": { "time": { - "type": "number", + "type": "string", "description": "This is the timestamp at which the log was written." }, "orgId": { @@ -12953,6 +13011,7 @@ "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", @@ -12969,6 +13028,7 @@ "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", @@ -14276,6 +14336,7 @@ "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", @@ -14292,6 +14353,7 @@ "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", @@ -14907,6 +14969,7 @@ "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", @@ -14923,6 +14986,7 @@ "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", @@ -17274,6 +17338,7 @@ "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-voice-failed", "pipeline-error-cartesia-voice-failed", "pipeline-error-deepgram-transcriber-failed", @@ -18032,6 +18097,7 @@ "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-voice-failed", "pipeline-error-cartesia-voice-failed", "pipeline-error-deepgram-transcriber-failed", @@ -19357,6 +19423,34 @@ } } }, + "ClientInboundMessageTransfer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of the message. Send \"transfer\" message to transfer the call to a destination.", + "enum": [ + "transfer" + ] + }, + "destination": { + "description": "This is the destination to transfer the call to.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] + } + }, + "required": [ + "type" + ] + }, "ClientInboundMessage": { "type": "object", "properties": { @@ -19374,6 +19468,10 @@ { "$ref": "#/components/schemas/ClientInboundMessageSay", "title": "Say" + }, + { + "$ref": "#/components/schemas/ClientInboundMessageTransfer", + "title": "Transfer" } ] } @@ -19946,6 +20044,201 @@ "toolCall", "metadata" ] + }, + "StepDestination": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "step" + ] + }, + "conditions": { + "type": "array", + "description": "This is an optional array of conditions that must be met for this destination to be triggered. If empty, this is the default destination that the step transfers to.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ModelBasedCondition", + "title": "ModelBasedCondition" + }, + { + "$ref": "#/components/schemas/RuleBasedCondition", + "title": "RuleBasedCondition" + } + ] + } + }, + "stepName": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type", + "stepName" + ] + }, + "HandoffStep": { + "type": "object", + "properties": { + "block": { + "description": "This is the block to use. To use an existing block, use `blockId`.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateConversationBlockDTO", + "title": "ConversationBlock" + }, + { + "$ref": "#/components/schemas/CreateToolCallBlockDTO", + "title": "ToolCallBlock" + }, + { + "$ref": "#/components/schemas/CreateWorkflowBlockDTO", + "title": "WorkflowBlock", + "description": "This is the CreateWorkflowBlockDTO object but Swagger does not display nested schemas correctly." + } + ] + }, + "type": { + "type": "string", + "description": "This is a step that takes a handoff from the previous step. This means it won't return to the calling step. The workflow execution will continue linearly.\n\nUse case:\n- You want to collect information linearly (e.g. a form, provide information, etc).", + "enum": [ + "handoff" + ] + }, + "destinations": { + "type": "array", + "description": "These are the destinations that the step can go to after it's done.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/StepDestination", + "title": "StepDestination" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the step.", + "minLength": 1 + }, + "blockId": { + "type": "string", + "description": "This is the id of the block to use. To use a transient block, use `block`." + }, + "input": { + "type": "object", + "description": "This is the input to the block. You can use any key-value map as input to the block.\n\nExample:\n{\n \"name\": \"John Doe\",\n \"age\": 20\n}\n\nYou can reference any variable in the context of the current block:\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\nExample:\n{\n \"name\": \"{{my-tool-call-step.output.name}}\",\n \"age\": \"{{my-tool-call-step.input.age}}\",\n \"date\": \"{{workflow.input.date}}\"\n}\n\nYou can dynamically change the key name.\n\nExample:\n{\n \"{{my-tool-call-step.output.key-name-for-name}}\": \"{{name}}\",\n \"{{my-tool-call-step.input.key-name-for-age}}\": \"{{age}}\",\n \"{{workflow.input.key-name-for-date}}\": \"{{date}}\"\n}\n\nYou can represent the value as a string, number, boolean, array, or object.\n\nExample:\n{\n \"name\": \"john\",\n \"age\": 20,\n \"date\": \"2021-01-01\",\n \"metadata\": {\n \"unique-key\": \"{{my-tool-call-step.output.unique-key}}\"\n },\n \"array\": [\"A\", \"B\", \"C\"],\n}\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." + } + }, + "required": [ + "type", + "name" + ] + }, + "AssignmentMutation": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "description": "This is an optional array of conditions that must be met for this mutation to be triggered.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ModelBasedCondition", + "title": "ModelBasedCondition" + }, + { + "$ref": "#/components/schemas/RuleBasedCondition", + "title": "RuleBasedCondition" + } + ] + } + }, + "type": { + "type": "string", + "description": "This mutation assigns a new value to an existing or new variable.", + "enum": [ + "assignment" + ] + }, + "variable": { + "type": "string", + "description": "This is the variable to assign a new value to.\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- \"your-step-name.output.your-property-name\" for another step's output (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- \"global.your-property-name\" for the global context\n\nThis needs to be the key path of the variable. If you use {{}}, it'll dereference that to the value of the variable before assignment. This can be useful if the path is dynamic. Example:\n- \"global.{{my-tool-call-step.output.my-key-name}}\"\n\nYou can also string interpolate multiple variables to get the key name:\n- \"global.{{my-tool-call-step.output.my-key-name-suffix}}-{{my-tool-call-step.output.my-key-name}}\"\n\nThe path to the new variable is created if it doesn't exist. Example:\n- \"global.this-does-not-exist.neither-does-this\" will create `this-does-not-exist` object with `neither-does-this` as a key\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." + }, + "value": { + "type": "string", + "description": "The value to assign to the variable.\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- \"{{your-step-name.output.your-property-name}}\" for another step's output (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- \"{{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.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.", + "maxLength": 1000 + } + }, + "required": [ + "type", + "variable", + "value" + ] + }, + "CallbackStep": { + "type": "object", + "properties": { + "block": { + "description": "This is the block to use. To use an existing block, use `blockId`.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateConversationBlockDTO", + "title": "ConversationBlock" + }, + { + "$ref": "#/components/schemas/CreateToolCallBlockDTO", + "title": "ToolCallBlock" + }, + { + "$ref": "#/components/schemas/CreateWorkflowBlockDTO", + "title": "WorkflowBlock", + "description": "This is the CreateWorkflowBlockDTO object but Swagger does not display nested schemas correctly." + } + ] + }, + "type": { + "type": "string", + "description": "This is a step that calls back to the previous step after it's done. This effectively means we're spawning a new conversation thread. The previous conversation thread will resume where it left off once this step is done.\n\nUse case:\n- You are collecting a customer's order and while they were on one item, they start a new item or try to modify a previous one. You would make a OrderUpdate block which calls the same block repeatedly when a new update starts.", + "enum": [ + "callback" + ] + }, + "mutations": { + "type": "array", + "description": "This is the mutations to apply to the context after the step is done.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssignmentMutation", + "title": "AssignmentMutation" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the step.", + "minLength": 1 + }, + "blockId": { + "type": "string", + "description": "This is the id of the block to use. To use a transient block, use `block`." + }, + "input": { + "type": "object", + "description": "This is the input to the block. You can use any key-value map as input to the block.\n\nExample:\n{\n \"name\": \"John Doe\",\n \"age\": 20\n}\n\nYou can reference any variable in the context of the current block:\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\nExample:\n{\n \"name\": \"{{my-tool-call-step.output.name}}\",\n \"age\": \"{{my-tool-call-step.input.age}}\",\n \"date\": \"{{workflow.input.date}}\"\n}\n\nYou can dynamically change the key name.\n\nExample:\n{\n \"{{my-tool-call-step.output.key-name-for-name}}\": \"{{name}}\",\n \"{{my-tool-call-step.input.key-name-for-age}}\": \"{{age}}\",\n \"{{workflow.input.key-name-for-date}}\": \"{{date}}\"\n}\n\nYou can represent the value as a string, number, boolean, array, or object.\n\nExample:\n{\n \"name\": \"john\",\n \"age\": 20,\n \"date\": \"2021-01-01\",\n \"metadata\": {\n \"unique-key\": \"{{my-tool-call-step.output.unique-key}}\"\n },\n \"array\": [\"A\", \"B\", \"C\"],\n}\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." + } + }, + "required": [ + "type", + "name" + ] } } }