Analytics
Export analytics
Queue a CSV or JSON export of your analytics and download it when the job finishes.
/v1/analytics/exportExporting analytics is asynchronous. This endpoint queues the work and returns a
job ID immediately; the file appears once the job
reports done.
Queue the export
POST /v1/analytics/export with the metrics, grouping, and date range you
want. It returns a jobId.
Poll the job
GET /v1/jobs/get-by-id?jobId=… every few seconds until status is done.
Download the file
The finished job carries a url. Fetch it to get the CSV or JSON.
Exports are capped at 20 per day
This endpoint allows 3 requests per minute and 20 per day per account — a far tighter budget than the rest of the API. Retry deliberately; a loop that retries on every failure will exhaust the day's allowance in minutes.
Exports are scoped to your own account
accountId is required in the body, but the export always covers the account
the API token belongs to.
Request body
accountIdstringrequiredYour account ID. Exports are always scoped to the account that owns the API token.
filterobjectrequiredAnalytics filter object. An empty object exports everything in the date range.
metricsobject[]requiredShow 2 propertiesHide properties
metricsobject[]requiredvaluestringrequiredtitlestringrequiredgroupByobject[]requiredShow 2 propertiesHide properties
groupByobject[]requiredvaluestringrequiredtitlestringrequiredsegmentsobject[]Show 2 propertiesHide properties
segmentsobject[]valuestringrequiredtitlestringrequiredstartDatestringrequiredFirst day of the range, as `YYYY-MM-DD`.
endDatestringrequiredLast day of the range, as `YYYY-MM-DD`.
formatenumOutput format. Defaults to `csv`.
One of: csv, json
Response · 200
okbooleanrequiredjobIdstringrequiredPoll this with the jobs endpoint until the export finishes.
fileNamestringrequiredStorage path the finished export is written to.
Example response
{
"ok": true,
"jobId": "JkLmNoPqRsTuVwXy",
"fileName": "accounts/YOUR_ACCOUNT_ID/analytics/2026-08-11/JkLmNoPqRsTuVwXy.csv"
}Errors: 400, 401, 404, 405, 429, 500. See Errors for the response shape.