Skip to main content
POST
/
api
/
chat
/
markChatRead
/
:instance
Mark chat as read
curl --request POST \
  --url https://api.example.com/api/chat/markChatRead/:instance \
  --header 'Content-Type: application/json' \
  --data '
{
  "number": "<string>",
  "read": true
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes

Description

Marks all unread messages of a chat as read (read: true) or undoes the marking (read: false). It is equivalent to opening the chat on the phone: the new-messages badge resets.
To mark a single message (without resetting the badge), use markRead.

Examples

Mark as read

With read: true, marks all unread messages of the chat as read and resets the badge, equivalent to opening the conversation on the phone.
curl -X POST "https://ryzeapi.cloud/api/chat/markChatRead/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "read":   true
  }'

Mark as unread

With read: false, restores the “unread” state on the chat so it appears highlighted in the list again, useful to revisit a conversation later.
curl -X POST "https://ryzeapi.cloud/api/chat/markChatRead/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "read":   false
  }'

Success response

The response confirms the operation with chat_jid (JID resolved from number) and read reflecting the final state. The message changes depending on the value of read: "Chat marked as read successfully" or "Chat marked as unread successfully".
200 OK
{
  "success": true,
  "message": "Chat marked as read successfully",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "read": true
}

Path parameters

instance
string
required
Instance name.

Headers

NameRequiredExampleDescription
Content-Typeyesapplication/json
tokenyes (or Authorization)a1b2c3d4-...TokenAccount or TokenInstance.

Request body

number
string
required
Phone number, private JID (...@s.whatsapp.net or ...@lid), group JID (...@g.us), or newsletter.
read
boolean
required
true marks as read, false marks as unread.

Error responses

HTTPerror.messageWhen it happens
400Instance name is required
400Invalid request body: <...>Malformed JSON.
400Number is required
401Invalid token
404Instance not found
503Instance is not connected to WhatsApp
Error 400
{
  "success": false,
  "error": { "message": "Number is required" }
}

Mark message as read

Mark a single message.

Archive chat

After resetting the badge, archive.