Bitrix24 Document Generator API

The Document Generator API from Bitrix24 — 29 operation(s) for document generator.

OpenAPI Specification

bitrix24-document-generator-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Bitrix24 REST BIconnector Document Generator API
  version: 1.0.0
  description: 'Bitrix24 REST API provides access to CRM, tasks, drive, chats, telephony, e-commerce, automation, and other modules. Documentation: https://apidocs.bitrix24.com'
  contact:
    name: Bitrix24 Developer Support
    url: https://apidocs.bitrix24.com/support.html
  license:
    name: MIT
    url: https://github.com/bitrix-tools/b24-rest-docs/blob/main/LICENSE
  x-logo:
    url: https://apidocs.bitrix24.com/_images/bitrix24logo.svg
servers:
- url: https://{portal}.bitrix24.com/rest
  description: Your Bitrix24 portal (cloud)
  variables:
    portal:
      default: your-portal
      description: Subdomain of your Bitrix24 portal
- url: https://{host}/rest
  description: On-Premise Bitrix24 installation
  variables:
    host:
      default: your-bitrix24.example.com
      description: Host of your on-premise installation
security:
- AccessToken: []
tags:
- name: Document Generator
paths:
  /documentgenerator.document.add:
    post:
      summary: Create a New Document Based on a Template documentgenerator.document.add
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.add` creates a new document based on a template.
      operationId: documentgenerator_document_add
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-add.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                templateId:
                  type: integer
                  description: '| Template identifier.'
                providerClassName:
                  type: string
                  description: '| Data provider class.'
                value:
                  type: string
                  description: '| External identifier of the object for which the document is being generated.'
                values:
                  type: object
                  description: '| Field values of the document in the format `{"FieldCode":"Value"}` ||'
                stampsEnabled:
                  type: integer
                  description: '| Seal and signature mode:'
                fields:
                  type: object
                  description: '| Description of how to interpret and format values from `values` (detailed description).'
                TYPE:
                  type: string
                  description: '| Field type.'
                FORMAT:
                  type: object
                  description: '| Formatting parameters for the field type.'
                PROVIDER:
                  type: string
                  description: '| Provider class ||'
                TITLE:
                  type: string
                  description: '| Field title ||'
              required:
              - templateId
              - value
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                templateId:
                  type: integer
                  description: '| Template identifier.'
                providerClassName:
                  type: string
                  description: '| Data provider class.'
                value:
                  type: string
                  description: '| External identifier of the object for which the document is being generated.'
                values:
                  type: object
                  description: '| Field values of the document in the format `{"FieldCode":"Value"}` ||'
                stampsEnabled:
                  type: integer
                  description: '| Seal and signature mode:'
                fields:
                  type: object
                  description: '| Description of how to interpret and format values from `values` (detailed description).'
                TYPE:
                  type: string
                  description: '| Field type.'
                FORMAT:
                  type: object
                  description: '| Formatting parameters for the field type.'
                PROVIDER:
                  type: string
                  description: '| Provider class ||'
                TITLE:
                  type: string
                  description: '| Field title ||'
              required:
              - templateId
              - value
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.document.delete:
    post:
      summary: Delete document documentgenerator.document.delete
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.delete` removes a document by its identifier.
      operationId: documentgenerator_document_delete
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-delete.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.document.enablepublicurl:
    post:
      summary: Enable or disable public link for document documentgenerator.document.enablepublicurl
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.enablepublicurl` enables or disables the public link for a document.
      operationId: documentgenerator_document_enablepublicurl
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-enable-public-url.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
                status:
                  type: integer
                  description: '| Status of the public link:'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
                status:
                  type: integer
                  description: '| Status of the public link:'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.document.get:
    post:
      summary: Get Document by ID documentgenerator.document.get
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.get` returns information about a document by its ID.
      operationId: documentgenerator_document_get
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-get.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document ID.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document ID.'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.document.getfields:
    post:
      summary: Get the list of fields for the document documentgenerator.document.getfields
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.getfields` returns the fields of the document, along with their current and base values.
      operationId: documentgenerator_document_getfields
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-get-fields.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
                values:
                  type: object
                  description: '| Optional parameter.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
                values:
                  type: object
                  description: '| Optional parameter.'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.document.list:
    post:
      summary: Get the List of Documents documentgenerator.document.list
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.list` returns a list of documents based on the filter.
      operationId: documentgenerator_document_list
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-list.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                select:
                  type: array
                  items: {}
                  description: '| An array containing the list of fields to return.'
                order:
                  type: object
                  description: '| An object for sorting documents in the format `{"field_1":"value_1", ... "field_N":"value_N"}`.'
                filter:
                  type: object
                  description: '| An object for filtering documents in the format `{"field_1":"value_1", ... "field_N":"value_N"}`.'
                start:
                  type: integer
                  description: '| This parameter is used for pagination control.'
                id:
                  type: integer
                  description: '| Document identifier ||'
                title:
                  type: string
                  description: '| Document title ||'
                number:
                  type: string
                  description: '| Document number ||'
                templateId:
                  type: integer
                  description: '| Template identifier ||'
                provider:
                  type: string
                  description: '| Provider class ||'
                value:
                  type: string
                  description: '| External identifier of the object ||'
                fileId:
                  type: integer
                  description: '| Identifier of the document''s DOCX file ||'
                imageId:
                  type: integer
                  description: '| Identifier of the document''s image file ||'
                pdfId:
                  type: integer
                  description: '| Identifier of the document''s PDF file ||'
                createTime:
                  type: string
                  format: date-time
                  description: '| Document creation time ||'
                updateTime:
                  type: string
                  format: date-time
                  description: '| Document update time ||'
                values:
                  type: object
                  description: '| Document field values ||'
                createdBy:
                  type: integer
                  description: '| Identifier of the user who created the document ||'
                updatedBy:
                  type: integer
                  description: '| Identifier of the user who updated the document ||'
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                select:
                  type: array
                  items: {}
                  description: '| An array containing the list of fields to return.'
                order:
                  type: object
                  description: '| An object for sorting documents in the format `{"field_1":"value_1", ... "field_N":"value_N"}`.'
                filter:
                  type: object
                  description: '| An object for filtering documents in the format `{"field_1":"value_1", ... "field_N":"value_N"}`.'
                start:
                  type: integer
                  description: '| This parameter is used for pagination control.'
                id:
                  type: integer
                  description: '| Document identifier ||'
                title:
                  type: string
                  description: '| Document title ||'
                number:
                  type: string
                  description: '| Document number ||'
                templateId:
                  type: integer
                  description: '| Template identifier ||'
                provider:
                  type: string
                  description: '| Provider class ||'
                value:
                  type: string
                  description: '| External identifier of the object ||'
                fileId:
                  type: integer
                  description: '| Identifier of the document''s DOCX file ||'
                imageId:
                  type: integer
                  description: '| Identifier of the document''s image file ||'
                pdfId:
                  type: integer
                  description: '| Identifier of the document''s PDF file ||'
                createTime:
                  type: string
                  format: date-time
                  description: '| Document creation time ||'
                updateTime:
                  type: string
                  format: date-time
                  description: '| Document update time ||'
                values:
                  type: object
                  description: '| Document field values ||'
                createdBy:
                  type: integer
                  description: '| Identifier of the user who created the document ||'
                updatedBy:
                  type: integer
                  description: '| Identifier of the user who updated the document ||'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.document.update:
    post:
      summary: Update Existing Document documentgenerator.document.update
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.document.update` updates a document with new field values.
      operationId: documentgenerator_document_update
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/document-generator-document-update.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
                values:
                  type: object
                  description: '| Field values of the document in the format `{"FieldCode":"Value"}` ||'
                stampsEnabled:
                  type: integer
                  description: '| Stamp and signature mode:'
                fields:
                  type: object
                  description: '| Description of how to interpret and format values from `values` (detailed description).'
                TYPE:
                  type: string
                  description: '| Field type.'
                FORMAT:
                  type: object
                  description: '| Formatting parameters for the field type.'
                PROVIDER:
                  type: string
                  description: '| Provider class ||'
                TITLE:
                  type: string
                  description: '| Field title ||'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Document identifier.'
                values:
                  type: object
                  description: '| Field values of the document in the format `{"FieldCode":"Value"}` ||'
                stampsEnabled:
                  type: integer
                  description: '| Stamp and signature mode:'
                fields:
                  type: object
                  description: '| Description of how to interpret and format values from `values` (detailed description).'
                TYPE:
                  type: string
                  description: '| Field type.'
                FORMAT:
                  type: object
                  description: '| Formatting parameters for the field type.'
                PROVIDER:
                  type: string
                  description: '| Provider class ||'
                TITLE:
                  type: string
                  description: '| Field title ||'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.numerator.add:
    post:
      summary: 'Add Document Generator Numerator: documentgenerator.numerator.add'
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.numerator.add` creates a document numerator.
      operationId: documentgenerator_numerator_add
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/numerators/document-generator-numerator-add.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  type: object
                  description: '| Set of numerator parameters (detailed description) ||'
                name:
                  type: string
                  description: '| Name of the numerator ||'
                template:
                  type: string
                  description: '| Number template with the placeholder `{NUMBER}`.'
                settings:
                  type: object
                  description: '| Settings for the numerator generators (detailed description) ||'
                Bitrix_Main_Numerator_Generator_SequentNumberGenerator:
                  type: object
                  description: '| Settings for sequential numbering (detailed description) ||'
                start:
                  type: integer
                  description: '| Initial counter value.'
                step:
                  type: integer
                  description: '| Counter increment step.'
                length:
                  type: integer
                  description: '| Minimum length of the number.'
                padString:
                  type: string
                  description: '| Padding character on the left when `length > 0`.'
                periodicBy:
                  type: string
                  description: '| Counter reset period:'
                timezone:
                  type: string
                  description: '| Timezone identifier for periodic reset, e.g., `Europe/Berlin` ||'
                isDirectNumeration:
                  type: boolean
                  description: '| Direct numbering flag.'
              required:
              - fields
              - name
              - template
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                fields:
                  type: object
                  description: '| Set of numerator parameters (detailed description) ||'
                name:
                  type: string
                  description: '| Name of the numerator ||'
                template:
                  type: string
                  description: '| Number template with the placeholder `{NUMBER}`.'
                settings:
                  type: object
                  description: '| Settings for the numerator generators (detailed description) ||'
                Bitrix_Main_Numerator_Generator_SequentNumberGenerator:
                  type: object
                  description: '| Settings for sequential numbering (detailed description) ||'
                start:
                  type: integer
                  description: '| Initial counter value.'
                step:
                  type: integer
                  description: '| Counter increment step.'
                length:
                  type: integer
                  description: '| Minimum length of the number.'
                padString:
                  type: string
                  description: '| Padding character on the left when `length > 0`.'
                periodicBy:
                  type: string
                  description: '| Counter reset period:'
                timezone:
                  type: string
                  description: '| Timezone identifier for periodic reset, e.g., `Europe/Berlin` ||'
                isDirectNumeration:
                  type: boolean
                  description: '| Direct numbering flag.'
              required:
              - fields
              - name
              - template
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.numerator.delete:
    post:
      summary: Delete the documentgenerator.numerator.delete
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.numerator.delete` removes a numerator by its identifier. You can only delete a numerator that was created using the `documentgenerator.numerator.add` method.
      operationId: documentgenerator_numerator_delete
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/numerators/document-generator-numerator-delete.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the numerator.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the numerator.'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.numerator.get:
    post:
      summary: Get Numerator by ID documentgenerator.numerator.get
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.numerator.get` returns the numerator data by its ID.
      operationId: documentgenerator_numerator_get
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/numerators/document-generator-numerator-get.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| The identifier of the numerator.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| The identifier of the numerator.'
              required:
              - id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - documentgenerator
  /documentgenerator.numerator.list:
    post:
      summary: Get the List of Numerators documentgenerator.numerator.list
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the [MCP server](../../../ai-tools/mcp.md) so that the assistant can utilize the official REST documentation. The method `documentgenerator.numerator.list` returns a list of numerators for the document generator. It retrieves all numerators available in the current Bitrix24, including [CRM numerators](../../crm/document-generator/numerator/index.md).
      operationId: documentgenerator_numerator_list
      tags:
      - Document Generator
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/document-generator/numerators/document-generator-numerator-list.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start:
                  type: integer
                  description: '| This parameter is used for managing pagination.'
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                start:
                  type: integer
                  description: '| This parameter is used for managing pagination.'
      responses:
        '200':
 

# --- truncated at 32 KB (89 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitrix24/refs/heads/main/openapi/bitrix24-document-generator-api-openapi.yml