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

# GET List messages

> List messages with cursor-based pagination.

## Endpoint

```txt theme={null}
GET /api/v1/messages
```

## Parameters query

| Nom          | Type    | Required | Description           |
| ------------ | ------- | -------- | --------------------- |
| `limit`      | integer | no       | Taille de page        |
| `cursor`     | string  | no       | Curseur de pagination |
| `instanceId` | UUID    | no       | Filtre par instance   |
| `status`     | string  | no       | Filter by status      |

## Request example

```bash theme={null}
curl "https://srv.msgflash.com/api/v1/messages?limit=20&status=delivered" \
  -H "x-api-key: msgf_live_your_api_key_here"
```

## Success response `200`

```json theme={null}
{
  "data": {
    "messages": [
      {
        "id": "msg_uuid",
        "userId": "user_uuid",
        "instanceId": "inst_uuid",
        "contactId": null,
        "campaignId": null,
        "direction": "outbound",
        "type": "text",
        "from": null,
        "to": "+33612345678",
        "body": "Hello",
        "mediaUrl": null,
        "status": "delivered",
        "error": null,
        "meta": {},
        "providerMessageId": "BAE5D1A2B3C4D5E6",
        "createdAt": "2026-04-01T10:00:00.000Z",
        "updatedAt": "2026-04-01T10:01:10.000Z"
      }
    ],
    "nextCursor": null,
    "hasMore": false
  }
}
```

## Common errors

| HTTP  | Code           | When            |
| ----- | -------------- | --------------- |
| `401` | `UNAUTHORIZED` | Invalid API key |
