For AI agents: markdown of this page — /docs-content-en/entities/doc-templates/get.md documentation index — /llms.txt
Get template
GET /v1/doc-templates/:id
Returns a single document template by identifier.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionTemplate identifier |
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/doc-templates/209" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/doc-templates/209" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/doc-templates/209', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log('Template:', data.name)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/doc-templates/209', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionTemplate object |
Fielddata.id |
Typenumber | DescriptionTemplate identifier |
Fielddata.name |
Typestring | DescriptionName |
Fielddata.region |
Typestring | DescriptionRegion |
Fielddata.code |
Typestring | null | DescriptionSystem code of the template |
Fielddata.active |
Typestring | DescriptionAvailability: Y / N |
Fielddata.moduleId |
Typestring | DescriptionSource module of the template |
Fielddata.numeratorId |
Typenumber | DescriptionNumerator identifier |
Fielddata.withStamps |
Typestring | DescriptionStamps and signatures: Y / N |
Fielddata.sort |
Typenumber | DescriptionOrder in the list |
Fielddata.users |
Typeobject | DescriptionMap of employee identifiers with access to the template |
Fielddata.providers |
Typeobject | DescriptionTemplate data providers |
Fielddata.isDeleted |
Typeboolean | DescriptionWhether the template is marked as deleted |
Fielddata.createTime |
Typestring | DescriptionCreation date (ISO 8601) |
Fielddata.updateTime |
Typestring | DescriptionUpdate date (ISO 8601) |
Fielddata.download |
Typestring | DescriptionDocument download URL |
Fielddata.downloadMachine |
Typestring | DescriptionVibe API URL; requires X-Api-Key with documentgenerator scope |
Full template field schema — Template fields.
Response example
{
"success": true,
"data": {
"id": 209,
"name": "Contract template",
"region": "uk",
"code": null,
"download": "/bitrix/services/main/ajax.php?action=documentgenerator.api.template.download&SITE_ID=s1&id=209",
"active": "Y",
"moduleId": "rest",
"numeratorId": 1,
"withStamps": "N",
"providers": {
"bitrix\\documentgenerator\\dataprovider\\rest": "bitrix\\documentgenerator\\dataprovider\\rest"
},
"users": {
"U1": "U1"
},
"isDeleted": false,
"sort": 500,
"createTime": "2026-05-12T09:03:38.000Z",
"updateTime": "2026-05-12T09:03:38.000Z",
"downloadMachine": "https://vibecode.bitrix24.com/v1/doc-templates/209/download"
}
}
Error response example
404 — template not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Template was not found."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo template with the given id (message "Template was not found.") |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the documentgenerator scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured tokens |
Full list of common API errors — Errors.