Guides
Message status
A message is always in exactly one of five states. This page explains each, the fields that come with them, and how to follow a message without wasting requests.
GET
/v1/messages/{id}needs the read permissionThe five states#
| Status | Final | Meaning |
|---|---|---|
| queued | no | Accepted and waiting for the delivery worker. |
| no | The last attempt to hand it over failed for a temporary reason; another attempt is scheduled. | |
| sent | yes | The mail system accepted the message for delivery. |
| failed | yes | Refused for a reason that retrying cannot fix. error says why. |
| dead | yes | Every scheduled retry failed. The hotel can send it again from its dashboard. |
A message moves forward only: queued, then possibly retrying (more than once), then one of sent, failed or dead. If the hotel re-sends a dead or failed message from its dashboard, it starts again at queued.
The fields#
{
"id": "msg_01k6qzexample0000000000000",
"status": "sent",
"from": "booking@madagascarhotelags.com",
"to": ["guest@example.com"],
"cc_count": 0,
"bcc_count": 1,
"subject": "Your stay is confirmed",
"scheduled_at": null,
"created_at": "2026-10-01T15:04:05.000Z",
"sent_at": "2026-10-01T15:04:06.412Z",
"attempt": 1,
"error": null,
"delivery": null,
"delivery_at": null,
"suppressed": 0
}| Field | Meaning |
|---|---|
to | The To addresses as accepted. Cc and Bcc addresses are not repeated; only their counts are. |
sent_at | When the mail system accepted it. null until then. |
attempt | How many hand-offs were tried. |
error | Why it failed, for failed and dead only, up to 200 characters. Not a stable code: show it to a person, do not parse it. |
delivery | The verdict after sending: delivered, deferred, bounced, blocked, complained or unsubscribed. null until one arrives, which is not a failure. GET /v1/messages/{id}/events lists every step. |
suppressed | How many recipients were skipped because they are on the suppression list. |
You can only read messages sent with the same token. Any other id answers 404 not_found, exactly as if it did not exist.
Polling#
- Check no more often than once every 10 seconds per message.
- Stop at a final state.
- Most messages are
sentwithin a few seconds, so one check after 10 to 30 seconds is usually enough. - If you get
429, wait the seconds inRetry-Afterbefore any further request.
To react to bounces and complaints without polling, ask the hotel for a webhook. To react to failures, check messages in a periodic job (GET /v1/messages?status=failed) and alert on failed and dead. The recipes include one.
Last reviewed 2026-10-01.