Messages and dispatches
How a request becomes per-recipient deliveries, and how their statuses evolve.
A message is what you send: one channel, one content, one or more recipients. For every unique recipient the API creates a dispatch, the delivery of that message to that recipient. Dispatches are delivered independently, so a message to 500 recipients can end with 498 delivered and 2 failed.
Message (channel: email, 3 recipients)
├── Dispatch → jane@example.com
├── Dispatch → john@example.com
└── Dispatch → ops@example.comDispatch statuses
| Status | Meaning |
|---|---|
Pending | Created and waiting to be picked up (or waiting for its scheduledAt time). Can still be cancelled. |
Inqueue | Picked up and queued for delivery. It can no longer be cancelled. |
Retrying | The provider call failed with a temporary error; it will be retried. retryCount increases. |
Sent | The provider accepted the message. Counted as a success. |
Delivered | The provider confirmed delivery to the recipient. Final. |
Failed | Delivery failed permanently (lastError explains why). Final. |
Cancelled | Cancelled before it was picked up. Final. |
Processing | Reserved; not used by the current delivery pipeline. |
Pending ──► Inqueue ──► Sent ──► Delivered
│ │ └────► Failed
│ ├──► Retrying ──► Sent / Delivered / Failed
│ └──► Delivered / Failed
└──► CancelledDelivery results can arrive out of order or more than once; the platform ignores duplicates and never moves a dispatch
back from a final status (a Sent dispatch never returns to Retrying).
Message status
The message status is derived from its dispatches:
| Message status | When |
|---|---|
Pending | Every dispatch is still Pending. |
Processing | Not every dispatch is Pending any more, but not all of them are finished yet. |
Completed | All dispatches finished and none failed (Sent, Delivered or Cancelled, with at least one success). |
PartiallyCompleted | All dispatches finished, some succeeded and some failed. |
Failed | All dispatches finished and none succeeded, at least one failed. |
Cancelled | All dispatches were cancelled. |
A dispatch is finished when it is Sent, Delivered, Failed or Cancelled. Sent counts as a success even if a
delivery confirmation never arrives, because not every provider reports delivery.
What you get back
- Send a message and get a message
return the message with a
dispatchesobject that counts dispatches per status, for example{ "Delivered": 2, "Failed": 1 }. Statuses with no dispatch are left out. - List dispatches returns one row per recipient with
recipientAddress,status,retryCount,sentAt,deliveredAt,failedAt,lastErrorandproviderMessageId.
Priority
priority is Critical, Normal (default) or Bulk. Each priority is delivered through its own queue, so critical
messages (password resets, alerts) are not delayed behind large bulk campaigns. Use Bulk for newsletters and other
non-urgent mass sending.
Retention of the request
The message keeps the request as sent: content, subject, variables, data, idempotencyKey, the API key that
sent it (apiKeyId) and its attachments. Per-recipient rendered content is used for delivery but is not returned by the
API.