[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcrm-document-templates\u002Fget":3,"docs-tabs-entities\u002Fcrm-document-templates\u002Fget":6},{"content":4,"lastmod":5},"## Get a CRM document template\n\n`GET \u002Fv1\u002Fcrm-document-templates\u002F:id`\n\nReturns a single CRM document template by ID, together with the record types it is linked to and the employee access codes.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Template ID, a positive integer. List: [`GET \u002Fv1\u002Fcrm-document-templates`](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Flist) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F87\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F87\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F87', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Template:', data.name, 'linked to:', data.entityTypeId)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F87', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | The template |\n| `data.id` | string | Template ID |\n| `data.name` | string | Name |\n| `data.region` | string | Template region, for example `uk` |\n| `data.code` | string \\| null | Symbolic code of the template |\n| `data.active` | string | Availability: `Y` \u002F `N` |\n| `data.moduleId` | string | Owner module, always `crm` in this section |\n| `data.numeratorId` | string | ID of the numerator that assigns numbers to documents |\n| `data.withStamps` | string | Stamps and signatures: `Y` \u002F `N` |\n| `data.users` | object | Access codes of the employees who can see the template. The key and the value are identical and equal to the access code, for example `{\"UA\": \"UA\"}` means all employees |\n| `data.isDeleted` | string | Whether the template is marked as deleted: `Y` \u002F `N` |\n| `data.sort` | string | Sort order in the list |\n| `data.createTime` | string | Creation date in ISO 8601 |\n| `data.updateTime` | string | Modification date in ISO 8601 |\n| `data.entityTypeId` | array | CRM record types the template is linked to, as strings: `1` — lead, `3` — contact, `4` — company. Deals are broken down by funnel — `2_category_0`, `2_category_1` and so on, see [CRM document templates](\u002Fdocs\u002Fentities\u002Fcrm-document-templates) for details. A smart process with funnels is returned as `174_3`: the smart process type and the ID of its funnel. Smart process types: [`GET \u002Fv1\u002Fsmart-processes`](\u002Fdocs\u002Fentities\u002Fsmart-processes) |\n| `data.download` | string | Download URL of the template file in the Bitrix24 web interface. To download through the API, use `downloadMachine` |\n| `data.downloadMachine` | string | Link for downloading the template file through the Vibecode API — [`GET \u002Fv1\u002Fcrm-document-templates\u002F:id\u002Fdownload`](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fdownload) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"87\",\n    \"name\": \"Addresses\",\n    \"region\": \"uk\",\n    \"code\": null,\n    \"download\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fbitrix\u002Fservices\u002Fmain\u002Fajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=87\",\n    \"active\": \"Y\",\n    \"moduleId\": \"crm\",\n    \"numeratorId\": \"1\",\n    \"withStamps\": \"Y\",\n    \"users\": {\n      \"UA\": \"UA\"\n    },\n    \"isDeleted\": \"N\",\n    \"sort\": \"366\",\n    \"createTime\": \"2022-11-23T14:42:12+00:00\",\n    \"updateTime\": \"2023-01-17T11:36:04+00:00\",\n    \"entityTypeId\": [\n      \"4\",\n      \"3\",\n      \"2_category_0\",\n      \"2_category_1\",\n      \"2_category_3\",\n      \"174_3\",\n      \"177_7\",\n      \"177_9\",\n      \"185_11\",\n      \"1\",\n      \"31_5\"\n    ],\n    \"downloadMachine\": \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F87\u002Fdownload\"\n  }\n}\n```\n\n## Error response example\n\n404 — template not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"CRM template not found.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | There is no template with this `id` on the portal |\n| 404 | `ENTITY_NOT_FOUND` | A template with this `id` exists, but its `moduleId` is not `crm`, for example an application template. To read application templates, use [`GET \u002Fv1\u002Fdoc-templates\u002F:id`](\u002Fdocs\u002Fentities\u002Fdoc-templates\u002Fget) |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request to read the template. The reason is in `error.message` |\n| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |\n| 401 | `TOKEN_MISSING` | The key has no tokens configured |\n| 429 | `RATE_LIMITED` | Bitrix24 rate-limited requests to the portal. Retry after the delay in the `Retry-After` header |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List CRM document templates](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Flist)\n- [Get templates for a CRM record](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Favailable)\n- [Update a CRM document template](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fupdate)\n- [Download a template](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fdownload)\n- [CRM document templates](\u002Fdocs\u002Fentities\u002Fcrm-document-templates)\n","2026-10-09",{},1795415216862]