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

# Pagination

Many top-level API resources support bulk fetches via "list" API methods. For instance, you can list customers, locations, and devices. These list API methods share a common structure and support at least three parameters: `limit`, `starting_after`, and `ending_before`.

All List methods utilise cursor-based pagination via the `starting_after` and `ending_before` parameters.

Both parameters take object ID values and return objects in reverse chronological order.

* The ending\_before parameter returns objects listed before the named object.
* The starting\_after parameter returns objects listed after the named object.

These parameters are mutually exclusive - only starting\_after or ending\_before may be specified in one request.

```bash Request example theme={"system"}
curl --request GET \
     --url 'https://api.flatpeak.com/events?ending_before=evt_63f1fb4ba346963088070eb4' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>'
```
