API
Imports endpoints
The Import tab in the dashboard uses these endpoints. Use them yourself when you want to script an import. They need an admin, an owner or an organization key.
Last updated .
How does an import run?
POST /sites/:siteId/importswithplatformset toumami,simple_analyticsorplausible. The response gives you animportIdand the dates your plan allows.POST /sites/:siteId/imports/:importId/eventswith a batch of rows inevents. Repeat for each batch. A request can be up to 50 MB.- Set
isLastBatchtotrueon the last batch. GET /sites/:siteId/importsto read the counts.
{ "data": [ { "importId": "3f6c2b1e-8d4a-4c1b-9e1f-2a7d5c9b0e11", "platform": "plausible", "importedEvents": 182000, "skippedEvents": 1200, "invalidEvents": 37, "startedAt": "2026-11-10 09:12:00", "completedAt": "2026-11-10 09:40:13" } ] }
The rows keep the column names of the tool they came from. Rows outside the allowed dates, or over the event limit for their month, are skipped and counted.
What can go wrong?
| Status | Meaning |
|---|---|
| 403 | The plan does not include data import |
| 429 | Another import is running in the organization |
| 413 | The batch is larger than 50 MB |
DELETE /sites/:siteId/imports/:importId removes a finished import and its events. A running import cannot be deleted.