Skip to content

API reference

Create a download link for an export

POST
/v1/exports/{exportId}/links

Issues a link to the file of one succeeded export, for a person or tool that has no API key. The link is not an API key: it opens this one file, nothing else, and stops working when it expires, when it is revoked, when the key that issued it is revoked or expires, when the export is erased, or when the export’s connection is deleted (for Shopify and Google Ads, also disconnected). While a Shopify store’s SignalBraid app is uninstalled or its access revoked, or a connection set up in SignalBraid is paused or being set up again, or a GA4 connection is paused, or the account the export reads is paused or cancelled, the link answers 404 link_not_found, and no new link is issued (410 export_expired).

The link lives 10 minutes unless ttlSeconds asks for less or more, up to 15 minutes. The URL carries the secret; it is shown in this response only and cannot be read again. Treat it like a password until it expires. The link path, token included, is recorded in the platform’s Workers request logs until log redaction is in place, so keep links short-lived and revoke them when done.

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

How long the link lives, from 1 second to 15 minutes. Without it, 10 minutes.

integer
default: 600 >= 1 <= 900
Example
{
"ttlSeconds": 600
}

The link.

A download link. url holds the secret and is returned once.

object
linkId
required

A stable handle for the link. It is not the secret and opens nothing.

string
/^[A-Za-z0-9_-]{1,128}$/
exportId
required
string
/^[A-Za-z0-9_-]{1,128}$/
url
required
string format: uri
/^https://[^/?#]+/v1/export-links/[A-Za-z0-9_-]{43}$/
expiresAt
required
string format: date-time
Example
{
"linkId": "lnk_41c0d7e9b2",
"exportId": "exp_8d2c41f0a6",
"url": "https://api.signalbraid.com/v1/export-links/kP3x9mQ2vL7nR4tY8wZ1cB6dF0gH5jA2sE9uI3oK7aM",
"expiresAt": "2026-10-26T09:40:41.000Z"
}
Cache-Control
required
string
Allowed value: no-store

invalid_json — a body is present and is not valid JSON or not valid UTF-8.

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

invalid_export_request — an unknown field, or a ttlSeconds that is not a whole number from 1 to 900.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed values: invalid_json invalid_query invalid_export_request

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 methods 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: POST, DELETE

export_not_ready — the export is not succeeded, so there is no file to link.

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

request_too_large — REST bodies are capped at 4 KiB.

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

unsupported_media_type unless the body is application/json, or unsupported_encoding for any Content-Encoding other than identity.

object
error
required
object
code
required
string
message
required
string
error
object
code
Allowed values: unsupported_media_type unsupported_encoding

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