Pagination & Filtering
All list endpoints use cursor-based pagination and support a consistent filter syntax.
Pagination
Dalil uses cursor-based pagination. Unlike page numbers, cursors stay consistent even when records are added or removed between requests.
# Page 1
curl -G "https://app.usedalil.ai/rest/people" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "limit=20" \
--data-urlencode "order_by=createdAt[DescNullsLast]"
# Page 2 pass the last record's ID from page 1
curl -G "https://app.usedalil.ai/rest/people" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "limit=20" \
--data-urlencode "order_by=createdAt[DescNullsLast]" \
--data-urlencode "starting_after=550e8400-e29b-41d4-a716-446655440000"💡 When the response returns fewer records than your limit, you have reached the last page.
Filtering
Use the filter query parameter to narrow results. Multiple conditions are comma-separated and applied with AND logic.
Syntax
filter=field[comparator]:value💡 Filter strings contain
[ ] : characters that break raw URLs. Always URL-encode: use curl -G --data-urlencode "filter=..." or your HTTP library's query param builder.Comparators
Sorting
Use order_by=field[Direction]. Append NullsLast or NullsFirst to control null placement.
order_by=createdAt[DescNullsLast] # newest first
order_by=name[AscNullsLast] # alphabetical, nulls at end
order_by=closeDate[AscNullsFirst] # soonest close date first