Guide: API reference ·
Topic: Pagination
The important part
Lists do not all use the same paging contract. Follow the endpoint’s response shape and preserve its filters between requests.
- Use the paging shape documented for the specific endpoint.
- Keep filters fixed between pages; do not treat one response as a complete account export.
Phone numbers: cursor paging
CallGET /v1/phone-numbers?limit=1 to opt into paging. The limit is 1 to 100. Supplying a cursor without a limit uses 50. A request with neither limit nor cursor keeps the original response without cursor fields.
Send the returned cursor as the next request’s URL-encoded
cursor. Keep the same account and filters, including optional agent_id. Do not construct, decode, or alter a cursor. Order is newest creation first, then phone number descending; missing creation dates come last.
Stop when has_more is false and next_cursor is null. An empty page is valid. Stop if a cursor repeats. A cursor for a different account or filter, or an invalid limit, returns 400 invalid_number_query.
Agents: offset paging
The response is a bare array. Increase
offset by the number returned. Stop on an empty page or one shorter than the limit. Invalid values return 400 invalid_agent_list; signs, fractions, and leading zeros in numeric query strings are not accepted.
Order is creation time descending, then agent ID descending. Offset reads are not a fixed snapshot: concurrent writes can move rows. Deduplicate by ID and use a fresh scan when completeness matters.
Other lists
Voice catalog cursors can expire; restart at the first page aftercursor_expired. Organisation Activity returns next_cursor, but the next request sends it as before. Its JSON page size is 50; keep date and actor filters consistent. An exact full page can require one final empty request.
Calls, campaigns, inboxes, and knowledge lists have their own filters and envelopes. Do not send a generic page or cursor to every endpoint. Check the operation first.
Invalid request example
error.code = invalid_number_query. Correct the limit before another request. See the error catalog and retry guidance.