Results and delivery
- iMessage
Learn whether each command went out, and whether the message reached the person
A 202 says a command was queued, nothing more. Its result arrives once, as a
command event on the stream and a command.settled event at your webhook.
Whether the message then reached the person's phone is a separate fact, a
receipt, that arrives later if the channel reports it.
| You want | Read |
|---|---|
| Whether a command went out | The command event with the commandId from its 202 |
| Whether a message was delivered or read | A receipt event, on a stream opened with ?events=receipts |
| Whether a message was not delivered | A delivery_failed event, on a stream opened with ?events=delivery_failures |
| One message's receipts, now | GET /v1/messages/{messageId}/receipts |
Match a result to its command
Keep the commandId from each 202. Its result names it:
id: 0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a37
event: command
data: {"commandId":"3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71","status":"succeeded","errorCode":null,"failureClass":null,"type":"message.send","messageId":"0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a99","conversationId":"a0000000-0000-4000-8000-000000000001","lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}- When the
202comes back, store itscommandIdwith what you were doing. - When a
commandevent arrives, find the stored entry bycommandIdand record thestatus. - A result can arrive before you read the
202, so keep results you cannot match yet for a few minutes. - If no result arrives within a few minutes, reconnect with
Last-Event-ID. Treat a command still without a result as unknown, not failed.
What each result means
status | Did it happen? | What to do |
|---|---|---|
succeeded | Yes | Nothing. It went out, which is not the same as delivered |
failed | No | Read failureClass, fix what it names, then send again with a new Idempotency-Key |
expired | No | The command passed its deadline before the line took it. Send again with a new Idempotency-Key |
cancelled | No | Something stopped it on purpose. Do not send it again automatically |
ambiguous, no_effect | Unknown | Check the conversation before you send again, or the person may get it twice |
no_effect means the channel took the command and could not show that anything
changed. Treat it like ambiguous.
Sent is not delivered
succeeded means the channel took the message. Whether it reached the phone is a
receipt, and a missing receipt proves nothing.
Why a command failed
failureClass says what kind of failure it was, from a fixed list, so you can
decide without learning each channel's words. errorCode is the channel's own
word, for your logs and for support.
failureClass | Means | What to do |
|---|---|---|
target | The person or conversation cannot take it | Check the address or conversation |
content | The text or file was refused | Fix the content, then send again |
capability | This line cannot send this | Send something the line supports |
line | The line cannot send right now | Check the line in the console, then send again |
rate_limited | Too much, too fast | Wait, then send again |
not_run | It never ran | Send again |
transport | The channel failed on its side | Send again later |
unknown | Something else | Read errorCode |
Retries says which key to use when you send again.
iMessage's error codes
On an iMessage line, errorCode is one of these, grouped by what to do. Log it
and quote it to support; branch your code on failureClass.
Fix the request, then send again
errorCode | Meaning |
|---|---|
invalid_target | The line could not find the person or conversation. |
stale_target | The message you named is too old for this conversation, or the group just changed. Wait for its next message, then send again with a new Idempotency-Key. |
payload_conflict | The payload does not match the first command sent with this key. |
unsupported_capability | The line cannot carry out this command. |
capability_not_negotiated | The line does not support this yet. See Channel support. |
capability_constraint_violation | The line cannot send this as written: a value is out of range, or the line does not support the feature. |
command_claim_invalid | The change does not fit the group as the line last saw it, such as adding someone already in it or removing someone who is not. |
Send again: nothing changed
errorCode | Meaning |
|---|---|
gateway_rejected | iMessage refused it. |
send_returned_not_ok | The send failed on the line. |
preparation_dispatch_exhausted | The line could not start the command in time. |
stale_fence | The line restarted before it ran this command. |
expired | The command passed its deadline before the line took it. |
command_expired_before_execution | The command timed out before it started; nothing changed. It usually comes with an expired status. |
transfer_not_landed | A picture the command needed did not reach the line within five minutes; nothing changed. |
outbound_paused | Sending was paused before the command ran. |
invalid_session_capabilities | A fault on the line's side, not in your request. |
Check first: it may have happened
These come with an ambiguous result more often than a failed one. Do not
send again without checking the conversation: the message may have been
delivered.
errorCode | Meaning |
|---|---|
outbound_echo_unconfirmed | iMessage accepted the send, but nothing confirmed it went out. |
connector_crash_after_effect_start | The line stopped while sending. |
gateway_timeout | No answer within the deadline. |
gateway_response_lost | The answer was lost on the way back. |
tapback_unverified · poll_vote_unverified | The reaction or vote could not be verified afterwards. |
group_content_unverified · group_update_unverified · group_leave_unverified | The group operation could not be verified. |
chat_background_unverified | A background change started and could not be checked afterwards. Ask someone in the conversation. |
moderation_unverified | An edit or an unsend could not be checked afterwards. |
name_photo_set_unverified | A name or photo change may have started, and could not be checked afterwards. Do not send it again without checking. |
journal_corrupt | The line lost track of the command, so the result is unknown. |
Cancelled by Mapier
errorCode | Meaning |
|---|---|
operator_cancelled | Someone at Mapier cancelled the command. Ask support if you did not expect it. |
This list is not closed. Treat an errorCode you do not know as a generic failure: new codes can
appear without a version change.
Delivered and read
Open the stream with ?events=receipts, or select message.delivered and
message.read on a webhook endpoint:
id: 0192a7c4-7d55-7a90-b3e1-4c6a8f2d9e04
event: receipt
data: {"commandId":"3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71","messageId":"0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a99","status":"delivered","occurredAt":"2026-08-24T18:03:14.000Z","lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}status is delivered or read, and never goes backwards. What each channel
reports differs:
| Channel | Receipts |
|---|---|
| iMessage | Mapier asks Apple about a message from about 75 seconds to about 10 minutes after it is sent. A delivery or read later than that is not reported, and a read comes only from a person who shares read receipts |
| As Meta reports them |
Not delivered
Open the stream with ?events=delivery_failures, or select
message.delivery_failed on a webhook endpoint. It means the channel took the
message and later said it did not reach the person, such as Apple's "Not
Delivered".
- Do not treat it as a failed command. The command still has its own result, which can arrive after this event.
- Match it to your send by
commandId. - Nothing sends the message again for you. To try again, send a new message
with a new
Idempotency-Key.
| Channel | message.delivery_failed |
|---|---|
| iMessage | Arrives |
| Arrives |
Ask about one message now
GET /v1/messages/{messageId}/receipts asks the
channel what it knows about one message right now. Its delivered and read
can be null, which means the channel does not know, not false.