Skip to main content
All Shilo list endpoints return results in pages. Rather than offset-based pagination (which can miss or duplicate records when data changes between requests), Shilo uses a cursor-based approach that gives you a stable pointer into the result set. This makes it safe to page through large collections—like all calls for an agent over the past year—without worrying about skipped or duplicated records.

Response Shape

Every list endpoint returns a top-level data array and a pagination object:

Query Parameters

Fetching All Pages

To retrieve every record in a collection, loop until has_more is false:
In pseudocode:

Last Page Indicator

When you have retrieved all available records, the response looks like this:
has_more: false and next_cursor: null together confirm you have reached the end of the result set.
The cursor value is opaque—do not attempt to parse, decode, or construct it manually. Always use the exact string returned by the API in the previous response. Modifying the cursor produces a 400 Bad Request error.

Filtering and Sorting with Pagination

Most list endpoints accept additional query parameters for filtering (e.g. user_id, contact_id, created_date_gte). You can combine filters with pagination—just include all parameters in every request, including cursor pages:
When syncing a large dataset for the first time, use sort=asc and limit=100 to minimize the number of requests. For incremental syncs, use created_date_gte with your last sync timestamp so you only fetch new records.