Pagination
Navigate large lists with cursor-based pagination.
All list endpoints use cursor-based pagination with a consistent response envelope.
List response format
Every list endpoint returns a Stripe-style envelope:
| Field | Type | Description |
|---|---|---|
object | string | Always "list" |
data | array | The page of results |
has_more | boolean | Whether more results exist after this page |
url | string | The API endpoint path |
request_id | string | Unique request identifier |
Pagination parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Number of results per page (1–100) |
starting_after | string | — | Cursor — the id of the last item from the previous page |
Example
Fetch the first page of sync jobs:
curl "https://api.example.com/v1/sync_jobs?limit=10"
-H "Authorization: Bearer sk_live_..." If has_more is true, fetch the next page using the last item’s id:
curl "https://api.example.com/v1/sync_jobs?limit=10&starting_after=sjob_abc123"
-H "Authorization: Bearer sk_live_..." Ordering
Results are ordered by createdAt descending (newest first). The cursor uses a composite key of (createdAt, id) for stable pagination even when items share the same timestamp.
Endpoints with pagination
| Endpoint | Resource |
|---|---|
GET /v1/sync_jobs | Sync jobs |
GET /v1/audit_log | Audit log entries |
Response
{
"object": "list",
"data": [
{ "id": "sjob_abc123", "status": "completed", "..." : "..." },
{ "id": "sjob_def456", "status": "pending", "..." : "..." }
],
"has_more": true,
"url": "/v1/sync_jobs",
"request_id": "req_abc123def456"
}