Skip to content

API reference

Download an export file

GET
/v1/exports/{exportId}/file

Streams the file of a succeeded export owned by the key’s workspace. The response is never cached or sniffed. Downloading is allowed while the workspace is paused.

A file whose export is expired or erased answers 410 export_expired, and so does a file whose connection was changed: for good once the connection is deleted (for Shopify and Google Ads, also once it is disconnected), for a Shopify store whose SignalBraid app was uninstalled or whose access was revoked until the app is installed again, for a connection set up in SignalBraid, for as long as it is paused or being set up again, and for as long as a GA4 connection is paused or the account the export reads is paused or cancelled. A connection change is answered before the export’s own progress, so an unfinished export of such a connection is 410, not 409 export_not_ready. A Parquet export’s file is Parquet (application/vnd.apache.parquet), as ClickHouse writes it: zstd-compressed, one column per field id in the order of fields, dates as DATE, integers as signed 64-bit integers, other numbers as 64-bit floats, text as UTF-8 strings, and no key-value metadata. A CSV export’s file is CSV: UTF-8, CRLF after every record, the last one included, a header row of field ids, an empty unquoted field for NULL and "" for an empty string (so in a one-column file a NULL record is a bare CRLF line), and a byte order mark only if the export asked for one. In a text column a value that starts with =, +, -, @, a tab or a carriage return is prefixed with a single quote; numeric columns are never altered.

The file of a YouTube export names its source in three response headers (SignalBraid-Source, SignalBraid-Source-Notice, SignalBraid-Source-Link) and in its filename (export-youtube-{exportId}.csv, or .parquet); the body keeps the contract above. Show the source with the values wherever the file is opened.

exportId
required
string
/^[A-Za-z0-9_-]{1,128}$/

The file.

string format: binary
Content-Disposition
required
string
/^attachment; filename="[A-Za-z0-9._-]{1,128}"$/

attachment with a filename the server builds (export-{exportId}.csv, or export-youtube-{exportId}.csv for a YouTube export; .parquet for a Parquet export); never taken from the request.

SignalBraid-Source
string
Allowed value: YouTube

Present on the file of a YouTube export only (the source the export status names as sourceAttribution.label). The CSV body is unchanged.

SignalBraid-Source-Notice
string
Allowed value: Data from YouTube. Values exactly as the YouTube Analytics API returned them.

Present on the file of a YouTube export only, with SignalBraid-Source.

SignalBraid-Source-Link
string
/^https://www\.youtube\.com/channel/UC[A-Za-z0-9_-]{22}$/

Present on the file of a YouTube export only, with SignalBraid-Source; the channel’s public YouTube page.

Cache-Control
required
string
Allowed value: no-store
X-Content-Type-Options
required
string
Allowed value: nosniff
Referrer-Policy
required
string
Allowed value: no-referrer

invalid_query — the URL carried a query delimiter. This route reads no query parameters.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: invalid_query

unauthorized — missing, unknown, expired or revoked key.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: unauthorized
WWW-Authenticate
required
string
Allowed value: Bearer

forbidden — the key lacks the required scope, or the workspace has no plan that allows this.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: forbidden

export_not_found — the workspace has no such export. An export of another workspace is indistinguishable from one that does not exist.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: export_not_found

method_not_allowed — Allow names the method this route accepts.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: method_not_allowed
Allow
required
string
Allowed value: GET

export_not_ready — the export is not succeeded yet, or it failed. Poll its status.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: export_not_ready

export_expired — the file is gone: removed after its 7 days (state expired), or removed because a field it carries was switched off for output (state erased), or not served because its connection was changed: for good once the connection is deleted (for Shopify and Google Ads, also once it is disconnected), for a Shopify store whose app was uninstalled or whose access was revoked until the app is installed again, for a connection set up in SignalBraid, for as long as it is paused or being set up again, and for as long as a GA4 connection is paused or the account the export reads is paused or cancelled; an unfinished export of such a connection is this 410 too, not 409 export_not_ready. On the link download an erased export is the same 404 link_not_found as an unknown link, and so is a file past its 7 days, because a link never outlives its file; the 410 listed on the link download is reserved and this version does not return it.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: export_expired

rate_limited — the key’s or its workspace’s per-plan request allowance for this route’s class is used up. It is answered after authentication, on every API-key operation in this document and on MCP, and never on /health. A download link is limited the same way, after its lookup, by the key that issued it and the export’s workspace. Retry-After is the window in seconds and RateLimit-Limit is the limit of the bucket that refused. No remaining count is returned. The limits themselves are not published here.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: rate_limited
Retry-After
required
string
/^[1-9][0-9]*$/
RateLimit-Limit
required
string
/^[1-9][0-9]*$/

export_unavailable — the export store could not be reached. Retry with backoff.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed value: export_unavailable