Export Custom Report
POST/api/v2/custom-reports/:customReport/export
Export a saved report you can see.
reports:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
-
format(string, optional, defaultcsv):csv,xlsxorpdf -
pivot_grid(object, optional, XLSX only): a pre-computed pivot layout to write instead of the flat rows (see Export Ad-Hoc Report) -
csv: streamed file download (text/csv,Content-Disposition: attachment), up to 100,000 rows. Columns are headed by each column'slabel. -
xlsx/pdf: JSON withfilename, base64-encodedcontentandmime_type, up to 10,000 rows.
SQL reports are rate limited per user: by default 30 runs and exports combined per minute; over the limit the endpoint returns 429 with a Retry-After header (seconds). Returns 404 if the report is not visible to you and 422 for an unsupported format.
Authentication: Bearer token (Personal Access Token). Personal access tokens need the reports:write scope.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Unprocessable Entity
Response Headers
Too Many Requests