Every endpoint that returns a list is paginated, and they all use the same two parameters and the same envelope.

### Parameters

| Parameter  | Default | Limit                               |
| ---------- | ------- | ----------------------------------- |
| `page`     | `1`     | Pages are 1-indexed, not 0-indexed. |
| `per_page` | `25`    | Maximum **100**.                    |

```
GET /api/v3/contacts?page=2&per_page=50
```

### The envelope

A paginated response is always an object with `data` and `pagination`. It is never a bare array, so the response shape does not change when there are no results.

```json
{
    "data": [{ "id": "6512a0b3f8d4c21a9e7b3f01", "name": "Ada Lovelace" }],
    "pagination": {
        "page": 1,
        "per_page": 25,
        "total_items": 100,
        "total_pages": 4,
        "last_page": false,
        "offset": 0
    }
}
```

| Field              | Meaning                                                              |
| ------------------ | -------------------------------------------------------------------- |
| `page`, `per_page` | Echo of what was applied, after defaults and clamping.               |
| `total_items`      | Total matching the query across all pages, not the number in `data`. |
| `total_pages`      | Total pages at the current `per_page`.                               |
| `last_page`        | `true` on the final page. Use this to end your loop.                 |
| `offset`           | Index of the first row in `data` within the full result set.         |

### Iterating a full list

Loop until `pagination.last_page` is `true`. Do not stop when `data` is shorter than `per_page` — that is also true of the last page, but checking the flag is unambiguous.

```
page = 1
loop:
  response = GET /api/v3/contacts?page=<page>&per_page=100
  process(response.data)
  if response.pagination.last_page: stop
  page = page + 1
```

Prefer a larger `per_page` over more requests. Fetching 1,000 records at `per_page=100` is ten requests; at the default it is forty.

### Deep pagination has a limit

Some list endpoints are backed by a search index that cannot page arbitrarily deep. Past roughly 10,000 records, they return **400** rather than failing partway through. If you need to walk a very large collection, narrow it with filters — by date range, by status, by owner — rather than paging further into an unfiltered list.

### Results can shift between pages

Pagination is a snapshot per request, not per traversal. If records are created or deleted while you are iterating, a record can appear on two pages or on none. When exactness matters, sort by a stable field such as `created_at` and filter to a closed time range so the underlying set cannot change beneath you.
