> ## 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.

# Mark message as read

> Marks a specific message as read (sends the read ACK to the sender)

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** yes

## Description

Sends the read ACK for a **specific** message, the visible effect for the sender is the "blue check". To mark the entire chat at once, use [`markChatRead`](/en/api/chat/mark-chat-read).

<Warning>
  In **groups**, the `sender` field (JID of the message author) is **required**. In 1-to-1 conversations it is optional and may be omitted.
</Warning>

## Examples

### DM

In a 1-to-1 conversation, just `messageId` and the contact's `number` are needed. `sender` can be skipped, the server infers the author from the chat JID.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/chat/markRead/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "messageId": "3EB08FCF27E532F1B0F5",
      "number":    "5511999999999"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/chat/markRead/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      messageId: "3EB08FCF27E532F1B0F5",
      number:    "5511999999999"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/chat/markRead/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "messageId": "3EB08FCF27E532F1B0F5",
          "number":    "5511999999999"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "messageId": "3EB08FCF27E532F1B0F5",
          "number":    "5511999999999"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/chat/markRead/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Group (with sender)

In a group (`@g.us`), the `sender` field with the message author's JID is required, without it WhatsApp cannot route the read ACK correctly.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/chat/markRead/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "messageId": "3EB08FCF27E532F1B0F5",
      "number":    "120363123456789@g.us",
      "sender":    "5511999999999@s.whatsapp.net"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/chat/markRead/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      messageId: "3EB08FCF27E532F1B0F5",
      number:    "120363123456789@g.us",
      sender:    "5511999999999@s.whatsapp.net"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/chat/markRead/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "messageId": "3EB08FCF27E532F1B0F5",
          "number":    "120363123456789@g.us",
          "sender":    "5511999999999@s.whatsapp.net"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "messageId": "3EB08FCF27E532F1B0F5",
          "number":    "120363123456789@g.us",
          "sender":    "5511999999999@s.whatsapp.net"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/chat/markRead/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

The response echoes the `message_id` that was marked and the resolved `chat_jid`. Useful to audit which messages were marked as read, especially in automated flows that confirm receipt after processing the message.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Message marked as read successfully",
  "message_id": "3EB08FCF27E532F1B0F5",
  "chat_jid": "5511999999999@s.whatsapp.net"
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name.
</ParamField>

## Headers

| Name           | Required                 | Example            | Description                    |
| -------------- | ------------------------ | ------------------ | ------------------------------ |
| `Content-Type` | yes                      | `application/json` | ,                              |
| `token`        | yes (or `Authorization`) | `a1b2c3d4-...`     | TokenAccount or TokenInstance. |

## Request body

<ParamField body="messageId" type="string" required>
  ID of the message to mark as read.
</ParamField>

<ParamField body="number" type="string" required>
  Chat JID: phone number, private JID (`...@s.whatsapp.net` or `...@lid`), group (`...@g.us`), or newsletter.
</ParamField>

<ParamField body="sender" type="string">
  JID of the message author (`...@s.whatsapp.net` or `...@lid`). **Required in groups.** Optional in DMs.
</ParamField>

## Error responses

| HTTP | `error.message`                         | When it happens              |
| ---- | --------------------------------------- | ---------------------------- |
| 400  | `Instance name is required`             | ,                            |
| 400  | `Invalid request body: <...>`           | Malformed JSON.              |
| 400  | `messageId is required`                 | ,                            |
| 400  | `Number is required`                    | ,                            |
| 400  | `sender is required for group messages` | Missing `sender` in a group. |
| 401  | `Invalid token`                         | ,                            |
| 404  | `Instance not found`                    | ,                            |
| 503  | `Instance is not connected to WhatsApp` | ,                            |

```json Error 400 theme={null}
{
  "success": false,
  "error": { "message": "sender is required for group messages" }
}
```

## Related

<CardGroup cols={2}>
  <Card title="Mark chat as read" href="/en/api/chat/mark-chat-read">
    Mark the entire chat at once.
  </Card>

  <Card title="Delivery status" href="/en/api/chat/contact-status">
    Check the current status of the message.
  </Card>
</CardGroup>
