Skip to main content
POST
Mark message as read

Overview

Method for marking as read a message the channel received from the contact. It works on Official WhatsApp channels (Meta official API) and on WhatsApp Web channels, with WhatsApp Web enabled in the workspace.

Attributes

The body goes as JSON or as a form (application/x-www-form-urlencoded or multipart/form-data). The success response is 200:

Differences from Z-API

  • The messageId is the message id in Omni Z-API, the same one that comes in the webhook. In the default webhook format, it is message._id. It is not the message id in WhatsApp.
  • On Official WhatsApp, Meta’s API (Cloud API) also marks as read the earlier messages of the conversation.
  • A message sent by the channel itself answers 200, with no effect.
On Official WhatsApp, send-text with delayTyping also marks as read the last message received from the contact, because Meta only shows “typing” together with the read. If you use that option, the message shows as read without a call to this route.

Errors

The refusal by channel type ends with available only on Z-API (WhatsApp Web) instances. That ending is the same for every refused route. This route also works on Official WhatsApp. The API does not repeat the call after a 502. You can call again.

Authorizations

Authorization
string
header
required

Secret Key generated in the Omni Z-API Security panel

Body

application/json
phone
string
required

Contact phone number (country code + area code + number). Required, as in Z-API, but not used

Example:

"5511999999999"

messageId
string
required

The messageId of the received message, as it came in the webhook. It is the message id in Omni Z-API, not the WhatsApp id

Example:

"019E6F1A93FE78DCB54332F9FF0CCAE7"

Response

Message marked as read. A message sent by the channel itself also answers 200, with no effect.

value
boolean

true when the read was accepted