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

# Pagination

Sendoso's API supports pagination for most of the GET endpoints to allow you to retrieve a large number of resources in smaller chunks. This can be useful when retrieving lists of resources, such as `sends` or `users`, that exceed the maximum number of resources that can be returned in a single response.

Pagination can be achieved by using the `page` and `page_size` query parameters in your API requests.

<ParamField body="page" type="integer" required>
  The page number of the results you want to retrieve. The first page is 1.
</ParamField>

<ParamField body="per_page" type="integer" required>
  The number of resources to be returned per page.
</ParamField>

For example, to retrieve the second page of `campaigns` with a page size of `50`, you would make the following GET request:

```js theme={null}
GET https://app.sendoso.com/campaigns?page=2&per_page=50
```

If your request returns a paginated result, the response will include the following fields at the root with the following pagination information:

<ResponseField name="current_page" type="integer" required>
  The total number of resources available.
</ResponseField>

<ResponseField name="per_page" type="integer" required>
  The number of resources per page.
</ResponseField>

<ResponseField name="total_{resource}" type="integer" required>
  The total number of resources available.
</ResponseField>

```js theme={null}
{
  "campaigns": [...],
  "current_page": 2,
  "per_page": 50,
  "total_campaigns": 234
}
```
