{
  "pagination": {
    "starting_after": "20200901212845208267",
    "ending_before": "20200901213325502653",
    "limit": 10,
  },
  "data": [
    ...  
  ]
}

The resource collections use cursor-based pagination via the starting_after and ending_before parameters with a limit parameter to set the page size.

The ending_before parameter returns resources listed before the specified value. The starting_after parameter returns resources listed after the specified value.

These parameters are mutually exclusive, only one of starting_after or ending_before may be used.

The response has a pagination object with information for pagination through the results.

The value returned in the property starting_after can be used to navigate to the next page.
The value returned in the property ending_before can be used to navigate to the previous page.

❗️

Empty results

When there are no results both starting_after and ending_before will be returned as null.

In order to avoid losing the cursor, when there is an empty response it should be considered that there is no next or previous page, depending on the parameter used for the query.