Error format
When Reporting API rejects a request, you get an RFC 7807 problem document withContent-Type: application/problem+json, except for authentication failures. Problem documents have four fields:
Match on the last segment of
type (for example, invalid-column). Treat title and detail as display text. We may change their wording.
A missing or invalid token returns
401 application/json with a detail field.HTTP errors
Idempotency
idempotency_key is optional. It’s a string you supply, 1 to 128 characters.
- No key, or a new unused key: you get
201 Createdand a new run withstatus: QUEUED. - The same key with an identical request body: you get
200 OKand the run that key already created, a safe replay. - The same key with a different request body: you get
409with theidempotency-conflicttype.
Run failures
A run moves fromQUEUED to PROCESSING, then to SUCCEEDED or FAILED. When a run fails in the background, you get HTTP 200 with status: FAILED and an error object, not an HTTP error code. A timeout is one kind of FAILED, not a separate state.
To retry any failed run, create a new run. Don’t re-GET the same id.
Example flow
1. Create a runPOST /v2/reporting/runs returns 201 Created with status: QUEUED:
cURL
idempotency_key. Resending the same key with the same body returns 200 with the existing run; reusing it with a different body returns 409.
2. Poll
Poll GET /v2/reporting/runs/{run_id} until status is terminal (SUCCEEDED or FAILED). If processing time is exceeded, the run has status: FAILED and error.code: run_timeout.
3. Download
A SUCCEEDED run includes result.download. The signed URL expires at the result.download.expires timestamp (a UTC epoch second). If download.status is unavailable or the URL has expired, re-GET the run for a fresh one.
cURL
Authorization header.
Next steps
- Create and poll a report run for the full walkthrough
- Authentication for API token setup
- API reference: create a run · get a run