# List broadcast contacts

> List contacts in a broadcast with optional status filter.

`GET https://api.zavu.dev/v1/broadcasts/{broadcastId}/contacts`

List contacts in a broadcast with optional status filter.

## Parameters

- `broadcastId` (path, string, required)
- `status` (query, string) One of: `pending`, `queued`, `sending`, `sent`, `delivered`, `failed`, `skipped`.
- `limit` (query, integer)
- `cursor` (query, string)

## Responses

### 200

List of broadcast contacts.

- `items` (object[], required)
  - `id` (string, required)
  - `recipient` (string, required)
  - `recipientType` (string, required) One of: `phone`, `email`.
  - `status` (string, required): Status of a contact within a broadcast. - `pending`, `queued`, `sending`: not handed to the provider yet. - `sent`: accepted by the provider; delivery is not confirmed yet. Channels that never report delivery leave the recipient here. - `delivered`: the channel confirmed delivery to the device. A WhatsApp read receipt also counts as delivered. - `failed`: not delivered. A recipient can move from `sent` or `delivered` to `failed` when the provider reports a failure late. - `skipped`: not sent, because the recipient opted out of the channel or the broadcast was cancelled before reaching it. One of: `pending`, `queued`, `sending`, `sent`, `delivered`, `failed`, `skipped`.
  - `templateVariables` (object)
    - `{key}` (string)
  - `templateButtonVariables` (object)
    - `{key}` (string)
  - `templateHeaderVariables` (object)
    - `{key}` (string)
  - `messageId` (string): Associated message ID after processing.
  - `errorCode` (string)
  - `errorMessage` (string)
  - `cost` (number, nullable)
  - `processedAt` (string<date-time>)
  - `createdAt` (string<date-time>, required)
- `nextCursor` (string, nullable)

### 400

Invalid query parameters (`invalid_request`): an unknown `status`, `limit` outside 1-100, or a malformed `cursor`.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Broadcast not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/broadcasts/broadcast_abc123/contacts" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.broadcasts.contacts.list("broadcast_abc123");

console.log(result);
```
