Pagination

Every list endpoint returns:

ts
{ data: T[], cursor: string | null, has_more: boolean }

Pass the returned cursor to the next call to walk the page chain.

Manual paging

ts
let cursor: string | undefined;while (true) { const page = await roger.conversations.list({ status: "open", cursor }); for (const conv of page.data) { console.log(conv.id, conv.subject); } if (!page.has_more) break; cursor = page.cursor ?? undefined;}

Auto-walking — listAll()

Most list resources expose an async iterator that handles paging for you:

ts
for await (const conv of roger.conversations.listAll({ status: "open" })) { console.log(conv.id, conv.subject);}for await (const contact of roger.contacts.listAll({ q: "@acme.com" })) { console.log(contact.email);}

Each call to next() lazily fetches the next page only when the current one is exhausted. Stop iterating early to avoid the next request.

Limits

EndpointDefault limitMax
Conversations50100
Messages100100
Contacts50100
KB articles50100
Forms(no pagination yet)
Beacons(no pagination yet)

Sorting

ts
await roger.conversations.list({ status: "open", // Underlying API supports `sort` + `order` parameters. Pass them via // the resource client when you need them:} as any);

For full sort flexibility on edge cases, drop to a raw fetch with the SDK's http client or use the v1 API directly.

Ask a question... ⌘I