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

# Pagination

> How to page through Sendora collections without missing or duplicating records.

Sendora collections use the pagination fields defined by each endpoint. Read the response schema instead of assuming every resource uses the same cursor format.

## Offset pagination

```bash theme={"dark"}
curl "https://api.sendora.ai/api/v1/public/leads?page=2&per_page=50" \
  -H "X-API-Key: $SENDORA_API_KEY"
```

Use the returned `total`, `page`, and `per_page` values to decide whether another page exists. Respect endpoint maximums.

## Cursor pagination

```bash theme={"dark"}
curl "https://api.sendora.ai/api/v1/public/conversations?cursor=$NEXT_CURSOR&limit=50" \
  -H "X-API-Key: $SENDORA_API_KEY"
```

Pass `next_cursor` back unchanged. Cursors are opaque: do not decode, sort, or construct them.

## Safe collection loops

* Keep filters and sort parameters unchanged on every page.
* Store the last cursor before processing records.
* Deduplicate by public `id` when consuming pages asynchronously.
* Handle `429` and `5xx` responses without advancing the cursor.


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