The email part of this event is live. The SMS and RCS parts apply once those channels send (both are in closed beta).
Fires in two situations:
  • Not delivered — the network reported a sent SMS or RCS message as undelivered, or an RCS message’s ttl ran out undelivered and the network took it back. The message’s status becomes BOUNCED.
  • Never left — an RCS or email message was stopped before it was handed over (a check failed when its turn came, the campaign was stopped, the workspace was archived, or the network refused it — for example because the phone can’t receive RCS and no SMS fallback applies). The message’s status becomes FAILED and nothing is charged.
An email that left and then bounced raises email.bounced, not this event. An RCS message that is not delivered and has a text fallback is sent as SMS instead; this event then follows only if that SMS is not delivered either. Final. Treat message.failed as the message’s final state. A delivery report that arrives after it (rare: the network confirmed the message late) is not announced again, and the message stays BOUNCED and uncharged. For RCS on agents with revoke in features, a message is only reported undelivered once the network confirmed it took it back — so a late arrival can’t happen there.

Payload

string
Outbound message identifier.
string
SMS and RCS only. The sender of the message in ag_… form: the RCS agent, or — for an SMS — the SMS sender’s ID with an ag_draft_ prefix. Empty when the sender no longer exists.
string
Email only: email. (SMS and RCS events carry agent_id instead.)
string
Email only: the email channel in ch_… form.
string
SMS / RCS: the recipient’s phone number in E.164 format. Email: the recipient’s address. Empty when the contact was deleted in the meantime.
string
Always failed for this event.
string
ISO 8601 time of the failure: the time of the network’s report, or the time the message was stopped.
string
Machine-readable reason code. See the table below.
boolean
false — nothing is charged for this message: it never left, or it was an RCS message that was not delivered. true — the message was sent and its charge stands: an SMS that was not delivered is still charged, and so is an RCS message the contact had already replied to.

failure_reason values

Not delivered: An email message looks like this:
Never left (RCS and email messages, always charged: false): A queued message that is given up because it could not be handed to the network in time ends FAILED with error_code: DELIVERY_EXPIRED and raises no event today — poll GET /v1/messages/{id} (or list status=FAILED) if you need to see it. The list of failure_reason values can grow: treat a value you don’t know as “not delivered”.