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

# Pagination

> Paginating API responses

List endpoints use cursor-based pagination.

## Request Parameters

<ParamField path="page" type="integer">
  Page number (default: 1)
</ParamField>

<ParamField path="page_size" type="integer">
  Items per page (default: 20, max: 100)
</ParamField>

<ParamField path="cursor" type="string">
  Cursor for next page (from previous response)
</ParamField>

## Response Format

<ResponseExample>
  ```json theme={null}
  {
    "results": [...],
    "count": 100,
    "next": "https://api.gosentrix.io/api/v1/tenants?cursor=abc123",
    "previous": null
  }
  ```
</ResponseExample>

## Pagination Methods

### Offset-Based

```bash theme={null}
GET /api/v1/tenants?page=1&page_size=20
```

### Cursor-Based

```bash theme={null}
GET /api/v1/tenants?cursor=abc123
```

## Best Practices

* Use cursor-based pagination for large datasets
* Set appropriate page sizes
* Handle `next` and `previous` links
* Cache pagination state when needed
