diff --git a/openapi/spec3.json b/openapi/spec3.json index 1924f0a..2a26074 100644 --- a/openapi/spec3.json +++ b/openapi/spec3.json @@ -381,6 +381,10 @@ "name": "Programmable Fax Commands", "description": "Programmable fax command operations" }, + { + "name": "Pronunciation Dictionaries", + "description": "Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries contain alias items (text replacement) and phoneme items (IPA pronunciation notation) that control how specific words are spoken." + }, { "name": "Public Internet Gateways", "description": "Public Internet Gateway operations" @@ -35839,6 +35843,341 @@ "x-latency-category": "responsive" } }, + "/pronunciation_dicts": { + "get": { + "summary": "List pronunciation dictionaries", + "description": "List all pronunciation dictionaries for the authenticated organization. Results are paginated using offset-based pagination.", + "operationId": "ListPronunciationDicts", + "tags": [ + "Pronunciation Dictionaries" + ], + "parameters": [ + { + "name": "page[number]", + "in": "query", + "required": false, + "description": "Page number (1-based). Defaults to 1.", + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "page[size]", + "in": "query", + "required": false, + "description": "Number of results per page. Defaults to 20, maximum 250.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 250, + "default": 20 + } + } + ], + "responses": { + "200": { + "description": "A paginated list of pronunciation dictionaries.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictListResponse" + } + } + } + }, + "400": { + "description": "Invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized. Invalid or missing API key." + } + }, + "x-latency-category": "interactive" + }, + "post": { + "summary": "Create a pronunciation dictionary", + "description": "Create a new pronunciation dictionary for the authenticated organization. Each dictionary contains a list of items that control how specific words are spoken. Items can be alias type (text replacement) or phoneme type (IPA pronunciation notation).\n\nAs an alternative to providing items directly as JSON, you can upload a dictionary file (PLS/XML or plain text format, max 1MB) using multipart/form-data. PLS files use the standard W3C Pronunciation Lexicon Specification XML format. Text files use a line-based format: `word=alias` for aliases, `word:/phoneme/` for IPA phonemes.\n\nLimits:\n- Maximum 50 dictionaries per organization\n- Maximum 100 items per dictionary\n- Text: max 200 characters\n- Alias/phoneme value: max 500 characters\n- File upload: max 1MB (1,048,576 bytes)", + "operationId": "CreatePronunciationDict", + "tags": [ + "Pronunciation Dictionaries" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePronunciationDictRequest" + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "name", + "file" + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name. Must be unique within the organization.", + "minLength": 1, + "maxLength": 255, + "example": "Brand Names" + }, + "file": { + "type": "string", + "format": "binary", + "description": "Dictionary file to upload. Supported formats: PLS/XML (.pls, .xml) and plain text (.txt). Max size: 1MB (1,048,576 bytes)." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Pronunciation dictionary created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictResponse" + } + } + } + }, + "401": { + "description": "Unauthorized. Invalid or missing API key." + }, + "422": { + "description": "Validation error or organization limit exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + }, + "examples": { + "validation_error": { + "summary": "Validation failed", + "value": { + "errors": [ + { + "code": "90202", + "title": "Validation failed", + "detail": "items must have at least one item", + "source": { + "pointer": "/items" + } + } + ] + } + }, + "limit_exceeded": { + "summary": "Organization limit exceeded", + "value": { + "errors": [ + { + "code": "90203", + "title": "Limit exceeded", + "detail": "Maximum number of pronunciation dictionaries (50) reached", + "source": { + "pointer": "/" + } + } + ] + } + }, + "duplicate_name": { + "summary": "Duplicate dictionary name", + "value": { + "errors": [ + { + "code": "90202", + "title": "Validation failed", + "detail": "organization_id, name a dictionary with this name already exists", + "source": { + "pointer": "/organization_id, name" + } + } + ] + } + } + } + } + } + } + }, + "x-latency-category": "interactive" + } + }, + "/pronunciation_dicts/{id}": { + "delete": { + "summary": "Delete a pronunciation dictionary", + "description": "Permanently delete a pronunciation dictionary.", + "operationId": "DeletePronunciationDict", + "tags": [ + "Pronunciation Dictionaries" + ], + "parameters": [ + { + "$ref": "#/components/parameters/pronunciation_dict_id" + } + ], + "responses": { + "204": { + "description": "Dictionary deleted successfully. No content returned." + }, + "401": { + "description": "Unauthorized. Invalid or missing API key." + }, + "404": { + "description": "Pronunciation dictionary not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + } + } + } + } + }, + "x-latency-category": "interactive" + }, + "get": { + "summary": "Get a pronunciation dictionary", + "description": "Retrieve a single pronunciation dictionary by ID.", + "operationId": "GetPronunciationDict", + "tags": [ + "Pronunciation Dictionaries" + ], + "parameters": [ + { + "$ref": "#/components/parameters/pronunciation_dict_id" + } + ], + "responses": { + "200": { + "description": "The requested pronunciation dictionary.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictResponse" + } + } + } + }, + "401": { + "description": "Unauthorized. Invalid or missing API key." + }, + "404": { + "description": "Pronunciation dictionary not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + }, + "example": { + "errors": [ + { + "code": "90201", + "title": "Pronunciation dictionary not found", + "detail": "The requested pronunciation dictionary does not exist" + } + ] + } + } + } + } + }, + "x-latency-category": "interactive" + }, + "patch": { + "summary": "Update a pronunciation dictionary", + "description": "Update the name and/or items of an existing pronunciation dictionary. Uses optimistic locking \u2014 if the dictionary was modified concurrently, the request returns 409 Conflict.", + "operationId": "UpdatePronunciationDict", + "tags": [ + "Pronunciation Dictionaries" + ], + "parameters": [ + { + "$ref": "#/components/parameters/pronunciation_dict_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePronunciationDictRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Pronunciation dictionary updated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PronunciationDictResponse" + } + } + } + }, + "401": { + "description": "Unauthorized. Invalid or missing API key." + }, + "404": { + "description": "Pronunciation dictionary not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict. The dictionary was modified concurrently. Re-fetch and retry.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + }, + "example": { + "errors": [ + { + "code": "90200", + "title": "Pronunciation dictionary error", + "detail": "Dictionary was modified concurrently, please retry" + } + ] + } + } + } + }, + "422": { + "description": "Validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pronunciation-dicts_ErrorResponse" + } + } + } + } + }, + "x-latency-category": "interactive" + } + }, "/public_internet_gateways": { "get": { "summary": "List all Public Internet Gateways", @@ -44149,6 +44488,51 @@ } } }, + "/texml/ai_calls/{connection_id}": { + "post": { + "summary": "Initiate an outbound AI call", + "description": "Initiate an outbound AI call with warm-up support. Validates parameters, builds an internal TeXML with an AI Assistant configuration, encodes instructions into client state, and calls the dial API. The Twiml, Texml, and Url parameters are not allowed and will result in a 422 error.", + "x-latency-category": "responsive", + "x-group-parameters": "true", + "operationId": "InitiateTexmlAICall", + "tags": [ + "TeXML REST Commands" + ], + "parameters": [ + { + "name": "connection_id", + "in": "path", + "description": "The ID of the TeXML connection to use for the call.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Initiate AI Call request object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InitiateAICallRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/InitiateAICallResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthenticatedResponse" + }, + "422": { + "$ref": "#/components/responses/call-scripting_UnprocessableEntityResponse" + } + } + } + }, "/texml/secrets": { "post": { "summary": "Create a TeXML secret", @@ -49781,74 +50165,6 @@ }, "x-latency-category": "responsive" }, - "patch": { - "summary": "Update a Wireless Blocklist", - "description": "Update a Wireless Blocklist.", - "operationId": "UpdateWirelessBlocklist", - "tags": [ - "Wireless Blocklists" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "The name of the Wireless Blocklist.", - "type": "string", - "example": "My Wireless Blocklist" - }, - "type": { - "description": "The type of wireless blocklist.", - "type": "string", - "enum": [ - "country", - "mcc", - "plmn" - ], - "example": "country" - }, - "values": { - "description": "Values to block. The values here depend on the `type` of Wireless Blocklist.", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/CountryCode" - }, - { - "$ref": "#/components/schemas/MobileCountryCode" - }, - { - "$ref": "#/components/schemas/PLMNCode" - } - ] - }, - "example": [ - "CA", - "US" - ] - } - } - } - } - } - }, - "responses": { - "202": { - "$ref": "#/components/responses/UpdateWirelessBlocklistResponse" - }, - "422": { - "$ref": "#/components/responses/wireless_UnprocessableEntity" - }, - "default": { - "$ref": "#/components/responses/wireless_GenericErrorResponse" - } - }, - "x-latency-category": "responsive" - }, "post": { "summary": "Create a Wireless Blocklist", "description": "Create a Wireless Blocklist to prevent SIMs from connecting to certain networks.", @@ -49973,6 +50289,69 @@ } }, "x-latency-category": "responsive" + }, + "patch": { + "summary": "Update a Wireless Blocklist", + "description": "Update a Wireless Blocklist.", + "operationId": "UpdateWirelessBlocklist", + "tags": [ + "Wireless Blocklists" + ], + "parameters": [ + { + "$ref": "#/components/parameters/WirelessBlocklistId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "The name of the Wireless Blocklist.", + "type": "string", + "example": "My Wireless Blocklist" + }, + "values": { + "description": "Values to block. The values here depend on the `type` of Wireless Blocklist.", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CountryCode" + }, + { + "$ref": "#/components/schemas/MobileCountryCode" + }, + { + "$ref": "#/components/schemas/PLMNCode" + } + ] + }, + "example": [ + "CA", + "US" + ] + } + } + } + } + } + }, + "responses": { + "202": { + "$ref": "#/components/responses/UpdateWirelessBlocklistResponse" + }, + "422": { + "$ref": "#/components/responses/wireless_UnprocessableEntity" + }, + "default": { + "$ref": "#/components/responses/wireless_GenericErrorResponse" + } + }, + "x-latency-category": "responsive" } } }, @@ -53099,6 +53478,17 @@ "default": "created_at" } }, + "pronunciation_dict_id": { + "name": "id", + "in": "path", + "required": true, + "description": "The UUID of the pronunciation dictionary.", + "schema": { + "type": "string", + "format": "uuid", + "example": "c215a3e1-be41-4701-97e8-1d3c22f9a5b7" + } + }, "provider": { "name": "provider", "in": "query", @@ -56958,6 +57348,16 @@ } } }, + "InitiateAICallResponse": { + "description": "Successful response upon initiating an AI call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InitiateAICallResult" + } + } + } + }, "InitiateCallResponse": { "description": "Successful response upon initiating a TeXML call.", "content": { @@ -81411,6 +81811,32 @@ } } }, + "CreatePronunciationDictRequest": { + "type": "object", + "description": "Request body for creating a pronunciation dictionary.", + "required": [ + "name", + "items" + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name. Must be unique within the organization.", + "minLength": 1, + "maxLength": 255, + "example": "Brand Names" + }, + "items": { + "type": "array", + "description": "List of pronunciation items (alias or phoneme type). At least one item is required.", + "minItems": 1, + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/PronunciationDictItem" + } + } + } + }, "CreateQueueRequest": { "type": "object", "title": "Create Queue Request", @@ -85877,27 +86303,30 @@ }, "ErrorObject": { "type": "object", - "description": "A single error object.", "properties": { "code": { "type": "string", - "description": "Telnyx-specific error code." + "description": "Machine-readable error code.", + "example": "90202" }, "title": { "type": "string", - "description": "Short, human-readable summary of the error." + "description": "Short human-readable error title.", + "example": "Validation failed" }, "detail": { "type": "string", - "description": "Detailed, human-readable explanation of the error." + "description": "Detailed error description.", + "example": "items must have at least one item" }, "source": { "type": "object", - "description": "Reference to the source of the error.", + "description": "Source of the error.", "properties": { "pointer": { "type": "string", - "description": "A JSON Pointer (RFC 6901) to the field that caused the error." + "description": "JSON pointer to the field that caused the error.", + "example": "/items" } } } @@ -91066,17 +91495,18 @@ ], "title": "TransferToolParams" }, - "InitiateCallRequest": { + "InitiateAICallRequest": { "type": "object", - "title": "Initiate Call Request", + "title": "Initiate AI Call Request", "required": [ - "To", "From", - "ApplicationSid" + "To", + "AIAssistantId" ], "properties": { - "ApplicationSid": { - "description": "The ID of the TeXML Application.", + "From": { + "description": "The phone number of the party initiating the call. Phone numbers are formatted with a `+` and country code.", + "example": "+16175551212", "type": "string" }, "To": { @@ -91084,23 +91514,43 @@ "example": "+16175551212", "type": "string" }, - "From": { - "description": "The phone number of the party that initiated the call. Phone numbers are formatted with a `+` and country code.", - "example": "+16175551212", + "AIAssistantId": { + "description": "The ID of the AI assistant to use for the call.", "type": "string" }, + "AIAssistantVersion": { + "description": "The version of the AI assistant to use.", + "type": "string" + }, + "AIAssistantDynamicVariables": { + "description": "Key-value map of dynamic variables to pass to the AI assistant.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "customer_name": "John Doe", + "account_id": "12345" + } + }, "CallerId": { - "description": "To be used as the caller id name (SIP From Display Name) presented to the destination (`To` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and `-_~!.+` special characters. If ommited, the display name will be the same as the number in the `From` field.", + "description": "To be used as the caller id name (SIP From Display Name) presented to the destination (`To` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and `-_~!.+` special characters. If omitted, the display name will be the same as the number in the `From` field.", "example": "Info", "type": "string" }, - "Url": { - "description": "The URL from which Telnyx will retrieve the TeXML call instructions.", - "example": "https://www.example.com/instructions.xml", + "StatusCallback": { + "description": "URL destination for Telnyx to send status callback events to for the call.", + "example": "https://www.example.com/callback", "type": "string" }, - "UrlMethod": { - "description": "HTTP request type used for `Url`. The default value is inherited from TeXML Application setting.", + "StatusCallbackEvent": { + "description": "The call events for which Telnyx should send a webhook. Multiple events can be defined when separated by a space. Valid values: initiated, ringing, answered, completed.", + "example": "initiated answered", + "default": "completed", + "type": "string" + }, + "StatusCallbackMethod": { + "description": "HTTP request type used for `StatusCallback`.", "example": "GET", "default": "POST", "type": "string", @@ -91109,18 +91559,51 @@ "POST" ] }, - "FallbackUrl": { - "description": "A failover URL for which Telnyx will retrieve the TeXML call instructions if the `Url` is not responding.", - "example": "https://www.example.com/instructions-fallback.xml", - "type": "string" + "StatusCallbacks": { + "description": "An array of URL destinations for Telnyx to send status callback events to for the call.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "https://www.example.com/callback1", + "https://www.example.com/callback2" + ] }, - "StatusCallback": { - "description": "URL destination for Telnyx to send status callback events to for the call.", - "example": "https://www.example.com/callback", + "CustomHeaders": { + "description": "Custom HTTP headers to be sent with the call. Each header should be an object with 'name' and 'value' properties.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the custom header" + }, + "value": { + "type": "string", + "description": "The value of the custom header" + } + }, + "required": [ + "name", + "value" + ] + }, + "example": [ + { + "name": "X-Custom-Header", + "value": "custom-value" + } + ] + }, + "ConversationCallback": { + "description": "URL destination for Telnyx to send conversation callback events to.", + "example": "https://www.example.com/conversation-callback", "type": "string" }, - "StatusCallbackMethod": { - "description": "HTTP request type used for `StatusCallback`.", + "ConversationCallbackMethod": { + "description": "HTTP request type used for `ConversationCallback`.", "example": "GET", "default": "POST", "type": "string", @@ -91129,16 +91612,15 @@ "POST" ] }, - "StatusCallbackEvent": { - "description": "The call events for which Telnyx should send a webhook. Multiple events can be defined when separated by a space.", - "example": "initiated", - "default": "completed", - "type": "string", - "enum": [ - "initiated", - "ringing", - "answered", - "completed" + "ConversationCallbacks": { + "description": "An array of URL destinations for conversation callback events.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "https://www.example.com/conversation-callback1", + "https://www.example.com/conversation-callback2" ] }, "MachineDetection": { @@ -91153,7 +91635,7 @@ ] }, "DetectionMode": { - "description": "Allows you to chose between Premium and Standard detections.", + "description": "Allows you to choose between Premium and Standard detections.", "example": "Premium", "default": "Regular", "type": "string", @@ -91174,7 +91656,295 @@ "type": "string" }, "AsyncAmdStatusCallbackMethod": { - "description": "HTTP request type used for `AsyncAmdStatusCallback`. The default value is inherited from TeXML Application setting.", + "description": "HTTP request type used for `AsyncAmdStatusCallback`.", + "example": "GET", + "default": "POST", + "type": "string", + "enum": [ + "GET", + "POST" + ] + }, + "MachineDetectionTimeout": { + "description": "Maximum timeout threshold in milliseconds for overall detection.", + "example": 5000, + "default": 30000, + "maximum": 60000, + "minimum": 500, + "type": "integer" + }, + "MachineDetectionSpeechThreshold": { + "description": "Maximum threshold of a human greeting. If greeting longer than this value, considered machine. Ignored when `premium` detection is used.", + "example": 2000, + "default": 3500, + "type": "integer" + }, + "MachineDetectionSpeechEndThreshold": { + "description": "Silence duration threshold after a greeting message or voice for it be considered human. Ignored when `premium` detection is used.", + "example": 2000, + "default": 800, + "type": "integer" + }, + "MachineDetectionSilenceTimeout": { + "description": "If initial silence duration is greater than this value, consider it a machine. Ignored when `premium` detection is used.", + "example": 2000, + "default": 3500, + "type": "integer" + }, + "Passports": { + "description": "A string of passport identifiers to associate with the call.", + "type": "string" + }, + "TimeLimit": { + "description": "The maximum duration of the call in seconds. The minimum value is 30 and the maximum value is 14400 (4 hours). Default is 14400 seconds.", + "example": 3600, + "type": "integer", + "minimum": 30, + "maximum": 14400, + "default": 14400 + }, + "Timeout": { + "description": "The number of seconds to wait for the called party to answer the call before the call is canceled. The minimum value is 5 and the maximum value is 120. Default is 30 seconds.", + "example": 60, + "type": "integer", + "minimum": 5, + "maximum": 120, + "default": 30, + "x-stainless-param": "timeout_seconds" + }, + "Record": { + "description": "Whether to record the entire participant's call leg. Defaults to `false`.", + "example": false, + "type": "boolean" + }, + "RecordingChannels": { + "description": "The number of channels in the final recording. Defaults to `mono`.", + "example": "dual", + "type": "string", + "enum": [ + "mono", + "dual" + ] + }, + "RecordingStatusCallback": { + "description": "The URL the recording callbacks will be sent to.", + "example": "https://example.com/recording_status_callback", + "type": "string" + }, + "RecordingStatusCallbackMethod": { + "description": "HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.", + "example": "GET", + "type": "string", + "enum": [ + "GET", + "POST" + ] + }, + "RecordingStatusCallbackEvent": { + "description": "The changes to the recording's state that should generate a call to `RecordingStatusCallback`. Can be: `in-progress`, `completed` and `absent`. Separate multiple values with a space. Defaults to `completed`.", + "example": "in-progress completed absent", + "type": "string" + }, + "RecordingTimeout": { + "description": "The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected. The timer only starts when the speech is detected. The minimum value is 0. The default value is 0 (infinite).", + "example": 5, + "type": "integer", + "default": 0 + }, + "RecordingTrack": { + "description": "The audio track to record for the call. The default is `both`.", + "example": "inbound", + "type": "string", + "enum": [ + "inbound", + "outbound", + "both" + ] + }, + "Trim": { + "description": "Whether to trim any leading and trailing silence from the recording. Defaults to `trim-silence`.", + "example": "trim-silence", + "type": "string", + "enum": [ + "trim-silence", + "do-not-trim" + ] + }, + "SendRecordingUrl": { + "$ref": "#/components/schemas/SendRecordingUrl" + }, + "PreferredCodecs": { + "description": "The list of comma-separated codecs to be offered on a call.", + "example": "PCMA,PCMU", + "type": "string" + }, + "SipAuthUsername": { + "description": "The username to use for SIP authentication.", + "example": "user", + "type": "string" + }, + "SipAuthPassword": { + "description": "The password to use for SIP authentication.", + "example": "1234", + "type": "string" + }, + "SipRegion": { + "description": "Defines the SIP region to be used for the call.", + "type": "string", + "default": "US", + "enum": [ + "US", + "Europe", + "Canada", + "Australia", + "Middle East" + ], + "example": "Canada" + } + }, + "example": { + "From": "+13120001234", + "To": "+13121230000", + "AIAssistantId": "ai-assistant-id-123" + } + }, + "InitiateAICallResult": { + "type": "object", + "title": "Initiate AI Call Result", + "example": { + "from": "+13120001234", + "to": "+13121230000", + "status": "queued", + "call_sid": "v3:example-call-sid" + }, + "properties": { + "from": { + "type": "string", + "example": "+13120001234" + }, + "to": { + "type": "string", + "example": "+13120000000" + }, + "status": { + "type": "string", + "example": "queued" + }, + "call_sid": { + "type": "string", + "example": "v3:example-call-sid" + } + } + }, + "InitiateCallRequest": { + "type": "object", + "title": "Initiate Call Request", + "required": [ + "To", + "From", + "ApplicationSid" + ], + "properties": { + "ApplicationSid": { + "description": "The ID of the TeXML Application.", + "type": "string" + }, + "To": { + "description": "The phone number of the called party. Phone numbers are formatted with a `+` and country code.", + "example": "+16175551212", + "type": "string" + }, + "From": { + "description": "The phone number of the party that initiated the call. Phone numbers are formatted with a `+` and country code.", + "example": "+16175551212", + "type": "string" + }, + "CallerId": { + "description": "To be used as the caller id name (SIP From Display Name) presented to the destination (`To` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and `-_~!.+` special characters. If ommited, the display name will be the same as the number in the `From` field.", + "example": "Info", + "type": "string" + }, + "Url": { + "description": "The URL from which Telnyx will retrieve the TeXML call instructions.", + "example": "https://www.example.com/instructions.xml", + "type": "string" + }, + "UrlMethod": { + "description": "HTTP request type used for `Url`. The default value is inherited from TeXML Application setting.", + "example": "GET", + "default": "POST", + "type": "string", + "enum": [ + "GET", + "POST" + ] + }, + "FallbackUrl": { + "description": "A failover URL for which Telnyx will retrieve the TeXML call instructions if the `Url` is not responding.", + "example": "https://www.example.com/instructions-fallback.xml", + "type": "string" + }, + "StatusCallback": { + "description": "URL destination for Telnyx to send status callback events to for the call.", + "example": "https://www.example.com/callback", + "type": "string" + }, + "StatusCallbackMethod": { + "description": "HTTP request type used for `StatusCallback`.", + "example": "GET", + "default": "POST", + "type": "string", + "enum": [ + "GET", + "POST" + ] + }, + "StatusCallbackEvent": { + "description": "The call events for which Telnyx should send a webhook. Multiple events can be defined when separated by a space.", + "example": "initiated", + "default": "completed", + "type": "string", + "enum": [ + "initiated", + "ringing", + "answered", + "completed" + ] + }, + "MachineDetection": { + "description": "Enables Answering Machine Detection.", + "example": "Enable", + "default": "Disable", + "type": "string", + "enum": [ + "Enable", + "Disable", + "DetectMessageEnd" + ] + }, + "DetectionMode": { + "description": "Allows you to chose between Premium and Standard detections.", + "example": "Premium", + "default": "Regular", + "type": "string", + "enum": [ + "Premium", + "Regular" + ] + }, + "AsyncAmd": { + "description": "Select whether to perform answering machine detection in the background. By default execution is blocked until Answering Machine Detection is completed.", + "example": true, + "default": false, + "type": "boolean" + }, + "AsyncAmdStatusCallback": { + "description": "URL destination for Telnyx to send AMD callback events to for the call.", + "example": "https://www.example.com/callback", + "type": "string" + }, + "AsyncAmdStatusCallbackMethod": { + "description": "HTTP request type used for `AsyncAmdStatusCallback`. The default value is inherited from TeXML Application setting.", "example": "GET", "default": "POST", "type": "string", @@ -91387,6 +92157,41 @@ "type": "string" } }, + "oneOf": [ + { + "title": "With URL", + "required": [ + "Url" + ], + "properties": { + "Texml": { + "not": {} + } + } + }, + { + "title": "With TeXML", + "required": [ + "Texml" + ], + "properties": { + "Url": { + "not": {} + } + } + }, + { + "title": "Application Default", + "properties": { + "Url": { + "not": {} + }, + "Texml": { + "not": {} + } + } + } + ], "example": { "To": "+13121230000", "From": "+13120001234", @@ -105459,6 +106264,175 @@ "description": "High-level metrics summary for a messaging profile.", "additionalProperties": true }, + "PronunciationDictAliasItem": { + "type": "object", + "description": "An alias pronunciation item. When the `text` value is found in input, it is replaced with the `alias` before speech synthesis.", + "required": [ + "text", + "type", + "alias" + ], + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The text to match in the input. Case-insensitive matching is used during synthesis.", + "minLength": 1, + "maxLength": 200, + "example": "Telnyx" + }, + "type": { + "type": "string", + "description": "The item type.", + "enum": [ + "alias" + ], + "example": "alias" + }, + "alias": { + "type": "string", + "description": "The replacement text that will be spoken instead.", + "minLength": 1, + "maxLength": 500, + "example": "tel-nicks" + } + } + }, + "PronunciationDictData": { + "type": "object", + "description": "A pronunciation dictionary record.", + "properties": { + "record_type": { + "type": "string", + "description": "Identifies the resource type.", + "enum": [ + "pronunciation_dict" + ], + "example": "pronunciation_dict" + }, + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the pronunciation dictionary.", + "example": "c215a3e1-be41-4701-97e8-1d3c22f9a5b7" + }, + "name": { + "type": "string", + "description": "Human-readable name for the dictionary. Must be unique within the organization.", + "example": "Brand Names" + }, + "items": { + "type": "array", + "description": "List of pronunciation items (alias or phoneme type).", + "items": { + "$ref": "#/components/schemas/PronunciationDictItem" + } + }, + "version": { + "type": "integer", + "description": "Auto-incrementing version number. Increases by 1 on each update. Used for optimistic concurrency control and cache invalidation.", + "example": 1 + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp with millisecond precision.", + "example": "2026-03-25T12:00:00.000Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp with millisecond precision.", + "example": "2026-03-25T12:00:00.000Z" + } + } + }, + "PronunciationDictItem": { + "description": "A single pronunciation dictionary item. Use type 'alias' to replace matched text with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA notation.", + "oneOf": [ + { + "$ref": "#/components/schemas/PronunciationDictAliasItem" + }, + { + "$ref": "#/components/schemas/PronunciationDictPhonemeItem" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "alias": "#/components/schemas/PronunciationDictAliasItem", + "phoneme": "#/components/schemas/PronunciationDictPhonemeItem" + } + } + }, + "PronunciationDictListResponse": { + "type": "object", + "description": "Paginated list of pronunciation dictionaries.", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PronunciationDictData" + }, + "description": "Array of pronunciation dictionary objects." + }, + "meta": { + "$ref": "#/components/schemas/pronunciation-dicts_PaginationMeta" + } + } + }, + "PronunciationDictPhonemeItem": { + "type": "object", + "description": "A phoneme pronunciation item. When the `text` value is found in input, it is pronounced using the specified IPA phoneme notation.", + "required": [ + "text", + "type", + "phoneme", + "alphabet" + ], + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The text to match in the input. Case-insensitive matching is used during synthesis.", + "minLength": 1, + "maxLength": 200, + "example": "Telnyx" + }, + "type": { + "type": "string", + "description": "The item type.", + "enum": [ + "phoneme" + ], + "example": "phoneme" + }, + "phoneme": { + "type": "string", + "description": "The phoneme notation representing the desired pronunciation.", + "minLength": 1, + "maxLength": 500, + "example": "\u02c8t\u025bl.n\u026aks" + }, + "alphabet": { + "type": "string", + "description": "The phonetic alphabet used for the phoneme notation.", + "enum": [ + "ipa" + ], + "example": "ipa" + } + } + }, + "PronunciationDictResponse": { + "type": "object", + "description": "Response containing a single pronunciation dictionary.", + "properties": { + "data": { + "$ref": "#/components/schemas/PronunciationDictData" + } + } + }, "PublicInternetGateway": { "allOf": [ { @@ -120971,6 +121945,29 @@ } } }, + "UpdatePronunciationDictRequest": { + "type": "object", + "description": "Request body for updating a pronunciation dictionary. At least one field must be provided.", + "minProperties": 1, + "properties": { + "name": { + "type": "string", + "description": "Updated dictionary name.", + "minLength": 1, + "maxLength": 255, + "example": "Updated Brand Names" + }, + "items": { + "type": "array", + "description": "Updated list of pronunciation items (alias or phoneme type).", + "minItems": 1, + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/PronunciationDictItem" + } + } + } + }, "UpdateQueueRequest": { "type": "object", "title": "Update Queue Request", @@ -129983,6 +130980,44 @@ ], "description": "Identifies the type of the resource." }, + "pronunciation-dicts_ErrorResponse": { + "type": "object", + "description": "Standard Telnyx error response.", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorObject" + } + } + } + }, + "pronunciation-dicts_PaginationMeta": { + "type": "object", + "description": "Pagination metadata returned with list responses.", + "properties": { + "page_number": { + "type": "integer", + "description": "Current page number (1-based).", + "example": 1 + }, + "page_size": { + "type": "integer", + "description": "Number of results per page.", + "example": 20 + }, + "total_results": { + "type": "integer", + "description": "Total number of results across all pages.", + "example": 3 + }, + "total_pages": { + "type": "integer", + "description": "Total number of pages.", + "example": 1 + } + } + }, "push-notifications_Error": { "required": [ "code", @@ -130786,6 +131821,34 @@ }, "type": "object" }, + "voice-designs_ErrorObject": { + "type": "object", + "description": "A single error object.", + "properties": { + "code": { + "type": "string", + "description": "Telnyx-specific error code." + }, + "title": { + "type": "string", + "description": "Short, human-readable summary of the error." + }, + "detail": { + "type": "string", + "description": "Detailed, human-readable explanation of the error." + }, + "source": { + "type": "object", + "description": "Reference to the source of the error.", + "properties": { + "pointer": { + "type": "string", + "description": "A JSON Pointer (RFC 6901) to the field that caused the error." + } + } + } + } + }, "voice-designs_ErrorResponse": { "type": "object", "description": "Standard error response envelope.", @@ -130793,7 +131856,7 @@ "errors": { "type": "array", "items": { - "$ref": "#/components/schemas/ErrorObject" + "$ref": "#/components/schemas/voice-designs_ErrorObject" } } }, @@ -131211,6 +132274,11 @@ "scheme": "bearer", "bearerFormat": "JWT" }, + "pronunciation-dicts_bearerAuth": { + "type": "http", + "scheme": "bearer", + "description": "Telnyx API v2 key. Obtain from https://portal.telnyx.com" + }, "stored-payment-transactions_bearerAuth": { "type": "http", "scheme": "bearer", diff --git a/openapi/spec3.yml b/openapi/spec3.yml index 3747b4f..6fb87ad 100644 --- a/openapi/spec3.yml +++ b/openapi/spec3.yml @@ -2609,6 +2609,15 @@ components: - active example: application_name type: string + pronunciation_dict_id: + description: The UUID of the pronunciation dictionary. + in: path + name: id + required: true + schema: + example: c215a3e1-be41-4701-97e8-1d3c22f9a5b7 + format: uuid + type: string provider: description: TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is provided. @@ -5219,6 +5228,12 @@ components: title: List Inexplicit Number Orders Response type: object description: Successful response with a list of inexplicit number orders. + InitiateAICallResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/InitiateAICallResult' + description: Successful response upon initiating an AI call. InitiateCallResponse: content: application/json: @@ -24196,6 +24211,27 @@ components: example: Please, let me know when the port completes type: string type: object + CreatePronunciationDictRequest: + description: Request body for creating a pronunciation dictionary. + properties: + items: + description: List of pronunciation items (alias or phoneme type). At least + one item is required. + items: + $ref: '#/components/schemas/PronunciationDictItem' + maxItems: 100 + minItems: 1 + type: array + name: + description: Human-readable name. Must be unique within the organization. + example: Brand Names + maxLength: 255 + minLength: 1 + type: string + required: + - name + - items + type: object CreateQueueRequest: example: max_size: 100 @@ -27927,24 +27963,26 @@ components: type: string type: object ErrorObject: - description: A single error object. properties: code: - description: Telnyx-specific error code. + description: Machine-readable error code. + example: '90202' type: string detail: - description: Detailed, human-readable explanation of the error. + description: Detailed error description. + example: items must have at least one item type: string source: - description: Reference to the source of the error. + description: Source of the error. properties: pointer: - description: A JSON Pointer (RFC 6901) to the field that caused the - error. + description: JSON pointer to the field that caused the error. + example: /items type: string type: object title: - description: Short, human-readable summary of the error. + description: Short human-readable error title. + example: Validation failed type: string type: object ErrorRecord: @@ -32123,6 +32161,302 @@ components: - from title: TransferToolParams type: object + InitiateAICallRequest: + example: + AIAssistantId: ai-assistant-id-123 + From: '+13120001234' + To: '+13121230000' + properties: + AIAssistantDynamicVariables: + additionalProperties: + type: string + description: Key-value map of dynamic variables to pass to the AI assistant. + example: + account_id: '12345' + customer_name: John Doe + type: object + AIAssistantId: + description: The ID of the AI assistant to use for the call. + type: string + AIAssistantVersion: + description: The version of the AI assistant to use. + type: string + AsyncAmd: + default: false + description: Select whether to perform answering machine detection in the + background. By default execution is blocked until Answering Machine Detection + is completed. + example: true + type: boolean + AsyncAmdStatusCallback: + description: URL destination for Telnyx to send AMD callback events to for + the call. + example: https://www.example.com/callback + type: string + AsyncAmdStatusCallbackMethod: + default: POST + description: HTTP request type used for `AsyncAmdStatusCallback`. + enum: + - GET + - POST + example: GET + type: string + CallerId: + description: To be used as the caller id name (SIP From Display Name) presented + to the destination (`To` number). The string should have a maximum of + 128 characters, containing only letters, numbers, spaces, and `-_~!.+` + special characters. If omitted, the display name will be the same as the + number in the `From` field. + example: Info + type: string + ConversationCallback: + description: URL destination for Telnyx to send conversation callback events + to. + example: https://www.example.com/conversation-callback + type: string + ConversationCallbackMethod: + default: POST + description: HTTP request type used for `ConversationCallback`. + enum: + - GET + - POST + example: GET + type: string + ConversationCallbacks: + description: An array of URL destinations for conversation callback events. + example: + - https://www.example.com/conversation-callback1 + - https://www.example.com/conversation-callback2 + items: + type: string + type: array + CustomHeaders: + description: Custom HTTP headers to be sent with the call. Each header should + be an object with 'name' and 'value' properties. + example: + - name: X-Custom-Header + value: custom-value + items: + properties: + name: + description: The name of the custom header + type: string + value: + description: The value of the custom header + type: string + required: + - name + - value + type: object + type: array + DetectionMode: + default: Regular + description: Allows you to choose between Premium and Standard detections. + enum: + - Premium + - Regular + example: Premium + type: string + From: + description: The phone number of the party initiating the call. Phone numbers + are formatted with a `+` and country code. + example: '+16175551212' + type: string + MachineDetection: + default: Disable + description: Enables Answering Machine Detection. + enum: + - Enable + - Disable + - DetectMessageEnd + example: Enable + type: string + MachineDetectionSilenceTimeout: + default: 3500 + description: If initial silence duration is greater than this value, consider + it a machine. Ignored when `premium` detection is used. + example: 2000 + type: integer + MachineDetectionSpeechEndThreshold: + default: 800 + description: Silence duration threshold after a greeting message or voice + for it be considered human. Ignored when `premium` detection is used. + example: 2000 + type: integer + MachineDetectionSpeechThreshold: + default: 3500 + description: Maximum threshold of a human greeting. If greeting longer than + this value, considered machine. Ignored when `premium` detection is used. + example: 2000 + type: integer + MachineDetectionTimeout: + default: 30000 + description: Maximum timeout threshold in milliseconds for overall detection. + example: 5000 + maximum: 60000 + minimum: 500 + type: integer + Passports: + description: A string of passport identifiers to associate with the call. + type: string + PreferredCodecs: + description: The list of comma-separated codecs to be offered on a call. + example: PCMA,PCMU + type: string + Record: + description: Whether to record the entire participant's call leg. Defaults + to `false`. + example: false + type: boolean + RecordingChannels: + description: The number of channels in the final recording. Defaults to + `mono`. + enum: + - mono + - dual + example: dual + type: string + RecordingStatusCallback: + description: The URL the recording callbacks will be sent to. + example: https://example.com/recording_status_callback + type: string + RecordingStatusCallbackEvent: + description: 'The changes to the recording''s state that should generate + a call to `RecordingStatusCallback`. Can be: `in-progress`, `completed` + and `absent`. Separate multiple values with a space. Defaults to `completed`.' + example: in-progress completed absent + type: string + RecordingStatusCallbackMethod: + description: HTTP request type used for `RecordingStatusCallback`. Defaults + to `POST`. + enum: + - GET + - POST + example: GET + type: string + RecordingTimeout: + default: 0 + description: The number of seconds that Telnyx will wait for the recording + to be stopped if silence is detected. The timer only starts when the speech + is detected. The minimum value is 0. The default value is 0 (infinite). + example: 5 + type: integer + RecordingTrack: + description: The audio track to record for the call. The default is `both`. + enum: + - inbound + - outbound + - both + example: inbound + type: string + SendRecordingUrl: + $ref: '#/components/schemas/SendRecordingUrl' + SipAuthPassword: + description: The password to use for SIP authentication. + example: '1234' + type: string + SipAuthUsername: + description: The username to use for SIP authentication. + example: user + type: string + SipRegion: + default: US + description: Defines the SIP region to be used for the call. + enum: + - US + - Europe + - Canada + - Australia + - Middle East + example: Canada + type: string + StatusCallback: + description: URL destination for Telnyx to send status callback events to + for the call. + example: https://www.example.com/callback + type: string + StatusCallbackEvent: + default: completed + description: 'The call events for which Telnyx should send a webhook. Multiple + events can be defined when separated by a space. Valid values: initiated, + ringing, answered, completed.' + example: initiated answered + type: string + StatusCallbackMethod: + default: POST + description: HTTP request type used for `StatusCallback`. + enum: + - GET + - POST + example: GET + type: string + StatusCallbacks: + description: An array of URL destinations for Telnyx to send status callback + events to for the call. + example: + - https://www.example.com/callback1 + - https://www.example.com/callback2 + items: + type: string + type: array + TimeLimit: + default: 14400 + description: The maximum duration of the call in seconds. The minimum value + is 30 and the maximum value is 14400 (4 hours). Default is 14400 seconds. + example: 3600 + maximum: 14400 + minimum: 30 + type: integer + Timeout: + default: 30 + description: The number of seconds to wait for the called party to answer + the call before the call is canceled. The minimum value is 5 and the maximum + value is 120. Default is 30 seconds. + example: 60 + maximum: 120 + minimum: 5 + type: integer + x-stainless-param: timeout_seconds + To: + description: The phone number of the called party. Phone numbers are formatted + with a `+` and country code. + example: '+16175551212' + type: string + Trim: + description: Whether to trim any leading and trailing silence from the recording. + Defaults to `trim-silence`. + enum: + - trim-silence + - do-not-trim + example: trim-silence + type: string + required: + - From + - To + - AIAssistantId + title: Initiate AI Call Request + type: object + InitiateAICallResult: + example: + call_sid: v3:example-call-sid + from: '+13120001234' + status: queued + to: '+13121230000' + properties: + call_sid: + example: v3:example-call-sid + type: string + from: + example: '+13120001234' + type: string + status: + example: queued + type: string + to: + example: '+13120000000' + type: string + title: Initiate AI Call Result + type: object InitiateCallRequest: example: ApplicationSid: example-app-sid @@ -32130,6 +32464,25 @@ components: StatusCallback: https://www.example.com/statuscallback-listener To: '+13121230000' Url: https://www.example.com/texml.xml + oneOf: + - properties: + Texml: + not: {} + required: + - Url + title: With URL + - properties: + Url: + not: {} + required: + - Texml + title: With TeXML + - properties: + Texml: + not: {} + Url: + not: {} + title: Application Default properties: ApplicationSid: description: The ID of the TeXML Application. @@ -43765,6 +44118,140 @@ components: additionalProperties: true description: High-level metrics summary for a messaging profile. type: object + PronunciationDictAliasItem: + additionalProperties: false + description: An alias pronunciation item. When the `text` value is found in + input, it is replaced with the `alias` before speech synthesis. + properties: + alias: + description: The replacement text that will be spoken instead. + example: tel-nicks + maxLength: 500 + minLength: 1 + type: string + text: + description: The text to match in the input. Case-insensitive matching is + used during synthesis. + example: Telnyx + maxLength: 200 + minLength: 1 + type: string + type: + description: The item type. + enum: + - alias + example: alias + type: string + required: + - text + - type + - alias + type: object + PronunciationDictData: + description: A pronunciation dictionary record. + properties: + created_at: + description: ISO 8601 timestamp with millisecond precision. + example: '2026-03-25T12:00:00.000Z' + format: date-time + type: string + id: + description: Unique identifier for the pronunciation dictionary. + example: c215a3e1-be41-4701-97e8-1d3c22f9a5b7 + format: uuid + type: string + items: + description: List of pronunciation items (alias or phoneme type). + items: + $ref: '#/components/schemas/PronunciationDictItem' + type: array + name: + description: Human-readable name for the dictionary. Must be unique within + the organization. + example: Brand Names + type: string + record_type: + description: Identifies the resource type. + enum: + - pronunciation_dict + example: pronunciation_dict + type: string + updated_at: + description: ISO 8601 timestamp with millisecond precision. + example: '2026-03-25T12:00:00.000Z' + format: date-time + type: string + version: + description: Auto-incrementing version number. Increases by 1 on each update. + Used for optimistic concurrency control and cache invalidation. + example: 1 + type: integer + type: object + PronunciationDictItem: + description: A single pronunciation dictionary item. Use type 'alias' to replace + matched text with a spoken alias, or type 'phoneme' to specify exact pronunciation + using IPA notation. + discriminator: + mapping: + alias: '#/components/schemas/PronunciationDictAliasItem' + phoneme: '#/components/schemas/PronunciationDictPhonemeItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/PronunciationDictAliasItem' + - $ref: '#/components/schemas/PronunciationDictPhonemeItem' + PronunciationDictListResponse: + description: Paginated list of pronunciation dictionaries. + properties: + data: + description: Array of pronunciation dictionary objects. + items: + $ref: '#/components/schemas/PronunciationDictData' + type: array + meta: + $ref: '#/components/schemas/pronunciation-dicts_PaginationMeta' + type: object + PronunciationDictPhonemeItem: + additionalProperties: false + description: A phoneme pronunciation item. When the `text` value is found in + input, it is pronounced using the specified IPA phoneme notation. + properties: + alphabet: + description: The phonetic alphabet used for the phoneme notation. + enum: + - ipa + example: ipa + type: string + phoneme: + description: The phoneme notation representing the desired pronunciation. + example: "\u02C8t\u025Bl.n\u026Aks" + maxLength: 500 + minLength: 1 + type: string + text: + description: The text to match in the input. Case-insensitive matching is + used during synthesis. + example: Telnyx + maxLength: 200 + minLength: 1 + type: string + type: + description: The item type. + enum: + - phoneme + example: phoneme + type: string + required: + - text + - type + - phoneme + - alphabet + type: object + PronunciationDictResponse: + description: Response containing a single pronunciation dictionary. + properties: + data: + $ref: '#/components/schemas/PronunciationDictData' + type: object PublicInternetGateway: allOf: - $ref: '#/components/schemas/Record' @@ -56571,6 +57058,25 @@ components: - field_value - requirement_type_id type: object + UpdatePronunciationDictRequest: + description: Request body for updating a pronunciation dictionary. At least + one field must be provided. + minProperties: 1 + properties: + items: + description: Updated list of pronunciation items (alias or phoneme type). + items: + $ref: '#/components/schemas/PronunciationDictItem' + maxItems: 100 + minItems: 1 + type: array + name: + description: Updated dictionary name. + example: Updated Brand Names + maxLength: 255 + minLength: 1 + type: string + type: object UpdateQueueRequest: example: max_size: 200 @@ -63636,6 +64142,34 @@ components: - event example: event type: string + pronunciation-dicts_ErrorResponse: + description: Standard Telnyx error response. + properties: + errors: + items: + $ref: '#/components/schemas/ErrorObject' + type: array + type: object + pronunciation-dicts_PaginationMeta: + description: Pagination metadata returned with list responses. + properties: + page_number: + description: Current page number (1-based). + example: 1 + type: integer + page_size: + description: Number of results per page. + example: 20 + type: integer + total_pages: + description: Total number of pages. + example: 1 + type: integer + total_results: + description: Total number of results across all pages. + example: 3 + type: integer + type: object push-notifications_Error: properties: code: @@ -64235,6 +64769,27 @@ components: $ref: '#/components/schemas/voice-channels_Error' type: array type: object + voice-designs_ErrorObject: + description: A single error object. + properties: + code: + description: Telnyx-specific error code. + type: string + detail: + description: Detailed, human-readable explanation of the error. + type: string + source: + description: Reference to the source of the error. + properties: + pointer: + description: A JSON Pointer (RFC 6901) to the field that caused the + error. + type: string + type: object + title: + description: Short, human-readable summary of the error. + type: string + type: object voice-designs_ErrorResponse: description: Standard error response envelope. example: @@ -64245,7 +64800,7 @@ components: properties: errors: items: - $ref: '#/components/schemas/ErrorObject' + $ref: '#/components/schemas/voice-designs_ErrorObject' type: array type: object voice-designs_PaginationMeta: @@ -64539,6 +65094,10 @@ components: bearerFormat: JWT scheme: bearer type: http + pronunciation-dicts_bearerAuth: + description: Telnyx API v2 key. Obtain from https://portal.telnyx.com + scheme: bearer + type: http stored-payment-transactions_bearerAuth: bearerFormat: JWT scheme: bearer @@ -88865,6 +89424,246 @@ paths: tags: - Private Wireless Gateways x-latency-category: responsive + /pronunciation_dicts: + get: + description: List all pronunciation dictionaries for the authenticated organization. + Results are paginated using offset-based pagination. + operationId: ListPronunciationDicts + parameters: + - description: Page number (1-based). Defaults to 1. + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + - description: Number of results per page. Defaults to 20, maximum 250. + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PronunciationDictListResponse' + description: A paginated list of pronunciation dictionaries. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Invalid pagination parameters. + '401': + description: Unauthorized. Invalid or missing API key. + summary: List pronunciation dictionaries + tags: + - Pronunciation Dictionaries + x-latency-category: interactive + post: + description: 'Create a new pronunciation dictionary for the authenticated organization. + Each dictionary contains a list of items that control how specific words are + spoken. Items can be alias type (text replacement) or phoneme type (IPA pronunciation + notation). + + + As an alternative to providing items directly as JSON, you can upload a dictionary + file (PLS/XML or plain text format, max 1MB) using multipart/form-data. PLS + files use the standard W3C Pronunciation Lexicon Specification XML format. + Text files use a line-based format: `word=alias` for aliases, `word:/phoneme/` + for IPA phonemes. + + + Limits: + + - Maximum 50 dictionaries per organization + + - Maximum 100 items per dictionary + + - Text: max 200 characters + + - Alias/phoneme value: max 500 characters + + - File upload: max 1MB (1,048,576 bytes)' + operationId: CreatePronunciationDict + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePronunciationDictRequest' + multipart/form-data: + schema: + properties: + file: + description: 'Dictionary file to upload. Supported formats: PLS/XML + (.pls, .xml) and plain text (.txt). Max size: 1MB (1,048,576 bytes).' + format: binary + type: string + name: + description: Human-readable name. Must be unique within the organization. + example: Brand Names + maxLength: 255 + minLength: 1 + type: string + required: + - name + - file + type: object + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/PronunciationDictResponse' + description: Pronunciation dictionary created successfully. + '401': + description: Unauthorized. Invalid or missing API key. + '422': + content: + application/json: + examples: + duplicate_name: + summary: Duplicate dictionary name + value: + errors: + - code: '90202' + detail: organization_id, name a dictionary with this name already + exists + source: + pointer: /organization_id, name + title: Validation failed + limit_exceeded: + summary: Organization limit exceeded + value: + errors: + - code: '90203' + detail: Maximum number of pronunciation dictionaries (50) reached + source: + pointer: / + title: Limit exceeded + validation_error: + summary: Validation failed + value: + errors: + - code: '90202' + detail: items must have at least one item + source: + pointer: /items + title: Validation failed + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Validation error or organization limit exceeded. + summary: Create a pronunciation dictionary + tags: + - Pronunciation Dictionaries + x-latency-category: interactive + /pronunciation_dicts/{id}: + delete: + description: Permanently delete a pronunciation dictionary. + operationId: DeletePronunciationDict + parameters: + - $ref: '#/components/parameters/pronunciation_dict_id' + responses: + '204': + description: Dictionary deleted successfully. No content returned. + '401': + description: Unauthorized. Invalid or missing API key. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Pronunciation dictionary not found. + summary: Delete a pronunciation dictionary + tags: + - Pronunciation Dictionaries + x-latency-category: interactive + get: + description: Retrieve a single pronunciation dictionary by ID. + operationId: GetPronunciationDict + parameters: + - $ref: '#/components/parameters/pronunciation_dict_id' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PronunciationDictResponse' + description: The requested pronunciation dictionary. + '401': + description: Unauthorized. Invalid or missing API key. + '404': + content: + application/json: + example: + errors: + - code: '90201' + detail: The requested pronunciation dictionary does not exist + title: Pronunciation dictionary not found + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Pronunciation dictionary not found. + summary: Get a pronunciation dictionary + tags: + - Pronunciation Dictionaries + x-latency-category: interactive + patch: + description: "Update the name and/or items of an existing pronunciation dictionary.\ + \ Uses optimistic locking \u2014 if the dictionary was modified concurrently,\ + \ the request returns 409 Conflict." + operationId: UpdatePronunciationDict + parameters: + - $ref: '#/components/parameters/pronunciation_dict_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePronunciationDictRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PronunciationDictResponse' + description: Pronunciation dictionary updated successfully. + '401': + description: Unauthorized. Invalid or missing API key. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Pronunciation dictionary not found. + '409': + content: + application/json: + example: + errors: + - code: '90200' + detail: Dictionary was modified concurrently, please retry + title: Pronunciation dictionary error + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Conflict. The dictionary was modified concurrently. Re-fetch + and retry. + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/pronunciation-dicts_ErrorResponse' + description: Validation error. + summary: Update a pronunciation dictionary + tags: + - Pronunciation Dictionaries + x-latency-category: interactive /public_internet_gateways: get: description: List all Public Internet Gateways. @@ -94661,6 +95460,39 @@ paths: - TeXML REST Commands x-group-parameters: 'true' x-latency-category: responsive + /texml/ai_calls/{connection_id}: + post: + description: Initiate an outbound AI call with warm-up support. Validates parameters, + builds an internal TeXML with an AI Assistant configuration, encodes instructions + into client state, and calls the dial API. The Twiml, Texml, and Url parameters + are not allowed and will result in a 422 error. + operationId: InitiateTexmlAICall + parameters: + - description: The ID of the TeXML connection to use for the call. + in: path + name: connection_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InitiateAICallRequest' + description: Initiate AI Call request object + required: true + responses: + '200': + $ref: '#/components/responses/InitiateAICallResponse' + '401': + $ref: '#/components/responses/UnauthenticatedResponse' + '422': + $ref: '#/components/responses/call-scripting_UnprocessableEntityResponse' + summary: Initiate an outbound AI call + tags: + - TeXML REST Commands + x-group-parameters: 'true' + x-latency-category: responsive /texml/secrets: post: description: Create a TeXML secret which can be later used as a Dynamic Parameter @@ -98498,51 +99330,6 @@ paths: tags: - Wireless Blocklists x-latency-category: responsive - patch: - description: Update a Wireless Blocklist. - operationId: UpdateWirelessBlocklist - requestBody: - content: - application/json: - schema: - properties: - name: - description: The name of the Wireless Blocklist. - example: My Wireless Blocklist - type: string - type: - description: The type of wireless blocklist. - enum: - - country - - mcc - - plmn - example: country - type: string - values: - description: Values to block. The values here depend on the `type` - of Wireless Blocklist. - example: - - CA - - US - items: - anyOf: - - $ref: '#/components/schemas/CountryCode' - - $ref: '#/components/schemas/MobileCountryCode' - - $ref: '#/components/schemas/PLMNCode' - type: array - type: object - required: true - responses: - '202': - $ref: '#/components/responses/UpdateWirelessBlocklistResponse' - '422': - $ref: '#/components/responses/wireless_UnprocessableEntity' - default: - $ref: '#/components/responses/wireless_GenericErrorResponse' - summary: Update a Wireless Blocklist - tags: - - Wireless Blocklists - x-latency-category: responsive post: description: Create a Wireless Blocklist to prevent SIMs from connecting to certain networks. @@ -98626,6 +99413,45 @@ paths: tags: - Wireless Blocklists x-latency-category: responsive + patch: + description: Update a Wireless Blocklist. + operationId: UpdateWirelessBlocklist + parameters: + - $ref: '#/components/parameters/WirelessBlocklistId' + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Wireless Blocklist. + example: My Wireless Blocklist + type: string + values: + description: Values to block. The values here depend on the `type` + of Wireless Blocklist. + example: + - CA + - US + items: + anyOf: + - $ref: '#/components/schemas/CountryCode' + - $ref: '#/components/schemas/MobileCountryCode' + - $ref: '#/components/schemas/PLMNCode' + type: array + type: object + required: true + responses: + '202': + $ref: '#/components/responses/UpdateWirelessBlocklistResponse' + '422': + $ref: '#/components/responses/wireless_UnprocessableEntity' + default: + $ref: '#/components/responses/wireless_GenericErrorResponse' + summary: Update a Wireless Blocklist + tags: + - Wireless Blocklists + x-latency-category: responsive security: - bearerAuth: [] servers: @@ -98826,6 +99652,10 @@ tags: name: Programmable Fax Applications - description: Programmable fax command operations name: Programmable Fax Commands +- description: Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries + contain alias items (text replacement) and phoneme items (IPA pronunciation notation) + that control how specific words are spoken. + name: Pronunciation Dictionaries - description: Public Internet Gateway operations name: Public Internet Gateways - description: Mobile push credential management