Pagination
List endpoints in the Helpdesk API use cursor-based pagination. This provides stable results even when data is being created or deleted between requests.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page[size] | integer | Number of items per page (default: 100, max: 200) |
page[after] | string | Cursor from the previous page’s response |
You can also use pageSize and pageAfter as aliases.
Response format
Every paginated response includes meta and links objects:
{
"tickets": [ ... ],
"meta": {
"hasMore": true,
"afterCursor": "dGt0X2FiYzEyMw"
},
"links": {
"next": "/api/v1/tickets?page[after]=dGt0X2FiYzEyMw&page[size]=100",
"prev": null
}
}
| Field | Description |
|---|---|
meta.hasMore | true if there are more results beyond this page |
meta.afterCursor | Cursor to pass as page[after] for the next page (null if no more results) |
links.next | Full URL for the next page (null if no more results) |
Iterating through pages
To fetch all results, follow the links.next URL or pass meta.afterCursor as page[after] until meta.hasMore is false:
# First page
curl "https://app.airclou.com/helpdesk/api/v1/tickets?page[size]=25" \
-H "Authorization: Bearer aclou_YOUR_KEY" \
-H "X-Workspace-Id: ws_your_workspace_id"
# Next page (using the afterCursor from the previous response)
curl "https://app.airclou.com/helpdesk/api/v1/tickets?page[size]=25&page[after]=dGt0X2FiYzEyMw" \
-H "Authorization: Bearer aclou_YOUR_KEY" \
-H "X-Workspace-Id: ws_your_workspace_id"
Sorting
Most list endpoints support sorting via sort_by and sort_order parameters. See each resource’s documentation for the available sort fields.
curl "https://app.airclou.com/helpdesk/api/v1/tickets?sort_by=updated_at&sort_order=desc" \
-H "Authorization: Bearer aclou_YOUR_KEY" \
-H "X-Workspace-Id: ws_your_workspace_id"