Access & visibility
Allow documents.GetFileDownload on your API key.
Workspace access by default. Private member data requires approved member delegation through Brigg-Act-As; the key supplies permissions while private ownership and project boundaries remain enforced.
Request fields
Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
file_idstringRequiredUse a file_id returned by this listing or by CompleteUpload. It is not an upload ID, storage path or filename. documents.ListDocuments.
At least 1 character.
Fetch the bytes
The response is JSON containing a URL, not the file bytes. Make a separate GET request to url, for example curl --fail --location "$DOWNLOAD_URL" --output agreement.pdf. Do not forward your Brigg API key or member header to that host. Treat the URL as a short-lived credential.
The URL identifies the verified version of this file and expires after five minutes. Request a new one if it expires before use. The file guide also provides a streaming server helper that performs both steps.
Response
Returns 200 OK with a JSON body.
urlstringRequiredTemporary bearer URL for a GET request. Fetch it exactly as returned without the Brigg Authorization or Brigg-Act-As headers. Keep it out of logs and obtain another URL after expiry.
filenamestringRequiredCurrent filename to use when saving the downloaded bytes.
expires_atnumberRequiredExpiry time in Unix milliseconds. Obtain a fresh transfer or download URL after expiry.
Errors & retries
This operation reads data. It needs no idempotency key and can be retried after a transient failure.
For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.
| HTTP status | Code | What to do |
|---|---|---|
| 400 | invalid_json |
Send a JSON object with Content-Type: application/json. |
| 400 | invalid_input |
Check the request fields and types. |
| 401 | invalid_key |
The workspace API key is missing, invalid or revoked. |
| 403 | forbidden |
Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | not_found |
The requested operation or resource is not available to this credential. |
| 429 | rate_limited |
Wait for Retry-After before retrying. |
| 409 | file_scan_blocked |
The file's scan prevents this download. Inspect details.scan_status. Do not repeatedly retry a threats_found, failed or unsupported verdict. Only the original uploader can retrieve an unsupported file as a forced download; it remains unavailable for processing. |
Next steps
JSON schemas
Use the complete schemas for validation or client generation.
Full request JSON schema
{
"type": "object",
"properties": {
"file_id": {
"type": "string",
"minLength": 1,
"description": "Use a file_id returned by this listing or by CompleteUpload. It is not an upload ID, storage path or filename. [documents.ListDocuments](/developers/reference/documents/ListDocuments)."
}
},
"required": [
"file_id"
],
"additionalProperties": false,
"examples": [
{
"file_id": "f_example"
}
]
}Full response JSON schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Temporary bearer URL for a GET request. Fetch it exactly as returned without the Brigg Authorization or Brigg-Act-As headers. Keep it out of logs and obtain another URL after expiry."
},
"filename": {
"type": "string",
"description": "Current filename to use when saving the downloaded bytes."
},
"expires_at": {
"type": "number",
"description": "Expiry time in Unix milliseconds. Obtain a fresh transfer or download URL after expiry."
}
},
"required": [
"url",
"filename",
"expires_at"
],
"additionalProperties": false,
"examples": [
{
"url": "https://example.com/temporary-download",
"filename": "Agreement.pdf",
"expires_at": 1794301500000
}
]
}