Skip to main content

Export Custom Report

POST 

/api/v2/custom-reports/:customReport/export

Export a saved report you can see.

Required scope: reports:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body:

  • format (string, optional, default csv): csv, xlsx or pdf

  • 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's label.

  • xlsx / pdf: JSON with filename, base64-encoded content and mime_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​

OK

Response Headers
    Content-Type
    Content-Disposition