WhatsApp APIAPI

WhatsApp: mark messages as read

Mark a message received on WhatsApp as read, so the contact sees the two blue ticks, and show the typing indicator through the XBASE API.

Updated on

Marking as read makes the contact see the two blue ticks on their message. With typing, they also see the typing… indicator while the reply has not arrived.

Mark as read

POST https://api.xbase.app/api/external/v1/whatsapp/messages/{messageId}/read

messageId is the id of the message received from the contact (wamid.…), as it arrives in the whatsapp.message.received event of the workspace webhooks. The read receipt goes out through the number that received the message, and Meta also marks the earlier messages of the conversation as read.

FieldTypeRequiredRule
typingbooleannotrue shows typing… to the contact until the number's next message, for 25 seconds at most
curl -X POST https://api.xbase.app/api/external/v1/whatsapp/messages/wamid.HBgNNTUyMTk5OTk5MDAwMBUCABIYFDNBMjc1QjE3RjdCNEE1QzlEMjA4AA==/read \
  -H "Authorization: Bearer $XBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "typing": true }'

Response 200:

{ "success": true }

The body is optional: without it, the message is only marked as read.

When to use it

  • When your system or agent reads the message, before replying.
  • With typing: true, when the reply takes a few seconds, like an AI agent's.
  • Reading does not change the 24-hour window: only the contact's message opens the window.

Errors

StatuscodeWhen
400(no code)Invalid body or messageId in the wrong format
400NOT_INCOMING_MESSAGEThe message was sent by the business: only a received message can be marked as read
404MESSAGE_NOT_FOUNDThe message is not from a WhatsApp conversation in this workspace
422NUMBER_DISCONNECTEDThe number that received the message is disconnected
422SEND_REJECTEDXBASE refused, for example, because the conversation number was disconnected
422META_ERRORMeta refused

See the full format in Errors.

Frequently asked questions

See also

On this page