Cursor Pagination
Reading public API datasets with stable cursor-based pagination.
Cursor Pagination
Current V2 status (2026-09-01): This pagination contract is live in V2 on every
/api/v1list endpoint. Sort fields arecreated_atandupdated_atfor every resource, plusscheduled_datefor jobs. An unknown sort returns422 invalid_sort; a cursor that was tampered with or issued for a different sort returns422 invalid_cursor.
List endpoints in the external API use cursor pagination instead of page numbers.
This is more stable for growing datasets because new records can be created while you are paging without shifting every later result set.
Query Parameters
limit: number of results to return, default25, max100cursor: opaque cursor from the previous responsesort: supported sort field for the endpointorder:ascordesc
Response Metadata
{
"meta": {
"next_cursor": "opaque-value",
"has_more": true,
"limit": 25
}
}If has_more is false, you have reached the end of the collection.
Example
First request:
curl "https://app.cleanestimate.pro/api/v1/leads?limit=25&sort=created_at&order=desc" \
-H "Authorization: Bearer $CEPRO_API_KEY"Next request:
curl "https://app.cleanestimate.pro/api/v1/leads?limit=25&sort=created_at&order=desc&cursor=eyJ2IjoxLCJzIjoiY3JlYXRlZF9hdCIsIm8iOiJkZXNjIiwiazpbIjIwMjYtMDMtMTRUMTQ6MzA6MDBaIiwiLi4uIl19" \
-H "Authorization: Bearer $CEPRO_API_KEY"Important Rules
- Treat the cursor as opaque. Do not parse or modify it.
- Keep
sortandorderthe same when using a cursor. - Restart from the first page if you want to change sorting or filters.
Supported Sort Defaults
- Leads:
created_at desc - Clients:
created_at desc - Estimates:
created_at desc - Jobs:
scheduled_date desc - Invoices:
created_at desc
V1 webhook destination reads are not cursor-paginated.
Related articles
Was this article helpful?
Still need help? Contact support