Docs

Delivery report

When a message changes state, Telrioz POSTs a JSON event to the webhook URL you set in Developers โ†’ Webhook. The URL must be https. There is one event type, message.status, with two shapes of data: one for messages sent through the REST API, one for messages sent over SMPP.

When an event comes

Sent throughEventsdata.status
REST APIA message sent through the REST API, including OTPs, their Fallback sends and Bulk sends from the dashboard: one event when every part is final.Only final states: delivered, rejected, undelivered, expired, deleted, unknown, not_sent, upstream_rejected
SMPPA message sent over an SMPP bind: one event per part and per state, from sent on.sent, delivered, rejected, undelivered, expired, deleted, unknown, not_sent, upstream_rejected

accepted and retrying never come as events. A REST message gets one event, when all its parts are final; its status is the first part that was not delivered, else delivered. An SMPP part usually gets two: sent, then its final state. data.channel says which API the message came in through (api or smpp); it is not the delivery Channel.

For the part-by-part detail of a REST message, call GET /messages/{id} with data.id.

Headers

HeaderValue
content-typeapplication/json
x-telrioz-event-idThe event_id of the body: the same on every retry of one event.
x-telrioz-timestampWhen this try was signed, in Unix seconds.
x-telrioz-signaturev1= then the lowercase hex HMAC-SHA256, keyed with your webhook secret, of the timestamp, a dot and the raw body.
Your ownUp to 10 headers you set in Developers โ†’ Webhook, such as a token for your server. They cannot use the names above.

Check x-telrioz-signature before you trust the body: Verify the signature. Answer any 2xx within 5 seconds, or the event comes again: Retries.

REST shape

FieldTypeMeaning
event_idstringThe event's ID, the same on every retry: keep it to skip repeats.
type"message.status"Always message.status.
data.idstring (uuid)The message ID that POST /messages or POST /otp answered.
data.channel"api"Always api for this shape.
data.statusstringThe message's final Delivery state: the first part that was not delivered, else delivered.
data.tostringThe number.
data.segmentsintegerHow many parts the message has.

SMPP shape

FieldTypeMeaning
event_idstringThe event's ID, the same on every retry: keep it to skip repeats.
type"message.status"Always message.status.
data.idstringThe part's message_id, as submit_sm_resp gave it.
data.channel"smpp"Always smpp for this shape.
data.statusstringThe part's Delivery state.
data.fromstring or nullThe source_addr you sent.
data.tostringThe number.
data.partinteger or nullThe part number, from 1; null for a one-part message.
data.partsinteger or nullHow many parts the message has; null for a one-part message.
data.multipart_idstring or nullFor a long message, the same on every part (the message_id of its first part seen); null for a one-part message.
data.errorstring or nullThe error code from the receipt, or the upstream's answer when it refused the part; null when there is none.
data.done_atstring or null (date-time)When the receipt came, or else when the upstream answered (ISO 8601).

A long SMPP message gives one event per part. Group them by multipart_id, and use part and parts to know when you have them all. The example on the right is a two-part message whose parts were both delivered. The meaning of an error code, such as ESME_RINVDSTADR, is in the message errors. An upstream carrier may send a code that is not listed there.