---
title: "Pagination and queries"
description: "How Pallyy API list endpoints paginate with page and size parameters, and how to pass nested filters and sorting in the query string."
category: "getting-started"
emoji: "📄"
order: 4
datePublished: "2026-08-20"
dateUpdated: "2026-08-20"
---

List endpoints share the same pagination parameters and response envelope, and accept nested filter and sort objects encoded with bracket syntax.

## Pagination parameters

| Parameter | Default | Meaning |
| --- | --- | --- |
| `page` | `0` | Zero-based page index |
| `size` | `25` | Items per page, between 1 and 100 |

Paginated responses wrap their results in a common envelope:

```json
{
  "items": [],
  "page": 0,
  "size": 25
}
```

## Nested query objects

Filters and sorting are objects, encoded in the query string with bracket syntax. Arrays use empty brackets:

```bash
curl "https://app.pallyy.com/api/v1/post-sets?socialSetId=SET_ID&size=10&filters[status][]=SCHEDULED&sort[scheduledAt]=DESC" \
  -H "Authorization: Bearer pallyy_your_api_key"
```

Sort values are `ASC` or `DESC`. Boolean filter values are passed as the strings `true` or `false`.

Each endpoint's page documents the filters and sort fields it supports. Unknown filter or sort fields are rejected with a `400`.
