Data Export API

Download raw events and reporting summaries as CSV or ZIP files with a workspace API key.

Last updated August 28, 2026

Use the Data Export API for scheduled backups, spreadsheet imports, and external reporting. The API returns one selected category as CSV or multiple categories as a ZIP containing one CSV per category. Create a key in Settings > API Keys and send it as a bearer token.

POST /api/v1/export

1curl https://usegrometrics.com/api/v1/export \2  -H "Authorization: Bearer YOUR_API_KEY" \3  -H "Content-Type: application/json" \4  --output grometrics-export.zip \5  -d '{6    "categories": ["events", "analytics", "revenue"],7    "range": "30d",8    "platform": "both"9  }'

Request body

FieldTypeRequiredDescription
categoriesstring arrayOne or more export categories: events, analytics, attribution, revenue, transactions, visitors, sources, campaigns, pages, geography, devices, goals, or funnels
rangestringnoRelative range: 7d, 30d, 90d, or all. Omit it when using startAt and endAt
startAtISO date stringnoCustom range start; endAt is required when this is present
endAtISO date stringnoCustom range end; startAt is required when this is present
platformstringExport scope: website, mobile, or both

Empty exports

A successful export with no matching rows still contains the canonical CSV headers and returns X-Grometrics-Empty-Export: true.

What happens next

Store the downloaded file securely. Raw event and transaction exports can contain identifiers and customer context from the selected workspace.

Troubleshooting

Request is unauthorized

Check that the Authorization header uses a valid, unrevoked API key from the workspace you want to export.

The response is CSV instead of ZIP

Selecting one applicable category returns CSV. Select two or more applicable categories to receive a ZIP.

Was this page helpful?

Data Export API — Grometrics Docs | Grometrics