Pagination
Which Zoie endpoints and MCP tools return results in pages, their page and limit parameters with defaults and maximums, and how to page through or sync the blocklist reliably.
Zoie uses simple page-number pagination: you ask for page (from 1) and limit (items per page). There are no cursors. Only list endpoints page. Everything else returns a single result.
HTTP endpoints
| Endpoint | Paginated | page default | limit default | limit maximum | Totals in the response |
|---|---|---|---|---|---|
GET /api/v1/public/blocklist | Yes | 1 | 50 | 200 | data.total, data.page, data.limit |
GET /api/v1/public/getServiceOptions/:business_id | Yes | 1 | 10 | 100 | pagination.totalRecords, pagination.currentPage, pagination.totalPages |
GET /api/v1/public/blocklist/check | No | — | — | — | One result |
GET /api/v1/public/forms/:id | No | — | — | — | One form |
POST /api/v1/public/submitForm | No | — | — | — | — |
Both paginated endpoints return results newest first.
Out-of-range values
Paging values are adjusted, never rejected:
| You send | Zoie uses |
|---|---|
A page below 1, or one that isn’t a number | 1 |
A limit above the maximum | The maximum |
limit=0, or a limit that isn’t a number | The default |
A negative limit | 1 |
A page past the last page | An empty list, with the real total |
Paging through the blocklist
Request pages until you’ve received total items, or a page comes back shorter than limit.
async function fetchAllBlocked(apiKey) {
const seen = new Map();
const limit = 200;
for (let page = 1; ; page++) {
const res = await fetch(
`https://api-us.zoie.ai/api/v1/public/blocklist?page=${page}&limit=${limit}`,
{ headers: { 'x-zoie-api-key': apiKey } }
);
if (res.status === 429) {
const wait = Number(res.headers.get('Retry-After') || 60);
await new Promise((r) => setTimeout(r, wait * 1000));
page--; // retry the same page
continue;
}
const { data } = await res.json();
for (const item of data.items) seen.set(item.id, item); // de-duplicate by id
if (data.items.length < limit || page * limit >= data.total) break;
}
return [...seen.values()];
}curl "https://api-us.zoie.ai/api/v1/public/blocklist?page=1&limit=200" \
-H "x-zoie-api-key: <API_KEY>"
curl "https://api-us.zoie.ai/api/v1/public/blocklist?page=2&limit=200" \
-H "x-zoie-api-key: <API_KEY>"Keeping a copy in sync
since returns only entries created at or after a time, which keeps regular syncs small:
curl "https://api-us.zoie.ai/api/v1/public/blocklist?since=2026-10-01T09:00:00Z&limit=200" \
-H "x-zoie-api-key: <API_KEY>"
- Use the time your previous sync started as the next
since, so entries created during a sync aren’t missed. sinceonly reports additions. Unblocking a contact removes it from the list without leaving a record, so an incremental sync never sees it go. Do a full pass now and then to drop unblocked contacts.- Opt-outs are left out unless you add
include_consent=true, on full and incremental passes alike.
If all you need is a yes or no for one contact at submission time, call GET /blocklist/check instead of keeping a copy.
MCP tools
MCP tools that return lists take the same page and limit inputs. Unlike the HTTP endpoints, MCP validates them strictly: a limit above the maximum, or a page below 1, fails the tool call instead of being adjusted.
| Tool | page default | limit default | limit maximum |
|---|---|---|---|
search_leads | 1 | 20 | 100 |
global_search | 1 | 20 | 100 |
list_appointment_leads | 1 | 20 | 100 |
list_campaigns | 1 | 20 | 100 |
get_lead_notes | 1 | 20 | 50 |
get_lead_notes returns page, limit, total and totalPages alongside the notes.
These tools aren’t paginated and return everything in one result:
get_conversation_by_leadreturns the whole thread, with each message’s text cut to 1,000 characters.get_lead_activity,list_team_members,list_my_businesses,list_conversation_channels,list_campaign_optionsandappointment_overview.appointment_calendaris bounded by itsview(month,weekorday) and date range instead.
tools/list returns all 29 tools in one response, without a cursor. See Available tools.