{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/telnyx/main/json-schema/telnyx-outbound-message-payload-schema.json", "title": "OutboundMessagePayload", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/telnyx-messages-api-openapi.yml#/components/schemas/OutboundMessagePayload", "properties": { "cc": { "items": { "properties": { "carrier": { "description": "The carrier of the receiver.", "type": "string" }, "line_type": { "description": "The line-type of the receiver.", "enum": [ "Wireline", "Wireless", "VoWiFi", "VoIP", "Pre-Paid Wireless", "" ], "type": "string" }, "phone_number": { "description": "Receiving address (+E.164 formatted phone number or short code).", "type": "string", "x-format": "address" }, "status": { "enum": [ "queued", "sending", "sent", "delivered", "sending_failed", "delivery_failed", "delivery_unconfirmed" ], "type": "string" } }, "type": "object" }, "type": "array" }, "completed_at": { "description": "ISO 8601 formatted date indicating when the message was finalized.", "format": "date-time", "type": [ "string", "null" ] }, "cost": { "properties": { "amount": { "description": "The amount deducted from your account.", "type": "string", "x-format": "decimal" }, "currency": { "description": "The ISO 4217 currency identifier.", "type": "string", "x-format": "iso4217" } }, "type": [ "object", "null" ] }, "cost_breakdown": { "description": "Detailed breakdown of the message cost components.", "properties": { "carrier_fee": { "properties": { "amount": { "description": "The carrier fee amount.", "type": "string", "x-format": "decimal" }, "currency": { "description": "The ISO 4217 currency identifier.", "type": "string", "x-format": "iso4217" } }, "type": "object" }, "rate": { "properties": { "amount": { "description": "The rate amount applied.", "type": "string", "x-format": "decimal" }, "currency": { "description": "The ISO 4217 currency identifier.", "type": "string", "x-format": "iso4217" } }, "type": "object" } }, "type": [ "object", "null" ] }, "direction": { "description": "The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you.", "enum": [ "outbound" ], "type": "string" }, "encoding": { "description": "Encoding scheme used for the message body.", "type": "string" }, "errors": { "description": "These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.", "items": { "$ref": "#/$defs/messaging_Error" }, "type": "array" }, "from": { "properties": { "carrier": { "description": "The carrier of the receiver.", "type": "string" }, "line_type": { "description": "The line-type of the receiver.", "enum": [ "Wireline", "Wireless", "VoWiFi", "VoIP", "Pre-Paid Wireless", "" ], "type": "string" }, "phone_number": { "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).", "type": "string", "x-format": "address" } }, "type": "object" }, "id": { "description": "Identifies the type of resource.", "format": "uuid", "type": "string" }, "media": { "items": { "properties": { "content_type": { "description": "The MIME type of the requested media.", "type": [ "string", "null" ], "x-format": "mime-type" }, "sha256": { "description": "The SHA256 hash of the requested media.", "type": [ "string", "null" ] }, "size": { "description": "The size of the requested media.", "type": [ "integer", "null" ] }, "url": { "description": "The url of the media requested to be sent.", "format": "url", "type": "string" } }, "type": "object" }, "type": "array" }, "messaging_profile_id": { "description": "Unique identifier for a messaging profile.", "type": "string" }, "organization_id": { "description": "The id of the organization the messaging profile belongs to.", "format": "uuid", "type": "string" }, "parts": { "description": "Number of parts into which the message's body must be split.", "maximum": 10, "minimum": 1, "type": "integer" }, "received_at": { "description": "ISO 8601 formatted date indicating when the message request was received.", "format": "date-time", "type": "string" }, "record_type": { "description": "Identifies the type of the resource.", "enum": [ "message" ], "type": "string" }, "sent_at": { "description": "ISO 8601 formatted date indicating when the message was sent.", "format": "date-time", "type": [ "string", "null" ] }, "smart_encoding_applied": { "description": "Indicates whether smart encoding was applied to this message. When `true`, one or more Unicode characters were automatically replaced with GSM-7 equivalents to reduce segment count and cost. The original message text is preserved in webhooks.", "type": "boolean" }, "subject": { "description": "Subject of multimedia message", "type": [ "string", "null" ] }, "tags": { "description": "Tags associated with the resource.", "items": { "type": "string" }, "type": "array" }, "tcr_campaign_billable": { "description": "Indicates whether the TCR campaign is billable.", "type": "boolean" }, "tcr_campaign_id": { "description": "The Campaign Registry (TCR) campaign ID associated with the message.", "type": [ "string", "null" ] }, "tcr_campaign_registered": { "description": "The registration status of the TCR campaign.", "type": [ "string", "null" ] }, "text": { "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**", "type": "string" }, "to": { "items": { "properties": { "carrier": { "description": "The carrier of the receiver.", "type": "string" }, "line_type": { "description": "The line-type of the receiver.", "enum": [ "Wireline", "Wireless", "VoWiFi", "VoIP", "Pre-Paid Wireless", "" ], "type": "string" }, "phone_number": { "description": "Receiving address (+E.164 formatted phone number or short code).", "type": "string", "x-format": "address" }, "status": { "description": "The delivery status of the message.", "enum": [ "queued", "sending", "sent", "expired", "sending_failed", "delivery_unconfirmed", "delivered", "delivery_failed" ], "type": "string" } }, "type": "object" }, "type": "array" }, "type": { "description": "The type of message.", "enum": [ "SMS", "MMS" ], "type": "string" }, "valid_until": { "description": "Message must be out of the queue by this time or else it will be discarded and marked as 'sending_failed'. Once the message moves out of the queue, this field will be nulled", "format": "date-time", "type": [ "string", "null" ] }, "wait_seconds": { "description": "Seconds the message is queued due to rate limiting before being sent to the carrier. Represents the maximum wait across all applicable rate limits (account, carrier, campaign). 0.0 = no queuing delay.", "format": "float", "type": [ "number", "null" ] }, "webhook_failover_url": { "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", "format": "url", "type": [ "string", "null" ] }, "webhook_url": { "description": "The URL where webhooks related to this message will be sent.", "format": "url", "type": [ "string", "null" ] } }, "type": "object", "$defs": { "messaging_Error": { "properties": { "code": { "type": "string", "x-format": "integer" }, "detail": { "type": "string" }, "meta": { "type": "object" }, "source": { "properties": { "parameter": { "description": "Indicates which query parameter caused the error.", "type": "string" }, "pointer": { "description": "JSON pointer (RFC6901) to the offending entity.", "format": "json-pointer", "type": "string" } }, "type": "object" }, "title": { "type": "string" } }, "required": [ "code", "title" ] } } }