> ## Documentation Index
> Fetch the complete documentation index at: https://docs.branduo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> Page index and page size for OpenAPI list endpoints.

List endpoints that support paging use the same request parameters and response container as the account API. This is the contract for current and future OpenAPI lists.

The published OpenAPI list surface is small today. For example, [Get Thank You promo offers](/developer/campaigns/thank-you-promo) returns `{ "offers": [...] }` and does **not** use this paging contract.

There are no cursor tokens and no `X-Page-Next` (or similar) pagination headers.

## Request

Send these parameters on list endpoints that support paging:

| Parameter   | Description                                                                   |
| ----------- | ----------------------------------------------------------------------------- |
| `pageIndex` | 1-based page number. If omitted or invalid, `1` is used.                      |
| `pageSize`  | Number of items per page. If omitted, the platform default page size is used. |

Do not assume a hardcoded default `pageSize`. If you need a specific page size, send `pageSize` on the request.

## Response

Paged responses use this container:

| Field       | Description                            |
| ----------- | -------------------------------------- |
| `data`      | Array of items for the requested page. |
| `totalRows` | Total matching rows across all pages.  |

```json theme={"languages":{"custom":["languages/curl.json"]}}
{
  "data": [],
  "totalRows": 0
}
```

## Walking pages

<Steps>
  <Step title="Request the first page">
    Call the list endpoint with `pageIndex=1`. Include `pageSize` if you want a
    specific page size.
  </Step>

  <Step title="Collect items">
    Append `data` to your result set. `totalRows` is the full match count.
  </Step>

  <Step title="Increment pageIndex">
    Request the next page until you have collected `totalRows` items, the
    current page returns no items, or — when you sent `pageSize` — the page
    contains fewer items than `pageSize`.
  </Step>
</Steps>
