# List conversation analytics

Returns conversation analytics, one page at a time.

```http
GET https://api.pozy.ai/v1/analytics/inbox/conversations
```

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

## Query parameters

- `fromDate` (string (date), required)
- `toDate` (string (date))
- `profileId` (string)
- `platform` (string)
- `accountId` (string)
- `source` (string)
- `limit` (integer)
- `page` (integer)
- `sortBy` (string): one of lastMessageAt, firstMessageAt, totalMessages, received, sent, read, failed
- `order` (string): one of asc, desc

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/analytics/inbox/conversations?fromDate=2026-10-01&limit=50" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/analytics/inbox/conversations?fromDate=2026-10-01&limit=50", {
  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/analytics/inbox/conversations",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "fromDate": "2026-10-01",
        "limit": 50,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `from`, string (date)
- `to`, string (date): Can be null
- `items`, array of object
  - `conversationId`, string
  - `mongoId`, string: Can be null
  - `accountId`, string
  - `platform`, string
  - `participantName`, string: Can be null
  - `participantUsername`, string: Can be null
  - `participantPicture`, string: Can be null
  - `lastMessage`, string: Can be null
  - `totalMessages`, integer
  - `received`, integer
  - `sent`, integer
  - `read`, integer
  - `failed`, integer
  - `firstMessageAt`, string (date-time)
  - `lastMessageAt`, string (date-time)
- `pagination`, object
  - `page`, integer
  - `limit`, integer
  - `total`, integer
  - `totalPages`, integer
  - `hasMore`, boolean

```json
{
  "success": true,
  "from": "2026-10-01",
  "to": "2026-10-01",
  "items": [
    {
      "conversationId": "6e525f3820fc636aa96d2ee9",
      "mongoId": "69a579625d8d26a9e12912c0",
      "accountId": "696e0b682d0a31188e7a2ba9",
      "platform": "instagram",
      "participantName": "Acme",
      "participantUsername": "acme",
      "participantPicture": "string",
      "lastMessage": "Hello from Pozy",
      "totalMessages": 42,
      "received": 1,
      "sent": 1,
      "read": 1,
      "failed": 1,
      "firstMessageAt": "2026-10-02T09:00:00.000Z",
      "lastMessageAt": "2026-10-02T09:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 42,
    "totalPages": 42,
    "hasMore": true
  }
}
```
