# Pagination

Lists return a page of items. How you ask for the next page depends on the list.

## Cursor pages: posts

[`GET /posts`](/api/operations/listposts/) returns up to `limit` posts (default 50 by status, 500 by date range). When there are
more, the response has an `X-Next-Cursor` header. Send it back as `cursor` with the same filters:

```sh
curl -i "https://postflow.biz.id/api/v1/posts?status=published&limit=100" -H "Authorization: Bearer $POSTFLOW_API_KEY"
# X-Next-Cursor: WzE3OTA4NTY…
curl "https://postflow.biz.id/api/v1/posts?status=published&limit=100&cursor=WzE3OTA4NTY…" -H "Authorization: Bearer $POSTFLOW_API_KEY"
```

No header means the last page. Cursors are opaque: don't build or change them.

## Timestamp pages: media and comments

[`GET /media`](/api/operations/listmedia/) (60 per page) and [`GET /inbox`](/api/operations/listcomments/) (30 threads per page)
return newest first. For the next page, send the last item's time as `before`:

| List | Send as `before` |
|---|---|
| `GET /media` | the last item's `createdAt` |
| `GET /inbox` | the last thread's `commentedAt` |

A page shorter than the page size is the last one.

## Not paginated

`GET /inbox/messages` returns the 60 most recent conversations; `GET /inbox/messages/{id}` the latest 100 messages.
`GET /calendar` covers at most 92 days. Accounts, tags, content types and webhooks are short lists.

## In MCP

List tools return `{ "items": [...], "nextCursor": "…" }`. Agents pass `nextCursor` back as `cursor`.