The ChatGrid API uses cursor-based pagination for all list endpoints. This approach is more reliable than offset pagination when data is being created or deleted between requests.Documentation Index
Fetch the complete documentation index at: https://docs.chatgrid.ai/llms.txt
Use this file to discover all available pages before exploring further.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Number of items per page (1-100) |
cursor | string | — | Opaque cursor from a previous response |
order | string | desc | Sort direction: asc or desc (by created_at) |
The Messages endpoint defaults to
order=asc (chronological) instead of
desc. All other endpoints default to desc (newest first).Response format
Every list response includes pagination metadata:| Field | Type | Description |
|---|---|---|
data | array | The items for this page |
has_more | boolean | true if there are more items beyond this page |
cursor | string or null | Pass this value as the cursor query parameter to get the next page. null when there are no more pages. |
Fetching all pages
To iterate through all results, keep fetching whilehas_more is true:
How cursors work
Cursors are base64url-encoded JSON containing theid and created_at of the
last item on the current page. The server uses these values for a keyset query,
which is efficient even on large datasets.
Cursors are opaque — do not decode or construct them manually. They may change
format without notice. Always use the cursor value returned by the API.
Tips
- Start with a reasonable
limit. 50 is a good default. Use 100 only if you need to minimize round trips. - Cursors do not expire but they become invalid if the referenced row is
deleted. If you receive an
invalid_cursorerror, restart pagination from the beginning. - Combine with filters. You can use
cursoralongside filters liketype,node_id,source_node_id, orstatus. The cursor is always relative to the filtered result set.