How does API pagination work?
Download MarkdownMost list endpoints take limit and offset. limit defaults to 50 and must be 1 to 200. offset defaults to 0 and must be 0 to 1,000,000. A value outside those ranges is refused with a 400 bad_request rather than quietly clamped, so
Most list endpoints take limit and offset. limit defaults to 50 and must be 1 to 200. offset defaults to 0 and must be 0 to 1,000,000. A value outside those ranges is refused with a 400 bad_request rather than quietly clamped, so you always know.
A list response is an object holding items, total, limit, and offset. Read total once and decide whether a second page is worth fetching.
Two endpoints differ. The coaching saved-reports list uses a cursor instead of an offset, with limit 1 to 100 defaulting to 25, and it refuses a half-supplied cursor pair. The older per-campaign Lead API defaults limit to 100 with a maximum of 500.
Related Articles
- What can the CloseMagnet API do?It reads almost everything in your account, and what it writes is deliberately narrow. Its endpoints span 17 domains and the large majority are read-only. The ones that write do one of these things:
- How do I create an API credential?Only the account owner can mint one, and it happens at Settings -> API.
- What is the difference between my account API token and a scoped credential?Your account API token was minted automatically when the account was created. It sits pinned as the first row in Settings -> API with the type "Automatic", carries a fixed set of scopes, can be revealed again at any time, and can
- How do I rotate or revoke a credential?It depends which kind you have, and only the account owner can do either one.