Mark as read
- iMessage
Show the person that their messages were read
Marks a one-to-one conversation read on the line: the whole conversation, in
one the person has written in. On WhatsApp, the person sees blue ticks on their messages, unless they turned read receipts off. On iMessage, the person sees "Read" under their message
only when the line has read receipts turned on. With them off, the
command still ends succeeded and the person sees nothing.
Honors Idempotency-Key: a retry under the same key returns the first command
and nothing is sent twice.
On an iMessage line Mapier ends the command itself from the channel's answer,
and never retries it. So the 202 is followed by a command event,
type: "message.read", messageId: null.
Body
Target
Prop
Type
On an iMessage line the conversation at target.conversationId must be a
one-to-one conversation the person has written in, as for typing.start. Each
of these is 422 validation_failed at target.conversationId before anything
is sent:
- a group chat;
- a conversation the person has never written in;
- a conversation the line has not yet confirmed is with one person, with
reason: conversation_not_confirmed— send the person a text first; - a person's address instead of a conversation: a read is done in a conversation.
Payload
Prop
Type
payload may be {} or absent. payload.externalId is a
422 validation_failed at payload.externalId when it is not an id or names a
message of another conversation.
What happens
The 202 says the command was accepted. On an iMessage line, the command
event then says:
succeededonce the channel took it. That does not promise the person saw it.failed, with the code of what the channel answered instead:not_found,rate_limitedorupstream_unavailable(the line is offline). It is never retried.
Every conversation.mark_read is sent, so a message that arrived since the last
read is marked read too.
The budget it shares with typing.start
On an iMessage line, typing.start and conversation.mark_read share the
channel's budget of 12 signals per conversation in 60 seconds, counted from the
first. Past it, either is accepted and ends failed with rate_limited without
being sent. A typing.start held back inside its own five-second window uses
none of the budget. Marking a conversation read and then showing the typing
bubble uses two.
This command is the line reading the person's messages. The person reading the line's messages is
a different thing: it arrives as a receipt event on a stream opened with ?events=receipts, and
as the message.read webhook. See Results and
delivery.
On a WhatsApp line
Address the person's one-to-one conversation at target.conversationId. A
group is 422 validation_failed at target.conversationId. There is no
confirmation step and no shared budget.
The line marks the conversation read up to the message payload.externalId
names, by the externalId its message event carried, or up to the person's
newest message when it names none. WhatsApp marks the messages before it read
too.
Marking read is refused outside 24 hours of the person's last message, with
403 recipient_not_allowed and
reason: outside_service_window, before anything is sent.
Example request
curl https://api.mapier.ai/v1/commands/conversation.mark_read \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: read-0192a7c4" \
-H "x-mapier-version: 2026-12-01" \
-d '{
"target": {
"kind": "conversation",
"conversationId": "a0000000-0000-4000-8000-000000000001"
}
}'A common pattern: when a message event arrives, mark the conversation read,
then show the typing bubble while the answer is written.
Response
{
"commandId": "0192b3e2-5e80-7164-c295-70bd3e6fa154",
"status": "queued",
"repeated": false,
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"lineSelection": "reused_active_chat"
}Then, on the response stream:
{
"commandId": "0192b3e2-5e80-7164-c295-70bd3e6fa154",
"logicalActionId": "read-0192a7c4",
"status": "succeeded",
"errorCode": null,
"conversationId": "a0000000-0000-4000-8000-000000000001",
"type": "message.read",
"messageId": null,
"failureClass": null
}message.read is deprecated. Use conversation.mark_read. Results and events still carry
type: "message.read".
Errors
Every command can return the errors listed under How commands work › Errors. Specific to this command:
422 validation_failedattarget.conversationIdfor a group chat, a conversation the person has never written in, or one the line has not confirmed (withreason: conversation_not_confirmed), and for a person's address.422 validation_failedatpayload.externalIdwhen it is not an id or names a message of another conversation.404 unsupported_commandwithreason: not_on_channelon a line whose channel does not carry it.
Result codes you will see for this command: not_found, rate_limited,
upstream_unavailable. See Error codes.