Supermail
API reference

Pagination

How list endpoints page through large result sets with opaque cursor tokens.

List calls that can return many rows — today Events/list — use opaque cursor pagination.

How it works

  • Send page.size (a hint; 0 or an omitted page uses the server default) and omit page.token on the first call.
  • The response carries page.next_token. Pass it back as page.token on the next call to fetch the following page.
  • An absent page.next_token means there are no more rows.
First page
{ "account_id": "account_01H9X...", "page": { "size": 100 } }
Response
{ "events": [ /* … */ ], "page": { "next_token": "eyJ..." } }
Next page
{ "account_id": "account_01H9X...", "page": { "size": 100, "token": "eyJ..." } }

Rules

  • Page tokens are opaque. Do not construct, parse, or mutate them — a token encodes server-side cursor state and is only valid when passed back verbatim.
  • page.size is a hint, not a guarantee; the server may return fewer rows and still hand you a page.next_token. Stop when page.next_token is empty, not when a page looks short.
  • Pagination gives you a stable forward walk of the retained event log. There is no public tail; to receive new events as they happen, configure a webhook consumer.

On this page