For AI agents: markdown of this page — /docs-content-en/entities/crm-document-templates/list.md documentation index — /llms.txt

List CRM document templates

GET /v1/crm-document-templates

Returns the CRM document templates of the Bitrix24 account with filtering, field selection and paginated output.

Parameters

Parameter Type Default Description
Parameterfilter (query) Typeobject Default— DescriptionFilter by template fields, for example active, id, entityTypeId.
Filtering syntax. Example: ?filter[entityTypeId]=2_category_1. Deal templates are matched only by funnel: the value 2 does not return them
Parameterselect (query) Typestring Defaultall fields DescriptionComma-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
Parameterorder (query) Typeobject Default— DescriptionAccepted, 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
Parameterstart (query) Typenumber Default0 DescriptionPosition of the next batch — the meta.next value from the previous response

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.

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.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/crm-document-templates" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/crm-document-templates" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-document-templates', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
const templates = Object.values(data.templates)
console.log(`Found ${meta.total} templates`, templates.map(t => t.name))

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-document-templates', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data, meta } = await res.json()
const templates = Object.values(data.templates)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.templates Typeobject DescriptionTemplates. The key is the template ID as a string, and the value is the template record
Fielddata.templates.{id}.id Typestring DescriptionTemplate ID
Fielddata.templates.{id}.name Typestring DescriptionName
Fielddata.templates.{id}.active Typestring DescriptionAvailability: Y / N
Fielddata.templates.{id}.code Typestring | null DescriptionSymbolic code of the template, null — no code set
Fielddata.templates.{id}.region Typestring DescriptionTemplate region, for example uk
Fielddata.templates.{id}.sort Typestring DescriptionPosition in the list
Fielddata.templates.{id}.createTime Typestring DescriptionCreation date in ISO 8601
Fielddata.templates.{id}.updateTime Typestring DescriptionModification date in ISO 8601
Fielddata.templates.{id}.createdBy Typestring DescriptionID of the employee who created the template. List: GET /v1/users
Fielddata.templates.{id}.updatedBy Typestring DescriptionID of the employee who modified the template. List: GET /v1/users
Fielddata.templates.{id}.moduleId Typestring DescriptionOwner module, always crm in this section
Fielddata.templates.{id}.numeratorId Typestring DescriptionID of the numerator that assigns numbers to documents
Fielddata.templates.{id}.withStamps Typestring DescriptionStamps and signatures: Y / N
Fielddata.templates.{id}.productsTableVariant Typestring DescriptionVariant of the product table in the document
Fielddata.templates.{id}.isDeleted Typestring DescriptionWhether the template is marked as deleted: Y / N
Fielddata.templates.{id}.isDefault Typestring DescriptionDefault template: Y / N
Fielddata.templates.{id}.download Typestring DescriptionURL for downloading the template file in the Bitrix24 web interface. To download through the API, use downloadMachine
Fielddata.templates.{id}.downloadMachine Typestring DescriptionLink for downloading the template file through the Vibecode API — GET /v1/crm-document-templates/:id/download
Fieldmeta.total Typenumber DescriptionNumber of templates matching the filter
Fieldmeta.start Typenumber DescriptionThe start value from the request
Fieldmeta.next Typenumber | null DescriptionThe start value for the next batch. null — there are no more templates

Response example

Showing 3 of 11 templates.

JSON
{
  "success": true,
  "data": {
    "templates": {
      "87": {
        "id": "87",
        "active": "Y",
        "name": "Addresses",
        "code": null,
        "region": "uk",
        "sort": "366",
        "createTime": "2022-11-23T14:42:12+00:00",
        "updateTime": "2023-01-17T11:36:04+00:00",
        "createdBy": "1",
        "updatedBy": "1",
        "moduleId": "crm",
        "numeratorId": "1",
        "withStamps": "Y",
        "productsTableVariant": "",
        "isDeleted": "N",
        "isDefault": "N",
        "download": "https://example.bitrix24.com/bitrix/services/main/ajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=87",
        "downloadMachine": "https://vibecode.bitrix24.com/v1/crm-document-templates/87/download"
      },
      "129": {
        "id": "129",
        "active": "Y",
        "name": "Product link",
        "code": null,
        "region": "uk",
        "sort": "900",
        "createTime": "2023-05-16T18:43:02+00:00",
        "updateTime": "2023-05-16T18:49:36+00:00",
        "createdBy": "1",
        "updatedBy": "1",
        "moduleId": "crm",
        "numeratorId": "1",
        "withStamps": "Y",
        "productsTableVariant": "",
        "isDeleted": "N",
        "isDefault": "N",
        "download": "https://example.bitrix24.com/bitrix/services/main/ajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=129",
        "downloadMachine": "https://vibecode.bitrix24.com/v1/crm-document-templates/129/download"
      },
      "249": {
        "id": "249",
        "active": "Y",
        "name": "Demo product sale",
        "code": null,
        "region": "uk",
        "sort": "500",
        "createTime": "2026-08-19T14:55:23+00:00",
        "updateTime": "2026-08-19T14:55:23+00:00",
        "createdBy": "1",
        "updatedBy": null,
        "moduleId": "crm",
        "numeratorId": "1095",
        "withStamps": "N",
        "productsTableVariant": "",
        "isDeleted": "N",
        "isDefault": "N",
        "download": "https://example.bitrix24.com/bitrix/services/main/ajax.php?action=crm.documentgenerator.template.download&SITE_ID=s1&id=249",
        "downloadMachine": "https://vibecode.bitrix24.com/v1/crm-document-templates/249/download"
      }
    }
  },
  "meta": {
    "total": 11,
    "start": 0,
    "next": null
  }
}

Error response example

400 — start is not a non-negative integer:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_START",
    "message": "start must be one non-negative safe integer."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_START Descriptionstart is not a non-negative integer or is passed in the request more than once
HTTP400 CodeINVALID_PARAMS Descriptionselect is empty, or filter or order is not passed as an object
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionFilter by a field that is not accepted, for example filter[foo]
HTTP422 CodeBITRIX_ERROR DescriptionSorting by a field that is not accepted, for example order[ID]. error.b24Code contains INVALID_ARG_VALUE
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no configured tokens
HTTP429 CodeRATE_LIMITED DescriptionBitrix24 rate-limited requests to the portal. Retry after the delay in the Retry-After header

Full list of common API errors — Errors.

Known specifics

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.

See also