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

# Pagination

> Cursor-based pagination across all PCX services

## Pagination

PCX uses **cursor-based pagination** throughout. There is no offset-based (`page=2`) pagination.

### How it works

1. Make your first request — optionally pass `limit` to control page size
2. If there are more results, the response includes a `last_evaluated_key` (or `lastEvaluatedKey`) field
3. Pass that value back as a query parameter on your next request to get the next page
4. When `last_evaluated_key` is `null` (or absent), you have reached the last page

### Request

```bash theme={null}
GET /v1/users/list?limit=20
GET /v1/users/list?limit=20&last_evaluated_key=<cursor_from_previous_response>
```

### Response

```json theme={null}
{
  "status": "success",
  "data": [ ... ],
  "count": 20,
  "last_evaluated_key": "eyJwa...",
  "meta": {
    "last_evaluated_key": "eyJwa..."
  }
}
```

<Warning>
  Pagination cursors are opaque tokens. Do not attempt to parse, modify, or construct them manually — they are base64-encoded and will cause a `400` if malformed.
</Warning>

### Key naming inconsistency

Different services use slightly different field names for the pagination cursor — this is a known inconsistency:

| Service          | Request param        | Response field       |
| ---------------- | -------------------- | -------------------- |
| Organizations    | `lastEvaluatedKey`   | `lastEvaluatedKey`   |
| Users            | `last_evaluated_key` | `last_evaluated_key` |
| Virtual Accounts | `last_evaluated_key` | `last_evaluated_key` |
| Beneficiary      | `last_evaluated_key` | `last_evaluated_key` |
| Transaction      | `last_evaluated_key` | `last_evaluated_key` |
