> ## Documentation Index
> Fetch the complete documentation index at: https://pigeonpost-developer.27communication.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> Page through long lists with an offset or a cursor.

Every list has the same shape:

```json theme={null}
{ "object": "Emails", "data": [ "…" ], "has_more": true }
```

`object` names the list, `data` holds the items, and `has_more` is `true` when there are more items after this page. Lists are paged in one of two ways:

| Paging | Lists |
| - | - |
| Offset (`offset` and `limit`) | Accounts, webhook endpoints, webhook conversations, API keys |
| Cursor (`cursor` and `limit`) | Emails, drafts, contacts |
| Not paged | Folders (`has_more` is always `false`) |

Both kinds take `limit`: items per page, 1 to 250. Default 50.

## Offset paging

Skip the items you already have with `offset`:

```bash theme={null}
curl "$EE_URL/api/v1/accounts?limit=100&offset=0" -H "X-API-KEY: $EE_KEY"
```

```json theme={null}
{ "object": "Accounts", "data": [ "…" ], "has_more": true }
```

While `has_more` is `true`, raise `offset` by `limit` for the next page (`offset=100`, then `offset=200` …).

## Cursor paging

Cursor lists also return a `cursor`:

```bash theme={null}
curl "$EE_URL/api/v1/emails?account_id=acc_ba1fa6938d8548298e8ce62e4b4b4e99&limit=100" -H "X-API-KEY: $EE_KEY"
```

```json theme={null}
{
  "object": "Emails",
  "data": [ "…" ],
  "has_more": true,
  "cursor": "eyJkIjoiMjAyNi0xMC0wNlQwOToxMjowMFoiLCJpIjoiOTRhMGQ3N2QifQ"
}
```

Pass `cursor` back to get the next page, with the **same filters**:

```bash theme={null}
curl "$EE_URL/api/v1/emails?account_id=acc_ba1fa6938d8548298e8ce62e4b4b4e99&limit=100&cursor=eyJkIjoi…" -H "X-API-KEY: $EE_KEY"
```

When `has_more` is `false`, you've reached the last page, and `cursor` is `null`.

| Parameter | |
| - | - |
| `limit` | Items per page, 1 to 250. Default 50 |
| `cursor` | From the previous response. Treat it as opaque: its contents may change |

Email and draft cursors point at the last email returned, not at a page number. Mail that arrives while you page doesn't shift the pages, so you never get an email twice or skip one.

A `limit` out of range, a negative `offset`, or a broken `cursor` gets `400 errors/invalid_parameters`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.