Skip to main content
All list endpoints return a consistent paginated response shape.

Response format

{
  "customers": [...],
  "total": 2783,
  "hasMore": true,
  "nextCursor": "eyJpZCI6IjEyMyJ9"
}
FieldTypeDescription
[resource]arrayThe list of items (e.g. customers, events, invoices)
totalnumberTotal count of items in the collection — unaffected by limit
hasMorebooleantrue if more results exist beyond this page
nextCursorstringCursor to pass in the next request — absent when hasMore is false

Request parameters

ParameterDefaultMaxDescription
limit101,000Number of items to return
cursorCursor from the previous response to fetch the next page

Iterating all pages

async function fetchAll<T>(
  fetchPage: (cursor?: string) => Promise<{ data: T[]; hasMore: boolean; nextCursor?: string }>
): Promise<T[]> {
  const results: T[] = [];
  let cursor: string | undefined;

  do {
    const page = await fetchPage(cursor);
    results.push(...page.data);
    cursor = page.nextCursor;
  } while (page.hasMore);

  return results;
}