---
title: "An SMS could not be delivered"
method: POST
path: "message.failed"
tags: ["Webhooks"]
---

# An SMS could not be delivered

`POST message.failed` (webhook)

We POST this event to every active endpoint subscribed to it (webhook.test only to the endpoint you test). Respond with any 2xx within ten seconds; anything else is retried with backoff for up to 24 hours, in eight attempts. The event id stays the same on retries, so you can skip duplicates.

## Headers

- `Hypamoon-Signature` string, required

## Payload

- MessageFailedEvent: Sent when a message could not be delivered. data.message.error says why.
  - `id` string, required: The id of the event, evt_ plus 32 hex characters. It stays the same on retries.
  - `type` 'message.failed', required
  - `created_at` string, date-time, required: When the event happened.
  - `data` object, required
    - `message` Message, required: An SMS message. The same shape in POST /messages, GET /messages, GET /messages/{id} and the message webhooks.
      - `id` string, uuid, required: The id of the message.
      - `to` string, required: The recipient, in E.164.
      - `from` string, required: The sender the recipient sees: an alphanumeric name of up to 11 characters.
      - `body` string, required: The text as it was sent, after typographic quotes and dashes were made SMS-safe.
      - `segments` integer, required: How many SMS segments the text took. A segment is 160 GSM-7 or 70 UCS-2 characters (153 and 67 when split).
      - `encoding` 'gsm7' | 'ucs2' | 'null', nullable, required: gsm7, or ucs2 when the text has a character outside GSM-7 (an emoji, for example), which makes every segment shorter.
      - `status` 'queued' | 'sent' | 'delivered' | 'failed', required: queued: accepted. sent: handed to the mobile network. delivered: the phone confirmed it. failed: it did not arrive; see error.
      - `error` string, nullable, required: With status failed: a short code, like delivery_failed or sending_failed. Otherwise null.
      - `reference` string, nullable, required: Your own id for this message, as you sent it (an order number, for example).
      - `created_at` string, date-time, required: When we accepted the message.
      - `status_updated_at` string, date-time, nullable, required: When the status last changed.
      - `test` boolean, required: true for a message sent with a test key to a test number. It never reaches a phone.

## Acknowledgement `2XX`

Received. Any 2xx counts.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
