Pagination
Cursor-based pagination on every list endpoint.
The resource list endpoints — /v1/documents, /v1/memories, and the record lists (/v1/tickets, /v1/prs, …) — return newest records first, in a list envelope:
{
"object": "list",
"data": [ { "id": "…", "object": "ticket", "…": "…" } ],
"has_more": true,
"next_cursor": "WzE3NjA0…"
}Pass next_cursor back as cursor to fetch the next page, and stop when has_more is false:
let cursor: string | undefined;
do {
const url = new URL('https://api.synqed.dev/v1/tickets');
url.searchParams.set('limit', '100');
if (cursor) url.searchParams.set('cursor', cursor);
const page = await fetch(url, { headers }).then((r) => r.json());
for (const ticket of page.data) handle(ticket);
cursor = page.has_more ? page.next_cursor : undefined;
} while (cursor);limitis 1–100 (default 25).- Cursors are opaque — don't build or parse them.
GET /v1/agentsreturns up to 200 agents andGET /v1/rulesup to 500 rules, in one response.GET /v1/messagesreturns up to 200 messages oldest-first withhas_moreand anext_cursor; passnext_cursorascursorto continue (or to poll for new messages).- Because records outside the key's data access are skipped, a page can occasionally hold fewer than
limititems whilehas_moreis stilltrue. Keep paging untilhas_moreisfalse.