Skip to main content
Endpoints that can return long lists are cursor-paginated. Their responses hold the records in data and the cursors in page_info:
For a walk through how the two directions fit together, see How cursor pagination works.

Query parameters

string
A page’s end_cursor. Returns the next page of older records. The record the cursor points to is not included. Accepted by every paginated endpoint.
string
A page’s start_cursor. Returns the page of records immediately newer than the cursor. The record the cursor points to is not included. Accepted only by the endpoints listed under Endpoints that accept before.
after and before can’t be sent in the same request. With neither, you get the newest page.

page_info

Every paginated endpoint returns has_next_page and end_cursor. Endpoints that accept before also return has_previous_page and start_cursor.

Ordering and page size

  • Records are ordered newest first on every page, including pages fetched with before.
  • The page size is fixed for each endpoint and can’t be changed: 100 for the endpoints that accept before, and 25 for the rest.

Cursors

  • A cursor is an opaque string. Don’t parse it or build one yourself.
  • Only use a cursor with the endpoint and the parent resource it came from. Don’t use a cursor from one campaign’s step logs for another campaign, or for the same campaign’s email events.

Endpoints that accept before

  • GET /campaigns/:id/execution_step_logs
  • GET /triggers/:id/execution_step_logs
  • GET /campaigns/:id/sent_email_events
  • GET /triggers/:id/sent_email_events
Every other paginated endpoint accepts only after. The API Reference tab lists the parameters for each endpoint.

Errors

Cursor problems return 422 in the usual error shape, with path set to the parameter at fault: