This webhook uses Telnyx headers (telnyx-timestamp, telnyx-signature-ed25519) that are compatible with Standard Webhooks specification for SDK generation. Custom validation logic can map these to standard webhook-timestamp and webhook-signature equivalents. See https://github.com/standard-webhooks/standard-webhooks for details.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unix timestamp (seconds since epoch) of when the webhook was sent - compatible with webhook-timestamp Unix timestamp for replay attack prevention
Base64 encoded Ed25519 signature for webhook verification - compatible with webhook-signature Ed25519 signature of timestamp|payload for verification
Show child attributes
Identifies the type of the resource.
event "event"
Identifies the type of resource.
The type of event being delivered.
message.received "message.received"
ISO 8601 formatted date indicating when the resource was created.
Show child attributes
Identifies the type of the resource.
message "message"
The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you.
inbound "inbound"
Identifies the type of resource.
The type of message. This value can be either 'sms' or 'mms'.
SMS, MMS Unique identifier for a messaging profile.
Show child attributes
Receiving address (+E.164 formatted phone number or short code).
queued, sending, sent, delivered, sending_failed, delivery_failed, delivery_unconfirmed, webhook_delivered The carrier of the receiver.
The line-type of the receiver.
Wireline, Wireless, VoWiFi, VoIP, Pre-Paid Wireless, Show child attributes
Receiving address (+E.164 formatted phone number or short code).
queued, sending, sent, delivered, sending_failed, delivery_failed, delivery_unconfirmed The carrier of the receiver.
The line-type of the receiver.
Wireline, Wireless, VoWiFi, VoIP, Pre-Paid Wireless, Show child attributes
Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).
received, delivered The carrier of the sender.
The line-type of the sender.
Wireline, Wireless, VoWiFi, VoIP, Pre-Paid Wireless, Message body (i.e., content) as a non-empty string.
Required for SMS
Show child attributes
The url of the media requested to be sent.
The MIME type of the requested media.
The size of the requested media.
The SHA256 hash of the requested media.
32The URL where webhooks related to this message will be sent.
The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.
Encoding scheme used for the message body.
Number of parts into which the message's body must be split.
1 <= x <= 10Tags associated with the resource.
Detailed breakdown of the message cost components.
Show child attributes
The Campaign Registry (TCR) campaign ID associated with the message.
Indicates whether the TCR campaign is billable.
The registration status of the TCR campaign.
"REGISTERED"
ISO 8601 formatted date indicating when the message request was received.
Not used for inbound messages.
Not used for inbound messages.
Not used for inbound messages.
These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.
Show child attributes
{
"record_type": "message",
"direction": "inbound",
"id": "7ee4241c-f127-47e5-9c34-3aac291f8058",
"type": "SMS",
"messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3",
"organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950",
"from": {
"phone_number": "+18665550001",
"status": "delivered",
"carrier": "T-MOBILE USA, INC.",
"line_type": "Wireless"
},
"to": [
{
"phone_number": "+18445550001",
"status": "delivered",
"carrier": "TELNYX LLC",
"line_type": "VoIP"
}
],
"cc": [],
"text": "Hello, World!",
"subject": "From Telnyx!",
"media": [],
"webhook_url": "https://www.example.com/hooks",
"webhook_failover_url": "https://backup.example.com/hooks",
"encoding": "GSM-7",
"parts": 1,
"tags": ["Greetings"],
"cost": { "amount": 0.0051, "currency": "USD" },
"cost_breakdown": {
"carrier_fee": { "amount": 0.00305, "currency": "USD" },
"rate": { "amount": 0.00205, "currency": "USD" }
},
"tcr_campaign_id": "TCPA3X7",
"tcr_campaign_billable": true,
"tcr_campaign_registered": "REGISTERED",
"received_at": "2019-01-23T18:10:02.574Z",
"sent_at": null,
"completed_at": null,
"valid_until": null,
"errors": []
}{
"record_type": "event",
"id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
"event_type": "message.received",
"occurred_at": "date-time",
"payload": {
"record_type": "message",
"direction": "inbound",
"id": "7ee4241c-f127-47e5-9c34-3aac291f8058",
"type": "SMS",
"messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3",
"organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950",
"from": {
"phone_number": "+18665550001",
"carrier": "T-MOBILE USA, INC.",
"line_type": "Wireless"
},
"to": [
{
"phone_number": "+18445550001",
"status": "delivered",
"carrier": "TELNYX LLC",
"line_type": "VoIP"
}
],
"cc": [],
"text": "Hello, World!",
"subject": "From Telnyx!",
"media": [],
"webhook_url": "https://www.example.com/hooks",
"webhook_failover_url": "https://backup.example.com/hooks",
"encoding": "GSM-7",
"parts": 1,
"tags": ["Greetings"],
"cost": { "amount": 0.0051, "currency": "USD" },
"cost_breakdown": {
"carrier_fee": { "amount": 0.00305, "currency": "USD" },
"rate": { "amount": 0.00205, "currency": "USD" }
},
"tcr_campaign_id": "TCPA3X7",
"tcr_campaign_billable": true,
"tcr_campaign_registered": "REGISTERED",
"received_at": "2019-01-23T18:10:02.574Z",
"sent_at": null,
"completed_at": null,
"valid_until": null,
"errors": []
}
}The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL.
Was this page helpful?