Skip to main content
Long lists come back in pages, like pages of search results. This applies to your campaigns, a campaign’s leads, a lead’s messages, and opt-outs. Every list response includes a pagination object: Pass nextCursor back exactly as you received it, and don’t build or edit a cursor yourself: its format differs between endpoints. /opt-outs rejects a cursor it didn’t issue with 400 invalid_params. The other list endpoints don’t check, so an edited cursor can return the wrong page. If a list is larger than the endpoint can read, the request fails with 413 result_too_large instead of returning part of it, so total and hasMore always describe the whole list.

Example: fetch every page