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

# Find message by ID

> Retrieves the snapshot of a message stored by ingestion

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

## Description

Returns the persisted snapshot of a message (text, media, caption, mimetype, size, etc.) that has already been processed by ingestion. Useful to rehydrate a message from the `messageId` received in a webhook or in another API endpoint.

## Examples

### By id

Retrieves the message snapshot using the `?messageId=<message-id>` query. Returns the full record (text, media, caption, mimetype, size) persisted by ingestion.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/chat/getMessage/$Instance_Name?messageId=3EB08FCF27E532F1B0F5" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/chat/getMessage/${process.env.Instance_Name}?messageId=3EB08FCF27E532F1B0F5`, {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

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

  requests.get(
      f"https://ryzeapi.cloud/api/chat/getMessage/{os.environ['Instance_Name']}?messageId=3EB08FCF27E532F1B0F5",
      headers={"token": os.environ["Token_Instance"]}
  )
  ```

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

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/chat/getMessage/"+os.Getenv("Instance_Name")+"?messageId=3EB08FCF27E532F1B0F5", nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

The snapshot comes in `data` with `type`, `from`, `to`, `chat`, `timestamp`, `isGroup`, and the send `status`. For text messages, `content` carries the body; for media, the `media` object appears with `type`, `mimeType`, `size`, and `duration` (audio/video). Use `messageId` from the envelope to reference this message in subsequent calls (favorite, forward, edit).

```json 200 OK theme={null}
{
  "success": true,
  "message": "Message found",
  "messageId": "3EB08FCF27E532F1B0F5",
  "data": {
    "content": "Hi!",
    "type": "text",
    "from": "5511999999999@s.whatsapp.net",
    "to": "5511888888888@s.whatsapp.net",
    "chat": "5511999999999@s.whatsapp.net",
    "timestamp": "2026-04-28T14:30:00Z",
    "isGroup": false,
    "status": "delivered"
  },
  "status": "found"
}
```

## Path parameters

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

## Query params

<ParamField query="messageId" type="string" required>
  Message ID (required).
</ParamField>

## Headers

| Name    | Required                 | Example        | Description                    |
| ------- | ------------------------ | -------------- | ------------------------------ |
| `token` | yes (or `Authorization`) | `a1b2c3d4-...` | TokenAccount or TokenInstance. |

## Error responses

| HTTP | `error.message`                                        | When it happens                    |
| ---- | ------------------------------------------------------ | ---------------------------------- |
| 400  | `Message ID is required (use ?messageId=<message-id>)` | Missing `messageId`.               |
| 404  | `Instance not found`                                   | ,                                  |
| 404  | `Message not found`                                    | ID does not exist in the database. |
| 503  | `Instance is not connected to WhatsApp`                | ,                                  |

```json Error 400 theme={null}
{
  "success": false,
  "error": { "message": "Message ID is required (use ?messageId=<message-id>)" }
}
```

## Related

<CardGroup cols={2}>
  <Card title="Media as base64" href="/en/api/chat/media-base64">
    Retrieve raw media from the `messageId`.
  </Card>

  <Card title="Delivery status" href="/en/api/chat/contact-status">
    Check whether it was delivered/read.
  </Card>
</CardGroup>
