PureStats documentation
Exports through the management API
Create, check, cancel and download CSV exports with the PureStats management API, including its operations, permissions, job states, file expiry and limits.
There is no separate export API. Programmatic exports use the same jobs as the Exports page, through the management API at /api/v1/management/actions/{operationId}.
Operations
| Operation | Permission | What it does |
|---|---|---|
exports.create |
exports:write |
Queues a CSV export for a site. |
exports.list |
exports:read |
Lists your recent exports and their states. |
exports.status |
exports:read |
Returns the state of one export. |
exports.cancel |
exports:write |
Cancels an export that is queued, processing or failed. |
exports.download |
exports:read and visitors:read |
Downloads a completed export by its uuid. |
Every request is checked against the token's permissions and your current membership of the site. Viewers can create and download exports.
Create an export
{
"site_id": 123,
"type": "campaigns",
"from": "2026-10-01",
"to": "2026-10-31",
"traffic": "human",
"filters": {
"utm_campaign": "spring_launch"
}
}
type is one of overview, campaigns, events, commerce, explore, site_search, funnels, funnel_segments, funnel_paths, journeys, pageviews or raw_events. Instead of from and to, you can send a report period such as 7d or 28d. traffic is one of human, all, bot, ai, spam or suspicious.
Job states
An export moves through queued, processing and completed, or ends as failed or cancelled. A completed file can be downloaded for 14 days; after that the job is expired.
Limits
Each user can have up to three active exports (queued or processing) at a time. The list returns the 100 most recent jobs. For recurring summaries, a scheduled report is usually better than repeated exports.