Pagination
Cursor pagination (lists)
List endpoints – keys, audit log, conversions, leads, sync runs, ad entities, events – return a page and an opaque cursor:
{ "data": [ … ], "nextCursor": "eyJhdCI6IjIwMjYtMTAtMTRUMTI6MDA6MDBaIiwiaWQiOiI…" }Pass it back unchanged to get the next page; nextCursor: null means there is nothing more.
curl -H "Authorization: Bearer $X3_SECRET_KEY" \
"https://api.3x.example/v1/projects/my-site/conversions?limit=100&cursor=eyJhdCI6…"limitdefaults per endpoint (usually 50) and is capped (usually 200); the reference lists both.- Cursors are stable under inserts: new rows never shift a page you are reading.
- Do not build cursors yourself – their format may change. An invalid cursor is a 400
bad_request. - Keep the other parameters identical between pages; a cursor is only meaningful for the filter that produced it.
Sorting, filtering and search (list contract)
The table lists – sessions, leads, conversions, journeys, the ad report, the audit log and the MCP call history – share one contract
for sorting, column filters, search and field selection. The API reference lists the columns of
each endpoint; unknown columns, operators or values answer 422 validation_error with the
parameter in errors[].path.
| Parameter | Example | Meaning |
|---|---|---|
sort | sort=engaged:desc,pages:asc | up to 3 columns, each column:asc or column:desc; a single column without :dir takes dir |
f.<column> | f.device=in:mobile,tablet | one filter per column, <operator>:<value> |
q | q=herbst | search over the list's text columns (leads: name search) |
fields | fields=started_at,device,engaged | columns of CSV exports and MCP output, in this order |
cursor, limit | cursor=eyJz… | keyset page (the cursor belongs to its sort order) |
count | count=capped | sessions, leads, conversions: total counted up to 10 000, then totalCapped: true |
Operators by column type:
- text:
eq,in,contains,isEmpty–f.utm_campaign=contains:herbst,f.exit_page=isEmpty - number:
eq,gte,lte,between,isEmpty–f.engaged=between:30,600(durations in seconds) - date:
after,before,between,isEmpty–f.started_at=after:2026-10-01; days are inclusive and in the project time zone, a date-time is an exact instant - enum:
eq,in,isEmpty– values as in the reference, e.g.f.channel=in:google_ads,meta - boolean:
eq–f.has_lead=eq:true
in and between take comma-separated values; a literal comma or backslash inside a value is
escaped with a backslash (f.utm_campaign=in:a\,b,c). isEmpty:false means „has a value“.
curl -H "Authorization: Bearer $X3_SECRET_KEY" \
"https://api.3x.example/v1/projects/my-site/sessions?preset=30d&sort=relevance:desc,engaged:desc&f.device=in:mobile&f.engaged=gte:30&count=capped"The response carries the effective sort, nextCursor and – where counted – total. Pass
nextCursor back with the same sort and filters; a cursor of another sort order is a 400.
Sessions explorer
GET /v1/projects/{project}/sessions keeps its offset paging (offset ≤ 100 000, nextOffset)
for existing clients; cursor (keyset, from nextCursor) wins over offset and has no depth limit.
The column recording (f.recording=in:recording, also in the CSV) says whether a visit has a recording
(only with recordings:read) or can be reconstructed from its click and scroll data.
count defaults to exact; use count=capped or count=none for large ranges.
Pages and videos
GET …/analytics/pages and GET …/analytics/videos aggregate the range first (pages: at most 2 000,
truncated: true beyond; videos: every video with at least one play) and then apply sort,
f.<column>, q and an offset cursor to the aggregated rows; total counts the matching rows.
Without any list parameter both keep their old order (pages by pageviews, videos by plays) and
shape. Pages also take model for the counting rule of the entry-based leads column (qualifiedLeads = those
not marked disqualified; interested and hot count the entries above the project's interest thresholds), e.g.
…/analytics/pages?preset=30d&sort=leads:desc,sessions:desc&f.entries=gte:10&q=/blog.
Live events
GET …/events/live (long poll) filters with names, page (part of the path, case-insensitive),
session (one visit id) and channels (comma-separated); filtered-out rows still advance the cursor.
Organization lists
GET /v1/orgs/{org}/audit (audit log) and GET /v1/orgs/{org}/mcp-calls (every MCP tool call of the
organization: tool, result, client, duration, redacted error – never the arguments) need org:admin
and take the same sort, f.<column>, q, cursor, limit and count=capped, plus project=<id>
for one project. The audit log still accepts its old numeric cursor with the default sort. Dates
are compared in Europe/Berlin days.
CSV exports of a view
GET …/sessions/export.csv, GET …/conversions/export.csv, GET …/journeys/export.csv, GET …/leads/view.csv, GET …/recordings/export.csv, GET /v1/orgs/{org}/audit/export.csv and GET /v1/orgs/{org}/mcp-calls/export.csv take the
same filter, sort, column filters and search as their list and stream every matching row (at most
50 000) as UTF-8 CSV with a header row in locale (de/en). fields picks the columns and their
order. Enum values are written as their labels, booleans as ja/nein (yes/no), dates as ISO 8601.
The leads view export carries display names only – the contact export is GET …/leads.csv. In the
journeys list and export the lead columns (lead, lead_status) need leads:summary or leads:read:
without it they are left out, and sorting or filtering by them answers 403. journeys.list also takes
count=capped for a total.
Aggregates
Analytics endpoints (…/analytics/*) return complete aggregates for the filter and are not paged.
Breakdowns take limit (≤ 200) and min_sessions; the rows beyond the limit are summed into an
other row where the endpoint says so, so totals always add up.