`lumail@2.1.0` · [`lumail.subscribers`](/docs/sdk/v2/subscribers)

```typescript
subscribers.list(params?: ListSubscribersParams): Promise<LumailResult<ListSubscribersResponse>>
```

Filter with `query`, `status`, `tag`, `limit`, `after`, `before`.

## Query Parameters

`SubscriberStatus`: `PENDING_CONFIRMATION`, `SUBSCRIBED`, `UNSUBSCRIBED`, `BOUNCED`, `BANNED`, `COMPLAINED`, `TRANSACTIONAL`.

| Name | Type | Description |
| -------- | ----------------------------- | ------------------------------------------------------------- |
| `limit` | number | Page size. |
| `after` | string | Cursor: return contacts after this id. |
| `before` | string | Cursor: return contacts before this id. Forwarded by the SDK. |
| `tag` | string | Filter by tag name. |
| `status` | `SubscriberStatus` or `"all"` | Filter by status. `all` returns every status. |
| `query` | string | Search string (email or name). |

## Response Fields

| Field | Type | Description |
| ---------- | ----------------------- | --------------------------------------------------------------------------------------- |
| `object` | `"list"` | Discriminator. Always `list`. |
| `has_more` | boolean | `true` when another page exists. |
| `data` | `ListSubscriberEntry[]` | Contacts, newest first. Each row: `id`, `email`, `name`, `status`, `createdAt`, `tags`. |

`data` is `{ object, data, has_more }`. Failures return `{ data: null, error: { name, message, statusCode } }`.


## API Reference
**Method:** GET
**Endpoint:** /api/v2/subscribers

### SDK
```ts
import { Lumail } from "lumail";

const lumail = new Lumail({ apiKey: process.env.LUMAIL_API_KEY });
const { data, error } = await lumail.subscribers.list({
  limit: 50,
  query: "ada@",
});
if (error) {
  throw error;
}
for (const subscriber of data.data) {
  console.log(subscriber.email, subscriber.status);
}
```

### cURL
```bash
curl "https://lumail.io/api/v2/subscribers?limit=50&query=ada%40" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### JavaScript
```javascript
const response = await fetch(
  "https://lumail.io/api/v2/subscribers?limit=50&query=ada%40",
  {
    headers: {
      Authorization: "Bearer YOUR_API_TOKEN",
    },
  },
);
const data = await response.json();
```

### Success Response
```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "sub_abc123",
      "email": "ada@example.com",
      "name": "Ada",
      "status": "SUBSCRIBED",
      "createdAt": "2026-09-05T10:30:00.000Z",
      "tags": [{ "id": "tag_abc", "name": "newsletter" }]
    }
  ]
}
```

### Error Response
```json
{
  "name": "missing_api_key",
  "message": "Missing API key",
  "statusCode": 401
}
```
