Results and delivery

Works on
  • iMessage
  • WhatsApp

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 wantRead
Whether a command went outThe command event with the commandId from its 202
Whether a message was delivered or readA receipt event, on a stream opened with ?events=receipts
Whether a message was not deliveredA delivery_failed event, on a stream opened with ?events=delivery_failures
One message's receipts, nowGET /v1/messages/{messageId}/receipts

Match a result to its command

Keep the commandId from each 202. Its result names it:

Stream output
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"}
  1. When the 202 comes back, store its commandId with what you were doing.
  2. When a command event arrives, find the stored entry by commandId and record the status.
  3. A result can arrive before you read the 202, so keep results you cannot match yet for a few minutes.
  4. 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

statusDid it happen?What to do
succeededYesNothing. It went out, which is not the same as delivered
failedNoRead failureClass, fix what it names, then send again with a new Idempotency-Key
expiredNoThe command passed its deadline before the line took it. Send again with a new Idempotency-Key
cancelledNoSomething stopped it on purpose. Do not send it again automatically
ambiguous, no_effectUnknownCheck 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.

failureClassMeansWhat to do
targetThe person or conversation cannot take itCheck the address or conversation
contentThe text or file was refusedFix the content, then send again
capabilityThis line cannot send thisSend something the line supports
lineThe line cannot send right nowCheck the line in the console, then send again
rate_limitedToo much, too fastWait, then send again
not_runIt never ranSend again
transportThe channel failed on its sideSend again later
unknownSomething elseRead 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

errorCodeMeaning
invalid_targetThe line could not find the person or conversation.
stale_targetThe 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_conflictThe payload does not match the first command sent with this key.
unsupported_capabilityThe line cannot carry out this command.
capability_not_negotiatedThe line does not support this yet. See Channel support.
capability_constraint_violationThe line cannot send this as written: a value is out of range, or the line does not support the feature.
command_claim_invalidThe 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

errorCodeMeaning
gateway_rejectediMessage refused it.
send_returned_not_okThe send failed on the line.
preparation_dispatch_exhaustedThe line could not start the command in time.
stale_fenceThe line restarted before it ran this command.
expiredThe command passed its deadline before the line took it.
command_expired_before_executionThe command timed out before it started; nothing changed. It usually comes with an expired status.
transfer_not_landedA picture the command needed did not reach the line within five minutes; nothing changed.
outbound_pausedSending was paused before the command ran.
invalid_session_capabilitiesA 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.

errorCodeMeaning
outbound_echo_unconfirmediMessage accepted the send, but nothing confirmed it went out.
connector_crash_after_effect_startThe line stopped while sending.
gateway_timeoutNo answer within the deadline.
gateway_response_lostThe answer was lost on the way back.
tapback_unverified · poll_vote_unverifiedThe reaction or vote could not be verified afterwards.
group_content_unverified · group_update_unverified · group_leave_unverifiedThe group operation could not be verified.
chat_background_unverifiedA background change started and could not be checked afterwards. Ask someone in the conversation.
moderation_unverifiedAn edit or an unsend could not be checked afterwards.
name_photo_set_unverifiedA name or photo change may have started, and could not be checked afterwards. Do not send it again without checking.
journal_corruptThe line lost track of the command, so the result is unknown.

Cancelled by Mapier

errorCodeMeaning
operator_cancelledSomeone 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:

Stream output
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:

ChannelReceipts
iMessageMapier 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
WhatsAppAs 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".

  1. Do not treat it as a failed command. The command still has its own result, which can arrive after this event.
  2. Match it to your send by commandId.
  3. Nothing sends the message again for you. To try again, send a new message with a new Idempotency-Key.
Channelmessage.delivery_failed
iMessageArrives
WhatsAppArrives

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.

Next