Pagination and rate limits
List endpoints use limit and offset. API clients have an hourly request cap; click-to-dial has a separate origination guard.
Pagination and rate limits
Pagination
List endpoints accept:
| Query | Default | Notes |
|---|---|---|
limit | 50 | Clamped to 1–100 |
offset | 0 | Records to skip |
search or q | — | Where the resource supports search |
sortBy / sortOrder | asc | Parsed on some list routes |
The success meta.pagination object:
hasMore is offset + limit < total. Walk pages until hasMore is false.
Chat messages also accept before (ISO timestamp) for cursor-style paging. When before is set, offset is not applied.
Rate-limit headers
Authenticated responses include:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per hour for this client |
X-RateLimit-Remaining | Remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
The hourly cap is set on the API client (default 1000, configurable 10–100000). Exceeding it returns RATE_LIMIT_EXCEEDED (429).
Click-to-dial origination
POST /click2dial has an additional per-user and per-tenant origination guard. Hitting it also returns RATE_LIMIT_EXCEEDED (429) with a message to slow down. This is separate from the hourly client cap.
CORS preflight
OPTIONS is supported on every documented route. Browser clients must send the standard headers (X-API-Key or Authorization, X-Tenant-Id, optional X-User-Email).