# List iMessage audience

Returns iMessage audience, one page at a time.

```http
GET https://api.pozy.ai/v1/imessage/audience
```

- Area: Messaging / iMessage
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `accountId` (string)
- `status` (string): one of subscribed, unsubscribed
- `search` (string)
- `limit` (integer)
- `skip` (integer)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/imessage/audience?limit=50" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

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

## Response 200

- `contacts`, array of object
  - `conversationId`, string
  - `accountId`, string
  - `contact`, string
  - `name`, string: Can be null
  - `subscribed`, boolean
  - `lastMessage`, string: Can be null
  - `lastMessageAt`, string (date-time): Can be null
  - `firstSeenAt`, string (date-time): Can be null
  - `optIn`, object: Can be null
    - `at`, string (date-time)
    - `parameters`, object
- `total`, integer
- `limit`, integer
- `skip`, integer

```json
{
  "contacts": [
    {
      "conversationId": "6e525f3820fc636aa96d2ee9",
      "accountId": "696e0b682d0a31188e7a2ba9",
      "contact": "string",
      "name": "Acme",
      "subscribed": true,
      "lastMessage": "Hello from Pozy",
      "lastMessageAt": "2026-10-02T09:00:00.000Z",
      "firstSeenAt": "2026-10-02T09:00:00.000Z",
      "optIn": {
        "at": "2026-10-02T09:00:00.000Z",
        "parameters": {}
      }
    }
  ],
  "total": 42,
  "limit": 1,
  "skip": 1
}
```
