[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcrm-document-templates\u002Flist":3,"docs-tabs-entities\u002Fcrm-document-templates\u002Flist":6},{"content":4,"lastmod":5},"## List CRM document templates\n\n`GET \u002Fv1\u002Fcrm-document-templates`\n\nReturns the CRM document templates of the Bitrix24 account with filtering, field selection and paginated output.\n\n## Parameters\n\n| Parameter | Type | Default | Description |\n|----------|-----|-----------|---------|\n| `filter` (query) | object | — | Filter by template fields, for example `active`, `id`, `entityTypeId`.\u003Cbr>[Filtering syntax](\u002Fdocs\u002Ffiltering). Example: `?filter[entityTypeId]=2_category_1`. Deal templates are matched only by funnel: the value `2` does not return them |\n| `select` (query) | string | all fields | Comma-separated field selection: `?select=id,name`. The `id`, `download` and `downloadMachine` fields are returned with any `select`. An unknown field name does not cause an error: with `select=foo` the items keep only these three fields |\n| `order` (query) | object | — | Accepted, for example `?order[sort]=ASC`, but does not change the output order. Sorting by a field that is not accepted, for example `order[ID]`, returns `422 BITRIX_ERROR` |\n| `start` (query) | number | `0` | Position of the next batch — the `meta.next` value from the previous response |\n\n**Pagination.** Request the next batch with `start` equal to `meta.next` from the previous response. `meta.next: null` means there are no more templates. An arbitrary `start` value does not shift the output: on a Bitrix24 account with 11 templates, `start=2` returned the same 11 templates as `start=0`, and `start=50` returned an empty `data.templates` with `meta.total: 11`.\n\n**Output order.** The keys of `data.templates` always go in ascending `id` order: requests with `order[sort]=ASC` and `order[name]=DESC` returned the templates in the same order. Apply the order you need on your side, for example by sorting `Object.values(data.templates)` by `sort`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\" \\\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\" \\\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', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconst templates = Object.values(data.templates)\nconsole.log(`Found ${meta.total} templates`, templates.map(t => t.name))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconst templates = Object.values(data.templates)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.templates` | object | Templates. The key is the template ID as a string, and the value is the template record |\n| `data.templates.{id}.id` | string | Template ID |\n| `data.templates.{id}.name` | string | Name |\n| `data.templates.{id}.active` | string | Availability: `Y` \u002F `N` |\n| `data.templates.{id}.code` | string \\| null | Symbolic code of the template, `null` — no code set |\n| `data.templates.{id}.region` | string | Template region, for example `uk` |\n| `data.templates.{id}.sort` | string | Position in the list |\n| `data.templates.{id}.createTime` | string | Creation date in ISO 8601 |\n| `data.templates.{id}.updateTime` | string | Modification date in ISO 8601 |\n| `data.templates.{id}.createdBy` | string | ID of the employee who created the template. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers) |\n| `data.templates.{id}.updatedBy` | string | ID of the employee who modified the template. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers) |\n| `data.templates.{id}.moduleId` | string | Owner module, always `crm` in this section |\n| `data.templates.{id}.numeratorId` | string | ID of the numerator that assigns numbers to documents |\n| `data.templates.{id}.withStamps` | string | Stamps and signatures: `Y` \u002F `N` |\n| `data.templates.{id}.productsTableVariant` | string | Variant of the product table in the document |\n| `data.templates.{id}.isDeleted` | string | Whether the template is marked as deleted: `Y` \u002F `N` |\n| `data.templates.{id}.isDefault` | string | Default template: `Y` \u002F `N` |\n| `data.templates.{id}.download` | string | URL for downloading the template file in the Bitrix24 web interface. To download through the API, use `downloadMachine` |\n| `data.templates.{id}.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| `meta.total` | number | Number of templates matching the filter |\n| `meta.start` | number | The `start` value from the request |\n| `meta.next` | number \\| null | The `start` value for the next batch. `null` — there are no more templates |\n\n## Response example\n\nShowing 3 of 11 templates.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"templates\": {\n      \"87\": {\n        \"id\": \"87\",\n        \"active\": \"Y\",\n        \"name\": \"Addresses\",\n        \"code\": null,\n        \"region\": \"uk\",\n        \"sort\": \"366\",\n        \"createTime\": \"2022-11-23T14:42:12+00:00\",\n        \"updateTime\": \"2023-01-17T11:36:04+00:00\",\n        \"createdBy\": \"1\",\n        \"updatedBy\": \"1\",\n        \"moduleId\": \"crm\",\n        \"numeratorId\": \"1\",\n        \"withStamps\": \"Y\",\n        \"productsTableVariant\": \"\",\n        \"isDeleted\": \"N\",\n        \"isDefault\": \"N\",\n        \"download\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fbitrix\u002Fservices\u002Fmain\u002Fajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=87\",\n        \"downloadMachine\": \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F87\u002Fdownload\"\n      },\n      \"129\": {\n        \"id\": \"129\",\n        \"active\": \"Y\",\n        \"name\": \"Product link\",\n        \"code\": null,\n        \"region\": \"uk\",\n        \"sort\": \"900\",\n        \"createTime\": \"2023-05-16T18:43:02+00:00\",\n        \"updateTime\": \"2023-05-16T18:49:36+00:00\",\n        \"createdBy\": \"1\",\n        \"updatedBy\": \"1\",\n        \"moduleId\": \"crm\",\n        \"numeratorId\": \"1\",\n        \"withStamps\": \"Y\",\n        \"productsTableVariant\": \"\",\n        \"isDeleted\": \"N\",\n        \"isDefault\": \"N\",\n        \"download\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fbitrix\u002Fservices\u002Fmain\u002Fajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=129\",\n        \"downloadMachine\": \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F129\u002Fdownload\"\n      },\n      \"249\": {\n        \"id\": \"249\",\n        \"active\": \"Y\",\n        \"name\": \"Demo product sale\",\n        \"code\": null,\n        \"region\": \"uk\",\n        \"sort\": \"500\",\n        \"createTime\": \"2026-08-19T14:55:23+00:00\",\n        \"updateTime\": \"2026-08-19T14:55:23+00:00\",\n        \"createdBy\": \"1\",\n        \"updatedBy\": null,\n        \"moduleId\": \"crm\",\n        \"numeratorId\": \"1095\",\n        \"withStamps\": \"N\",\n        \"productsTableVariant\": \"\",\n        \"isDeleted\": \"N\",\n        \"isDefault\": \"N\",\n        \"download\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fbitrix\u002Fservices\u002Fmain\u002Fajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=249\",\n        \"downloadMachine\": \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-document-templates\u002F249\u002Fdownload\"\n      }\n    }\n  },\n  \"meta\": {\n    \"total\": 11,\n    \"start\": 0,\n    \"next\": null\n  }\n}\n```\n\n## Error response example\n\n400 — `start` is not a non-negative integer:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_START\",\n    \"message\": \"start must be one non-negative safe integer.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_START` | `start` is not a non-negative integer or is passed in the request more than once |\n| 400 | `INVALID_PARAMS` | `select` is empty, or `filter` or `order` is not passed as an object |\n| 400 | `UNKNOWN_FILTER_FIELD` | Filter by a field that is not accepted, for example `filter[foo]` |\n| 422 | `BITRIX_ERROR` | Sorting by a field that is not accepted, for example `order[ID]`. `error.b24Code` contains `INVALID_ARG_VALUE` |\n| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |\n| 401 | `TOKEN_MISSING` | The key has no configured tokens |\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## Known specifics\n\n**Bindings and access permissions are returned only in the single-template response.** List items have no `entityTypeId` and `users` fields. The record types the template is bound to and the access codes are returned by [Get a CRM document template](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fget).\n\n## See also\n\n- [Get a CRM document template](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fget)\n- [Get templates for a CRM record](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Favailable)\n- [Create a template](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fcreate)\n- [Download a template](\u002Fdocs\u002Fentities\u002Fcrm-document-templates\u002Fdownload)\n- [CRM document templates](\u002Fdocs\u002Fentities\u002Fcrm-document-templates)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n","2026-10-09",{},1795415216980]