Docs pages
Pagination and syncing
Last updated: November 19, 2026
Cursors
Every list answers one page at a time:
GET /v1/bookings?status=scheduled&limit=100
{
"object": "list",
"data": [ { "id": "bkg_01jc8r2s4t6v8x0z2b4d6f8h0j", "object": "booking", "...": "..." } ],
"has_more": true,
"next_cursor": "eyJrIjpbIjIwMjYtMTEtMTJUMTY6MDA6MDBaIiwiYmtnXzAxai4uLiJdLCJmIjoiOWEzYyJ9"
}limitis 1 to 200, and 50 when you leave it out.- For the next page, send
cursorset tonext_cursor, with the same filters and sort.limitmay change between pages. next_cursorisnullon the last page, except onGET /v1/events.- A cursor is opaque and signed, and it doesn't expire. An edited cursor, or one sent with other filters or another sort, gets 400
invalid_cursor. - Each page continues from the last item's sort key and ID, so inserts and deletes while you page never skip or repeat an item whose sort key stays the same. Sorted by
updated_at, an object that changes while you page can come back on a later page. Dedupe onid. - Lists don't return a total count.
const headers = { Authorization: `Bearer ${process.env.CALVANA_API_KEY}` };
const url = new URL("https://api.calvana.com/v1/bookings");
url.searchParams.set("status", "scheduled");
url.searchParams.set("limit", "200");
const bookings = [];
for (;;) {
const response = await fetch(url, { headers });
if (!response.ok) throw new Error(`Calvana answered ${response.status}`);
const page = await response.json();
bookings.push(...page.data);
if (!page.has_more) break;
url.searchParams.set("cursor", page.next_cursor);
}Filters and sorting
- An ID filter takes one ID or a comma-separated list:
?calendar_id=cal_...,cal_.... An ID from outside the workspace gets 404.roleon members andtypeon events take lists too. statuson bookings and submissions takes one value.- Time filters are
<field>_afterand<field>_before, both exclusive, as RFC 3339 timestamps with an offset. sorttakes the values the list names. A leading-sorts descending.
| List | Filters | Sort |
|---|---|---|
GET /v1/bookings | calendar_id, host_member_id, prospect_id, form_id, status, start_after, start_before, created_after, updated_after | start_at (default), -start_at, -created_at, updated_at |
GET /v1/submissions | form_id, prospect_id, status, created_after, updated_after | -created_at (default), updated_at |
GET /v1/prospects | email (exact, any case), phone (exact, E.164), created_after, updated_after | -created_at (default), updated_at |
GET /v1/members | role, takes_calls, active | By name, then ID |
GET /v1/calendars | active | Oldest first |
GET /v1/forms | live, kind | Oldest first |
GET /v1/events | type, object_id, created_after, created_before | Log order |
Syncing with updated_after
To keep a copy of bookings, submissions or prospects, store the highest updated_at you have seen. On the next run, ask for updated_after that time minus 5 minutes, sorted by updated_at, and dedupe on id. The overlap catches a change from a long transaction that committed after a later change you already read.
GET /v1/bookings?updated_after=2026-11-12T15:55:00Z&sort=updated_at&limit=200updated_atis the time of the object's latest change that v1 shows. A change to any of the object's own fields moves it.- Some values change without moving it:
attendancegoing fromupcomingtounknownwhen a call's time passes with no outcome, a prospect'sform_progress, and summaries inside other objects, such as a booking'sprospect.email. Sync prospects as well to follow their email.
The event log
GET /v1/events is the log behind webhooks. It holds every event in the workspace from the last 30 days, in the order Calvana published them, with no gaps. A key sees only the events about objects it may read. Poll it when your server was down longer than the 3-day retry schedule, or when you would rather not run an inbound URL.
next_cursoris nevernull. At the end of the loghas_moreis false andnext_cursorpoints past the last event, so you store it and ask again later.- The first call without a cursor starts at the oldest event the log keeps.
object_idtakes a full ID, sosub_Xandbkg_Xselect different events about the same form attempt.
// Run on a schedule. Store the cursor it returns and pass it to the next run.
async function pollEvents(cursor, handle) {
const headers = { Authorization: `Bearer ${process.env.CALVANA_API_KEY}` };
for (;;) {
const url = new URL("https://api.calvana.com/v1/events");
url.searchParams.set("limit", "200");
if (cursor) url.searchParams.set("cursor", cursor);
const response = await fetch(url, { headers });
if (!response.ok) throw new Error(`Calvana answered ${response.status}`);
const page = await response.json();
for (const event of page.data) await handle(event);
cursor = page.next_cursor;
if (!page.has_more) return cursor;
}
}IDs that stop resolving
- Deleting a form deletes its answers and keeps its bookings. Its submissions then answer 404, and their bookings show
form: null,submission_id: nulland no answers. Calvana sendssubmission.deletedfor each. - An offboarded member stays readable with
active: false, so a booking's host always resolves. - A calendar with booked calls can't be deleted, so a booking's calendar always resolves.
Treat a 404 on an ID you stored as a deletion, not as an error in your data.