Skip to main content
The IllumiChat API provides two pagination patterns depending on the endpoint and the nature of the data being returned. Offset-based pagination is used for static collections such as workspaces, assistants, and members. Cursor-based pagination is used for streaming or append-heavy data such as messages and webhook deliveries.

Offset-Based Pagination

Offset-based pagination uses limit and offset query parameters to control which slice of results is returned.

Response Shape

Every offset-paginated response includes the following top-level fields:

Examples

To iterate through all pages, increment offset by limit on each request until offset >= total.

Iterating Through All Pages


Cursor-Based Pagination

Cursor-based pagination uses an opaque cursor parameter and returns a nextCursor value. This pattern is more efficient for large, frequently changing datasets because it avoids the consistency issues inherent in offset-based pagination.

Response Shape

Examples

Cursor values are opaque and may change between API versions. Do not parse, construct, or store cursors for long-term use. Always obtain a fresh cursor from the most recent API response.

Choosing a Pattern

If an endpoint supports pagination, the documentation for that endpoint specifies which pattern is used. When in doubt, check the response shape: the presence of nextCursor indicates cursor-based pagination, while total and offset indicate offset-based pagination.