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

# Pagination

> Cursor pagination for the list endpoints

Every list endpoint (agents, projects, pages, knowledge sources, knowledge topics, assets) is cursor-paginated and answers the same envelope:

```json theme={null}
{
  "data": [ … ],
  "hasMore": true,
  "nextCursor": "eyJjcmVhdGVkQXQiOiIy…"
}
```

## Walking the pages

Pass the `nextCursor` you were handed back as `?after=` to get the next page. Stop when `hasMore` is `false` (`nextCursor` is then `null`).

```bash theme={null}
# first page
curl "$WDY/agents?limit=50" -H "Authorization: Bearer $WDY_KEY"

# next page
curl "$WDY/agents?limit=50&after=eyJjcmVhdGVkQXQiOiIy…" -H "Authorization: Bearer $WDY_KEY"
```

## Parameters

| Query    | Meaning                                                                                              |
| -------- | ---------------------------------------------------------------------------------------------------- |
| `limit`  | Items per page, `1`–`100`. Default `50`.                                                             |
| `after`  | Opaque cursor: the `nextCursor` of a previous page. Returns the items after it (newest-first order). |
| `before` | Opaque cursor for paging backwards.                                                                  |

The cursor is **opaque**: treat it as a token, never parse it. Items are ordered newest-first.
