Developers
Download platform documents by id.
GET /documents/{id}/download Download a document by id/documents/{id}/downloadDownload a document by id
Returns the original file bytes for a platform document (permanent URL). The document must belong to your account.
Required permission:
documents:files.read (Documents › Files › Read)
Pagination: Not paginated: returns the full set.
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
200 The document file · application/octet-stream
401 Missing or invalid Bearer token. · application/json
| Name | Type | Description |
|---|---|---|
error | string | Human-readable error message |
required_permission | string | Present on 403 - the missing permission (area:resource.action) |
403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json
| Name | Type | Description |
|---|---|---|
error | string | Human-readable error message |
required_permission | string | Present on 403 - the missing permission (area:resource.action) |
404 Resource not found (or belongs to a different tenant). · application/json
| Name | Type | Description |
|---|---|---|
error | string | Human-readable error message |
required_permission | string | Present on 403 - the missing permission (area:resource.action) |
429 Rate limit exceeded. · application/json
| Name | Type | Description |
|---|---|---|
error | string | Human-readable error message |
required_permission | string | Present on 403 - the missing permission (area:resource.action) |
curl -X GET "https://app.bm.consulting/api/v1/documents/<id>/download" \
-H "Authorization: Bearer $BMC_TOKEN" \
-o fichero const res = await fetch("https://app.bm.consulting/api/v1/documents/<id>/download", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.BMC_TOKEN}`,
},
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const file = Buffer.from(await res.arrayBuffer()); import os
import requests
res = requests.get(
"https://app.bm.consulting/api/v1/documents/<id>/download",
headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
timeout=30,
)
res.raise_for_status()
contenido = res.content