Pagination
All list endpoints return paginated results. The Sunset API supports both page-based and cursor-based pagination.Page-Based Pagination
The default pagination method. Use query parameters to control the page, page size, and sort order.Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed). |
per_page | integer | 25 | Items per page (max 100). |
sort_by | string | varies | Field to sort by. Available values depend on the endpoint. |
sort_order | string | desc | Sort direction: asc or desc. |
Example Request
| Field | Description |
|---|---|
page | Current page number. |
per_page | Items per page for this request. |
total_count | Total number of items across all pages. |
total_pages | Total number of pages. |
next_cursor | Cursor for the next page (null when using page-based pagination or on the last page). |
has_more | Whether more results exist beyond this page. |
Cursor-Based Pagination
For high-volume resources (transactions, balance history, phone calls), cursor-based pagination is recommended. It provides consistent results even when new records are added between requests.How It Works
- Make your first request without a cursor:
- Use the
cursorparameter for subsequent requests:

