API pagination (page, per_page and cursor)
How to paginate Omnifox API list endpoints with page/per_page or with cursor-based pagination.
Endpoints that return lists (contacts, conversations, deals, board items, etc.) use pagination so you don't get thousands of records in a single response. Omnifox supports two styles: page-based pagination (the default) and cursor-based pagination.
Page-based pagination (default)
Parameters:
page: page number, starting at1.per_page: items per page, max100(default15).
The response includes:
{
"success": true,
"data": [ ... ],
"meta": { "current_page": 1, "last_page": 5, "per_page": 15, "total": 73, "from": 1, "to": 15 },
"links": { "first": "...", "last": "...", "prev": null, "next": "..." }
}
Use links.next directly to move forward without building the URL yourself.
Cursor-based pagination
Add ?pagination=cursor to the list request. The response shape changes:
{
"items": [ ... ],
"pagination": {
"next_cursor": 12345,
"previous_cursor": 12380,
"has_more": true,
"limit": 20
}
}
To request the next page, pass ?cursorId=12345 on the following call. This is the recommended mode for lists that change constantly (e.g. messages in an active conversation), because it doesn't skip or repeat records when new rows are inserted between pages.
Example: walking all contacts with a cursor
curl "https://app.omnifox.io/api/v1/contacts?pagination=cursor&limit=50" \
-H "Authorization: Bearer YOUR_TOKEN"
# next page:
curl "https://app.omnifox.io/api/v1/contacts?pagination=cursor&limit=50&cursorId=12345" \
-H "Authorization: Bearer YOUR_TOKEN"
Tips
- For bulk exports (thousands of records), prefer cursor pagination:
page/per_pageusesLIMIT/OFFSETunder the hood, which gets slow on very high page numbers. - Stop walking once
has_moreisfalseornext_cursorisnull.
Troubleshooting
- Records repeat or go missing while paging with
page: if the list is sorted by a field that changes (likelast_message_at), new rows being inserted can shift results between pages; switch to cursor pagination. per_pageabove 100 has no effect: the maximum allowed is 100; larger values get clamped.
Related articles
-
How to connect integrations and external apps
Connect Omnifox with your favorite tools from the integrations catalog in just a few steps.
-
Generate and use API keys and webhooks
Create API keys to access Omnifox programmatically and set up webhooks to receive real-time events.
-
Getting started with integrations (webhook / OAuth / API key)
Connect Omnifox with your other tools. Learn when to use a webhook, a gallery OAuth connection, or an API key.
-
The Omnifox REST API: introduction and plan requirements
What the Omnifox REST API is, which plan you need (Crece and up), how to authenticate with the X-API-Key header, and where the docs live.
-
Create a personal API key (PAT)
Learn how to generate your first personal API key in Omnifox to connect integrations, scripts, or external tools to your workspace.