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

# Pagination

All list endpoints return paginated results using cursor-based pagination. This ensures consistent results even when new items are created between requests.

## Response format

Every list endpoint returns the same pagination structure:

```json theme={null}
{
  "data": [],
  "hasMore": true,
  "nextCursor": "abc123"
}
```

| Field        | Type           | Description                                                               |
| ------------ | -------------- | ------------------------------------------------------------------------- |
| `data`       | array          | The list of items for the current page.                                   |
| `hasMore`    | boolean        | Whether there are more items after this page.                             |
| `nextCursor` | string or null | The cursor to use for the next page. `null` when there are no more items. |

## Fetching the next page

To fetch the next page, pass the `nextCursor` value as the `cursor` query parameter:

```bash theme={null}
# First page
curl https://api.otim.com/v0/accounts?limit=10 \
  -H "Authorization: Bearer sk_..."

# Next page
curl https://api.otim.com/v0/accounts?limit=10&cursor=abc123 \
  -H "Authorization: Bearer sk_..."
```

Continue paginating until `hasMore` is `false`.

## Parameters

| Parameter | Default | Max | Description                                           |
| --------- | ------- | --- | ----------------------------------------------------- |
| `limit`   | 50      | 100 | Number of items to return per page.                   |
| `cursor`  | -       | -   | Cursor from a previous response's `nextCursor` field. |
