Access & visibility
Allow documents.GetDocument 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_idstringRequiredStable file_id from ListDocuments, SearchDocuments, CompleteUpload or a document creation result. The same identity works across all document kinds.
At least 1 character.
Choose the next operation
Use kind and capabilities to choose a supported action. For an uploaded original, use Get file download directly or export as original. For collaborative text, Read text document returns Markdown and a revision for safe editing. Generated documents export as PDF or Word.
These capabilities describe the document under the current credential and selected data scope. Your API key also needs the next operation’s grant; capabilities never grant it. Internal source files and authoring commands are not exposed.
Response
Returns 200 OK with a JSON body.
file_idstringRequiredThe requested document's stable identity. Exports do not replace this source document.
kindstringRequiredfile is an uploaded original; text_document is collaborative Markdown; generated_document is a rendered Brigg document.
Allowed: "file", "text_document", "generated_document".
filenamestringRequiredCurrent document name. Text and generated documents need not have a filename extension.
scopestring or nullRequiredCurrent document collection: org is workspace-shared, user is personal, and resources is the resources collection. Null means no collection is recorded; it does not grant access. This is location metadata, not a request to move the document.
pathstringRequiredFolder path within the collection; empty means its root.
content_typestring or nullRequiredOriginal upload media type. Null for text and generated documents, whose export format determines their media type.
size_bytesnumber or nullRequiredOriginal upload byte length, or null when no original binary exists. Read the export result for its byte length.
scan_statusstring or nullRequiredMalware scan state. Threats and failed scans block downloads. An unsupported file cannot be processed; only its original uploader can retrieve it as a forced download. Null is not proof of readiness.
created_atnumberRequiredCreation time in Unix milliseconds.
created_bystring or nullRequiredAccount that created the record, or null when no account is recorded.
owner_account_idstring or nullRequiredMember who owns a private document, or null for a shared document. Access is still checked independently of this metadata.
entry_idstring or nullRequiredAttached record ID, or null when no record is associated.
capabilitiesobjectRequiredSupported public reads and exports under the current credential and selected data scope; these are advisory and never grant permissions.
Nested fields
readobject or nullRequiredNon-null only when current Markdown can be read with ReadTextDocument. Null does not mean the original file cannot be downloaded.
Nested fields
format"markdown"Requiredmarkdown identifies collaborative text readable through ReadTextDocument.
Always "markdown".
exportobjectRequiredFormats and revision selections that ExportDocument currently supports for this source.
Nested fields
formatsarray of stringRequiredFormats currently supported by ExportDocument for this document. original preserves uploaded bytes; md, pdf and docx render supported content. An empty list means export is unavailable.
Each item: "original", "md", "pdf", "docx".
revisionsarray of stringRequiredsaved selects the saved state; current includes the acting member’s own generated draft; version means an accessible saved version ID can be supplied. These are available selections, not version IDs.
Each item: "saved", "current", "version".
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 file does not exist or is not visible to this acting member. A known ID does not grant access. |
| 429 | rate_limited |
Wait for Retry-After before retrying. |
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": "Stable file_id from ListDocuments, SearchDocuments, CompleteUpload or a document creation result. The same identity works across all document kinds."
}
},
"required": [
"file_id"
],
"additionalProperties": false,
"examples": [
{
"file_id": "f_project_notes"
}
]
}Full response JSON schema
{
"type": "object",
"properties": {
"file_id": {
"type": "string",
"description": "The requested document's stable identity. Exports do not replace this source document."
},
"kind": {
"type": "string",
"enum": [
"file",
"text_document",
"generated_document"
],
"description": "file is an uploaded original; text_document is collaborative Markdown; generated_document is a rendered Brigg document."
},
"filename": {
"type": "string",
"description": "Current document name. Text and generated documents need not have a filename extension."
},
"scope": {
"type": [
"string",
"null"
],
"description": "Current document collection: org is workspace-shared, user is personal, and resources is the resources collection. Null means no collection is recorded; it does not grant access. This is location metadata, not a request to move the document."
},
"path": {
"type": "string",
"description": "Folder path within the collection; empty means its root."
},
"content_type": {
"type": [
"string",
"null"
],
"description": "Original upload media type. Null for text and generated documents, whose export format determines their media type."
},
"size_bytes": {
"type": [
"number",
"null"
],
"description": "Original upload byte length, or null when no original binary exists. Read the export result for its byte length."
},
"scan_status": {
"type": [
"string",
"null"
],
"description": "Malware scan state. Threats and failed scans block downloads. An unsupported file cannot be processed; only its original uploader can retrieve it as a forced download. Null is not proof of readiness."
},
"created_at": {
"type": "number",
"description": "Creation time in Unix milliseconds."
},
"created_by": {
"type": [
"string",
"null"
],
"description": "Account that created the record, or null when no account is recorded."
},
"owner_account_id": {
"type": [
"string",
"null"
],
"description": "Member who owns a private document, or null for a shared document. Access is still checked independently of this metadata."
},
"entry_id": {
"type": [
"string",
"null"
],
"description": "Attached record ID, or null when no record is associated."
},
"capabilities": {
"type": "object",
"properties": {
"read": {
"type": [
"object",
"null"
],
"properties": {
"format": {
"type": "string",
"const": "markdown",
"description": "markdown identifies collaborative text readable through ReadTextDocument."
}
},
"additionalProperties": false,
"required": [
"format"
],
"description": "Non-null only when current Markdown can be read with ReadTextDocument. Null does not mean the original file cannot be downloaded."
},
"export": {
"type": "object",
"properties": {
"formats": {
"type": "array",
"items": {
"type": "string",
"enum": [
"original",
"md",
"pdf",
"docx"
]
},
"description": "Formats currently supported by ExportDocument for this document. original preserves uploaded bytes; md, pdf and docx render supported content. An empty list means export is unavailable."
},
"revisions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"saved",
"current",
"version"
]
},
"description": "saved selects the saved state; current includes the acting member’s own generated draft; version means an accessible saved version ID can be supplied. These are available selections, not version IDs."
}
},
"required": [
"formats",
"revisions"
],
"additionalProperties": false,
"description": "Formats and revision selections that ExportDocument currently supports for this source."
},
"unavailable": {
"type": [
"string",
"null"
],
"description": "scan_blocked means the original bytes are blocked; collab_unavailable means live collaborative content is unavailable. Null means neither condition applies. An explicit historical text version may still be exportable without live collaboration."
}
},
"required": [
"read",
"export",
"unavailable"
],
"additionalProperties": false,
"description": "Supported public reads and exports under the current credential and selected data scope; these are advisory and never grant permissions."
}
},
"required": [
"file_id",
"kind",
"filename",
"scope",
"path",
"content_type",
"size_bytes",
"scan_status",
"created_at",
"created_by",
"owner_account_id",
"entry_id",
"capabilities"
],
"additionalProperties": false,
"examples": [
{
"file_id": "f_project_notes",
"kind": "text_document",
"filename": "Project notes",
"scope": "org",
"path": "Projects",
"content_type": null,
"size_bytes": null,
"scan_status": null,
"created_at": 1794301200000,
"created_by": "a_alex",
"owner_account_id": null,
"entry_id": null,
"capabilities": {
"read": {
"format": "markdown"
},
"export": {
"formats": [
"md",
"pdf",
"docx"
],
"revisions": [
"saved",
"current",
"version"
]
},
"unavailable": null
}
}
]
}