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

# GET List Messages

> Retrieve a paginated list of WhatsApp messages for a conversation.

## List Messages

`GET /api/conversations/:conversationId/messages`

Retrieve all messages in a conversation, sorted chronologically. Supports cursor-based pagination and filtering.

```bash cURL theme={null}
curl "https://zeplo.ai/api/conversations/1/messages?page=1&limit=50" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET" \
  -H "x-channel-id: YOUR_CHANNEL_ID"
```

### Authorization

| Header | Required | Description |
| - | - | - |
| `x-api-key` | Yes | Your API key |
| `x-api-secret` | Yes | Your API secret key |
| `x-channel-id` | Yes | WhatsApp channel ID |

### Path parameters

**conversationId** `integer` *required*

The conversation ID.

### Query parameters

**page** `integer` (default: 1)

Page number for pagination.

**limit** `integer` (default: 50)

Messages per page (max: 100).

**before** `string`

Message ID to fetch messages before.

**after** `string`

Message ID to fetch messages after.

```json Response theme={null}
{
  "success": true,
  "data": [
    {
      "id": 42,
      "conversationId": 1,
      "type": "text",
      "content": { "text": "Hello!" },
      "direction": "inbound",
      "status": "delivered",
      "senderName": "John Doe",
      "senderPhone": "919876543210",
      "createdAt": "2026-01-15T10:00:00Z"
    },
    {
      "id": 43,
      "conversationId": 1,
      "type": "text",
      "content": { "text": "Hi John! How can we help?" },
      "direction": "outbound",
      "status": "read",
      "senderName": "Agent Smith",
      "createdAt": "2026-01-15T10:01:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 120,
    "totalPages": 3
  }
}
```

### Message types

Messages can have the following `type` values:

| Type | Content shape |
| - | - |
| `text` | `{"text": "..."}` |
| `image` | `{"url": "...", "caption": "..."}` |
| `document` | `{"url": "...", "caption": "...", "filename": "..."}` |
| `audio` | `{"url": "..."}` |
| `video` | `{"url": "...", "caption": "..."}` |
| `sticker` | `{"url": "..."}` |
| `contacts` | `{"contacts": [...]}` |
| `location` | `{"latitude": 0, "longitude": 0, "name": "..."}` |
| `interactive` | `{"type": "button\|list", ...}` |
| `template` | `{"templateName": "...", ...}` |
| `reaction` | `{"emoji": "..."}` |

### Message status

| Status | Description |
| - | - |
| `queued` | Message is queued for sending |
| `sent` | Message sent to WhatsApp |
| `delivered` | Message delivered to recipient's device |
| `read` | Message read by recipient |
| `failed` | Message delivery failed |


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