# List messages

Returns messages, one page at a time.

```http
GET https://api.pozy.ai/v1/inbox/conversations/{conversationId}/messages
```

- Area: Inbox / Messages
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `conversationId` (string, required)

## Query parameters

- `accountId` (string, required)
- `limit` (integer)
- `cursor` (string)
- `sortOrder` (string): one of asc, desc

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages?accountId=696e0b682d0a31188e7a2ba9&limit=100" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages?accountId=696e0b682d0a31188e7a2ba9&limit=100", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "accountId": "696e0b682d0a31188e7a2ba9",
        "limit": 100,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `status`, string
- `pagination`, object
  - `hasMore`, boolean
  - `nextCursor`, string: Can be null
- `sortOrderApplied`, string: One of `asc`, `desc`
- `messages`, array of object
  - `id`, string
  - `conversationId`, string
  - `accountId`, string
  - `platform`, string
  - `message`, string
  - `senderId`, string
  - `senderName`, string: Can be null
  - `senderVerifiedType`, string: One of `blue`, `government`, `business`, `none`. Can be null
  - `direction`, string: One of `incoming`, `outgoing`
  - `createdAt`, string (date-time)
  - `attachments`, array of object
    - `id`, string
    - `type`, string: One of `image`, `video`, `audio`, `file`, `sticker`, `share`, `template`, `unsupported_type`
    - `originalType`, string
    - `mimeType`, string
    - `url`, string
    - `refreshUrl`, string: Can be null
    - `filename`, string: Can be null
    - `previewUrl`, string: Can be null
    - `payload`, object
  - `subject`, string: Can be null
  - `storyReply`, object
    - `storyId`, string
    - `storyUrl`, string
  - `isStoryMention`, boolean
  - `noRenderableContent`, boolean
  - `isEdited`, boolean
  - `editedAt`, string (date-time): Can be null
  - `editCount`, integer
  - `editHistory`, array of object
    - `text`, string, required: Can be null
    - `attachments`, array of object, required
      - `type`, string
      - `url`, string
      - `payload`, object
    - `editedAt`, string (date-time), required
  - `isDeleted`, boolean
  - `deletedAt`, string (date-time): Can be null
  - `deliveryStatus`, string: One of `sent`, `delivered`, `read`, `played`, `failed`, `deleted`. Can be null
  - `deliveredAt`, string (date-time): Can be null
  - `readAt`, string (date-time): Can be null
  - `sentAt`, string (date-time): Can be null
  - `deliveryError`, object: Can be null
    - `code`, integer
    - `title`, string
    - `message`, string
    - `details`, string
    - `href`, string (URL)
  - `reactions`, array of object
    - `emoji`, string
    - `fromMe`, boolean
    - `reactedAt`, string (date-time)
  - `metadata`, object
  - `sentVia`, string: One of `human`, `api`, `broadcast`, `sequence`, `workflow`, `comment_automation`, `bulk-api`. Can be null
- `lastUpdated`, string (date-time)

```json
{
  "status": "active",
  "pagination": {
    "hasMore": true,
    "nextCursor": "string"
  },
  "sortOrderApplied": "asc",
  "messages": [
    {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "conversationId": "6e525f3820fc636aa96d2ee9",
      "accountId": "696e0b682d0a31188e7a2ba9",
      "platform": "instagram",
      "message": "Hello from Pozy",
      "senderId": "68ef6f94df13738fb25f1e94",
      "senderName": "Acme",
      "senderVerifiedType": "blue",
      "direction": "incoming",
      "createdAt": "2026-10-02T09:00:00.000Z",
      "attachments": [
        {
          "id": "6bfebd43ddc270f6d2c56fc5",
          "type": "image",
          "originalType": "string",
          "mimeType": "image/jpeg",
          "url": "https://pozy.ai/media/example-1.jpg",
          "refreshUrl": "https://pozy.ai/media/example-1.jpg",
          "filename": "photo.jpg",
          "previewUrl": "https://pozy.ai/media/example-1.jpg",
          "payload": {}
        }
      ],
      "subject": "string",
      "storyReply": {
        "storyId": "62c55df6d7c6e25c9304798b",
        "storyUrl": "https://pozy.ai/media/example-1.jpg"
      },
      "isStoryMention": true,
      "noRenderableContent": true,
      "isEdited": true,
      "editedAt": "2026-10-02T09:00:00.000Z",
      "editCount": 42,
      "editHistory": [
        {
          "text": "Hello from Pozy",
          "attachments": [
            {
              "type": "string",
              "url": "https://pozy.ai/media/example-1.jpg",
              "payload": {}
            }
          ],
          "editedAt": "2026-10-02T09:00:00.000Z"
        }
      ],
      "isDeleted": true,
      "deletedAt": "2026-10-02T09:00:00.000Z",
      "deliveryStatus": "sent",
      "deliveredAt": "2026-10-02T09:00:00.000Z",
      "readAt": "2026-10-02T09:00:00.000Z",
      "sentAt": "2026-10-02T09:00:00.000Z",
      "deliveryError": {
        "code": 1,
        "title": "Launch day",
        "message": "Hello from Pozy",
        "details": "string",
        "href": "https://pozy.ai/media/example-1.jpg"
      },
      "reactions": [
        {
          "emoji": "string",
          "fromMe": true,
          "reactedAt": "2026-10-02T09:00:00.000Z"
        }
      ],
      "metadata": {},
      "sentVia": "human"
    }
  ],
  "lastUpdated": "2026-10-02T09:00:00.000Z"
}
```
