Cursor Pagination

Reading public API datasets with stable cursor-based pagination.

IntermediateownermanagerdeveloperUpdated 2026-09-01

Cursor Pagination

Current V2 status (2026-09-01): This pagination contract is live in V2 on every /api/v1 list endpoint. Sort fields are created_at and updated_at for every resource, plus scheduled_date for jobs. An unknown sort returns 422 invalid_sort; a cursor that was tampered with or issued for a different sort returns 422 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, default 25, max 100
  • cursor: opaque cursor from the previous response
  • sort: supported sort field for the endpoint
  • order: asc or desc

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 sort and order the 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.

Was this article helpful?

Still need help? Contact support