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

# Pagination

> Cursor-based pagination and filtering for REST list endpoints

## Pagination

List endpoints support cursor-based pagination using the following query parameters:

| Parameter        | Type    | Description                                               |
| ---------------- | ------- | --------------------------------------------------------- |
| `limit`          | integer | Maximum number of items to return (default: 20, max: 100) |
| `starting_after` | string  | Cursor for forward pagination (item ID to start after)    |
| `ending_before`  | string  | Cursor for backward pagination (item ID to end before)    |

**Paginated response structure:**

```json theme={null}
{
  "data": [...],
  "has_more": true,
  "next_cursor": "cus_abc123"
}
```

**Example: Fetching paginated results**

```bash theme={null}
# First page
curl -X GET "https://api.stigg.io/api/v1/customers?limit=10" \
  -H "X-API-KEY: your-api-key"

# Next page
curl -X GET "https://api.stigg.io/api/v1/customers?limit=10&starting_after=cus_abc123" \
  -H "X-API-KEY: your-api-key"
```

## Filtering

List endpoints support filtering using query parameters specific to each resource:

```bash theme={null}
# Filter customers by email
curl -X GET "https://api.stigg.io/api/v1/customers?email=user@example.com" \
  -H "X-API-KEY: your-api-key"

# Filter subscriptions by status
curl -X GET "https://api.stigg.io/api/v1/subscriptions?status=active" \
  -H "X-API-KEY: your-api-key"
```


## Related topics

- [Query the governance tree](/documentation/governance/query.md)
- [Introduction](/api-and-sdks/api-reference/graphql/introduction.md)
- [C#](/api-and-sdks/changelog/backend-rest/csharp.md)
- [React SDK](/api-and-sdks/changelog/frontend/react.md)
- [TypeScript](/api-and-sdks/changelog/backend-rest/typescript.md)
