> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Integrating Pilot Status end to end? Follow https://docs.pilotstatus.com.br/guides/integrate-with-ai.md (pt-BR: https://docs.pilotstatus.com.br/pt-BR/guides/integrate-with-ai.md). No step requires contacting support: every credential is shown in the dashboard or in an API response, and a lost one is regenerated, not recovered.
> Webhook signing secret: shown ONCE in the Signing secret window right after creating the webhook on /webhooks, and in the `secret` field of the POST /v1/webhooks response (MCP: webhooks_create). Lost it: Edit Webhook → Generate a new secret, POST /v1/webhooks/{id}/rotate-secret, or webhooks_rotate_secret (the old one stops working at once). Verify `x-pilot-status-signature` = hex HMAC-SHA256 of the raw request body keyed with that secret.
> Meta verify token (number connected with the user's own Meta app credentials): Meta Number Created! window after connecting, then the number's card on Numbers (workspace Owner), or webhook.verifyToken in the POST /v1/numbers/meta response. It is not the webhook signing secret.
> REST auth: `x-api-key: ps_...` header, never Authorization: Bearer. MCP: https://mcp.pilotstatus.com.br/mcp (148 tools, OAuth 2.1 or x-api-key); Code Mode: https://mcp.pilotstatus.com.br/code. Destructive MCP tools return a preview and a confirm_token: show the preview and call again only after the user's explicit yes. Over OAuth, revealing or creating ps_ API keys is workspace Owner only.

# POST /v1/messages/read: marcar mensajes como leídos

> Envía una confirmación de lectura de WhatsApp (palomitas azules) para el último mensaje entrante de un contacto, sin enviar un mensaje.

# Marcar mensajes como leídos

```text theme={null}
POST https://pilotstatus.com.br/v1/messages/read
```

Envía una **confirmación de lectura** de WhatsApp (doble palomita azul) para el **último mensaje entrante** de la conversación con `to`, marcando ese mensaje y todos los anteriores como leídos **sin enviar un mensaje**.

> [!NOTE]
>
> Mejor esfuerzo: la solicitud se acepta (`200`) incluso cuando no hay nada que confirmar. Revisa el campo `acked` en la respuesta.

## Encabezados

* `Content-Type: application/json`
* `x-api-key: ps_...` (o `x-api-key-id: <api_key_id>`): una clave **con alcance de número**, o una clave de toda la cuenta que indique el número en el encabezado [`x-whatsapp-number-id`](https://docs.pilotstatus.com.br/es/api/authentication) (sin él: `403 TENANT_SCOPE_NOT_ALLOWED`)

**Los tokens OAuth / MCP y las claves de cuenta** (`ps_account_`) también necesitan el permiso `chat:read` (roles `AGENT`, `ADMIN`, `OWNER`); el rol `ANALYST` recibe `403 PERMISSION_DENIED`.

## Cuerpo

**to** `string` *required*

Teléfono de destino en **E.164** o solo dígitos (por ejemplo, `+5511999999999` o `5511999999999`): el contacto cuyos mensajes entrantes quieres marcar como leídos.

## Ejemplo

```bash theme={null}
curl -X POST "https://pilotstatus.com.br/v1/messages/read" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ps_your_key_here" \
  -d '{ "to": "5511999999999" }'
```

## Respuesta (200)

```json theme={null}
{ "ok": true, "acked": true }
```

**ok** `boolean`

Siempre `true` cuando la solicitud fue aceptada.

**acked** `boolean`

`true` cuando se despachó una confirmación de lectura al proveedor; `false` cuando no había nada que confirmar (consulta `reason`).

**reason** `string`

Presente solo cuando `acked` es `false`:

* `NO_INBOUND_MESSAGE`: la conversación no tiene ningún mensaje entrante que confirmar.
* `PII_RELAY_ONLY`: el modo de privacidad del número es RELAY\_ONLY, así que no se almacena ningún id entrante.

## Comportamiento por proveedor

| Proveedor | Cómo funciona |
| - | - |
| **Meta Cloud API** | `status:"read"` de la Cloud API sobre el último mensaje entrante (lo marca a él y a todos los mensajes anteriores como leídos). |
| **Evolution (Pilot Status web / GO)** | `POST /message/markread` nativo a través de una instancia conectada. Evolution V2 no tiene endpoint de confirmación de lectura → `acked:false`. |

## Errores comunes

| Estado | Significado |
| - | - |
| `400` | Cuerpo que no es JSON válido, incluido el vacío (`code: INVALID_BODY`, consulta [Cuerpo JSON malformado](https://docs.pilotstatus.com.br/es/api/overview.md#cuerpo-json-mal-formado)), falta `to`, o la clave no está vinculada a un número (`code: NUMBER_NOT_FOUND`) |
| `400` | `to` que no se normaliza a un número de teléfono (`code: INVALID_DESTINATION`) |
| `401` | Credencial ausente o inválida (`{"error": "Invalid API key"}`) |
| `403` | `TENANT_SCOPE_NOT_ALLOWED`: una clave de toda la cuenta sin `x-whatsapp-number-id`; `PERMISSION_DENIED`: token OAuth/MCP o clave de cuenta cuyo rol no tiene `chat:read` |
| `404` | No hay conversación con `to` (`code: CONVERSATION_NOT_FOUND`), o el número de la clave ya no existe (`code: NUMBER_NOT_FOUND`) |

La ausencia de `to` devuelve `400 {"error": "Validation failed", "details": {…}}`, sin `code`.

Pruébalo en el Playground: [Marcar como leído](https://docs.pilotstatus.com.br/es/playground/messages/mark-as-read.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.