Pagination¶
The Madevo API uses both page-based and cursor-based pagination depending on the endpoint.
Page-based pagination¶
Most list endpoints use page-based pagination.
Parameters¶
page
Integer, zero-based index
Default:0
Behavior¶
- Page numbering starts from 0
- Default page size is 20 items
- Results are typically sorted by newest first
Example request¶
Example response¶
Missing pagination parameters¶
Some endpoints paginate internally but do not expose a page parameter.
Important¶
- The API still returns paginated results
- You may not be able to request specific pages
Examples¶
/api/v1/secure/user/list/api/v1/secure/assistant/conversations/api/v1/secure/agent/tasks
Cursor-based pagination¶
Assistant history uses cursor-based pagination.
Parameters¶
conversation_id(required)before(optional, message ID cursor)
Behavior¶
- Results are returned in batches of 20
- Use
before=<message_id>to fetch older messages - Results are returned in chronological order (oldest to newest within the page)
Example request¶
curl 'https://api.example.com/api/v1/secure/assistant/history?conversation_id=<id>' \
-H 'Authorization: Bearer <jwt>'
Example response¶
has_more field¶
has_more = truemeans more records are availablehas_more = falsemeans you reached the end
Important¶
has_morebecomestrueonly when exactly 20 records are returned
Page size behavior¶
- Default page size: 20
- Some endpoints allow custom
page_size - Others use a fixed size internally
Invalid page values¶
- If
pagecannot be parsed, the API defaults to0 - Negative or invalid values may not be validated consistently
Best practices¶
- Always start with
page = 0 - Use
totalto understand dataset size - Use cursor pagination for assistant history
- Do not assume all endpoints support pagination parameters
- Handle empty responses gracefully