REST API
Pagination
Cursor pagination — items, nextCursor, cursor and limit.
Growing lists are paginated by cursor:
{ "items": [ … ], "nextCursor": "eyJ…" }- Pass
nextCursorback as thecursorparameter for the next page;null= last page. limitgoes from 1 to 100 (50 by default).- A cursor is opaque: do not build or edit it.
let cursor = null;
do {
const url = new URL("https://app.fanconvert.ai/public/v1/creators/emma-demo/conversations");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.FANCONVERT_API_KEY}` } });
const page = await res.json();
for (const conversation of page.items) console.log(conversation.id);
cursor = page.nextCursor;
} while (cursor);Last updated on