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
filter (query) object — Filter 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
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
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
start (query) number 0 Position 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
success boolean Always true on success
data.templates object Templates. The key is the template ID as a string, and the value is the template record
data.templates.{id}.id string Template ID
data.templates.{id}.name string Name
data.templates.{id}.active string Availability: Y / N
data.templates.{id}.code string | null Symbolic code of the template, null — no code set
data.templates.{id}.region string Template region, for example uk
data.templates.{id}.sort string Position in the list
data.templates.{id}.createTime string Creation date in ISO 8601
data.templates.{id}.updateTime string Modification date in ISO 8601
data.templates.{id}.createdBy string ID of the employee who created the template. List: GET /v1/users
data.templates.{id}.updatedBy string ID of the employee who modified the template. List: GET /v1/users
data.templates.{id}.moduleId string Owner module, always crm in this section
data.templates.{id}.numeratorId string ID of the numerator that assigns numbers to documents
data.templates.{id}.withStamps string Stamps and signatures: Y / N
data.templates.{id}.productsTableVariant string Variant of the product table in the document
data.templates.{id}.isDeleted string Whether the template is marked as deleted: Y / N
data.templates.{id}.isDefault string Default template: Y / N
data.templates.{id}.download string URL for downloading the template file in the Bitrix24 web interface. To download through the API, use downloadMachine
data.templates.{id}.downloadMachine string Link for downloading the template file through the Vibecode API — GET /v1/crm-document-templates/:id/download
meta.total number Number of templates matching the filter
meta.start number The start value from the request
meta.next number | null The 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
400 INVALID_START start is not a non-negative integer or is passed in the request more than once
400 INVALID_PARAMS select is empty, or filter or order is not passed as an object
400 UNKNOWN_FILTER_FIELD Filter by a field that is not accepted, for example filter[foo]
422 BITRIX_ERROR Sorting by a field that is not accepted, for example order[ID]. error.b24Code contains INVALID_ARG_VALUE
403 SCOPE_DENIED The key lacks the crm scope
401 TOKEN_MISSING The key has no configured tokens
429 RATE_LIMITED Bitrix24 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