Bitrix24 Open Lines API

The Open Lines API from Bitrix24 — 50 operation(s) for open lines.

OpenAPI Specification

bitrix24-open-lines-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Bitrix24 REST BIconnector Open Lines 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: Open Lines
paths:
  /imconnector.activate:
    post:
      summary: Activate Connector imconnector.activate
      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 `imconnector.activate` activates or deactivates the connector on the specified open line. The method works only in the context of the [application](../../../settings/app-installation/index.md).
      operationId: imconnector_activate
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-activate.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| The string code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| The identifier of the open line.'
                ACTIVE:
                  type: string
                  description: '| Activation flag. Any non-empty value enables the connector, while an empty value or `0` disables it.'
              required:
              - CONNECTOR
              - LINE
              - ACTIVE
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| The string code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| The identifier of the open line.'
                ACTIVE:
                  type: string
                  description: '| Activation flag. Any non-empty value enables the connector, while an empty value or `0` disables it.'
              required:
              - CONNECTOR
              - LINE
              - ACTIVE
      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:
        - imopenlines
  /imconnector.chat.name.set:
    post:
      summary: Set a New Chat Name imconnector.chat.name.set
      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 `imconnector.chat.name.set` sets a new name for the chat. The method works only in the context of the [application](../../../settings/app-installation/index.md).
      operationId: imconnector_chat_name_set
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-chat-name-set.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| The string code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| Identifier of the Open Channel'
                CHAT_ID:
                  type: string
                  description: '| Identifier of the chat in the external system ||'
                NAME:
                  type: string
                  description: '| New name for the chat ||'
                USER_ID:
                  type: string
                  description: '| User identifier. This parameter is mandatory only for connectors without group chats from the external side. For such a connector, the `CHAT_GROUP` parameter in the imconnector.register method must be set to `N` ||'
              required:
              - CONNECTOR
              - LINE
              - CHAT_ID
              - NAME
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| The string code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| Identifier of the Open Channel'
                CHAT_ID:
                  type: string
                  description: '| Identifier of the chat in the external system ||'
                NAME:
                  type: string
                  description: '| New name for the chat ||'
                USER_ID:
                  type: string
                  description: '| User identifier. This parameter is mandatory only for connectors without group chats from the external side. For such a connector, the `CHAT_GROUP` parameter in the imconnector.register method must be set to `N` ||'
              required:
              - CONNECTOR
              - LINE
              - CHAT_ID
              - NAME
      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:
        - imconnector
  /imconnector.connector.data.set:
    post:
      summary: Set Connector Settings imconnector.connector.data.set
      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 `imconnector.connector.data.set` sets the channel settings in an external system for a custom connector and the specified open line. The method works only in the context of the [application](../../../settings/app-installation/index.md).
      operationId: imconnector_connector_data_set
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-connector-data-set.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| String code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| Identifier of the open line.'
                DATA:
                  type: object
                  description: '| Object containing the channel settings in the external system. The method does not support setting or modifying a single field separately: settings are written and overwritten through this object as a whole.'
                ID:
                  type: string
                  description: '| Identifier of the channel in the external system, for example `channel-123`.'
                URL:
                  type: string
                  description: '| Full link to the chat or channel in the external system ||'
                URL_IM:
                  type: string
                  description: '| Full link to the chat in the operator interface format. If there is no separate link for the operator, use the value of `URL` ||'
                NAME:
                  type: string
                  description: '| Name of the channel for display in the interface ||'
              required:
              - CONNECTOR
              - LINE
              - DATA
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| String code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| Identifier of the open line.'
                DATA:
                  type: object
                  description: '| Object containing the channel settings in the external system. The method does not support setting or modifying a single field separately: settings are written and overwritten through this object as a whole.'
                ID:
                  type: string
                  description: '| Identifier of the channel in the external system, for example `channel-123`.'
                URL:
                  type: string
                  description: '| Full link to the chat or channel in the external system ||'
                URL_IM:
                  type: string
                  description: '| Full link to the chat in the operator interface format. If there is no separate link for the operator, use the value of `URL` ||'
                NAME:
                  type: string
                  description: '| Name of the channel for display in the interface ||'
              required:
              - CONNECTOR
              - LINE
              - DATA
      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:
        - imopenlines
  /imconnector.delete.messages:
    post:
      summary: Delete Sent Messages imconnector.delete.messages
      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 `imconnector.delete.messages` removes messages from an open line that were sent by an external system. The method works only in the context of an [application](../../../settings/app-installation/index.md). The method parameters use values from the external system: user ID, message ID, and chat or channel ID.'
      operationId: imconnector_delete_messages
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-delete-messages.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| String code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| Identifier of the open line.'
                MESSAGES:
                  type: array
                  items: {}
                  description: '| Array of messages to delete. Each element of the array is a message object with three required blocks: `user`, `message`, `chat`. The structure of the object is described in detail below ||'
                user:
                  type: object
                  description: '| User data from the external system.'
                message:
                  type: object
                  description: '| Message data from the external system.'
                chat:
                  type: object
                  description: '| Chat or channel data from the external system.'
                id:
                  type: string
                  description: '| User ID in the external system.'
              required:
              - CONNECTOR
              - LINE
              - MESSAGES
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| String code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| Identifier of the open line.'
                MESSAGES:
                  type: array
                  items: {}
                  description: '| Array of messages to delete. Each element of the array is a message object with three required blocks: `user`, `message`, `chat`. The structure of the object is described in detail below ||'
                user:
                  type: object
                  description: '| User data from the external system.'
                message:
                  type: object
                  description: '| Message data from the external system.'
                chat:
                  type: object
                  description: '| Chat or channel data from the external system.'
                id:
                  type: string
                  description: '| User ID in the external system.'
              required:
              - CONNECTOR
              - LINE
              - MESSAGES
              - 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:
        - imopenlines
  /imconnector.list:
    post:
      summary: Get the List of Connectors imconnector.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 `imconnector.list` returns a list of all connectors registered in Bitrix24. The method works only in the context of an [application](../../../settings/app-installation/index.md).
      operationId: imconnector_list
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-list.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
          application/x-www-form-urlencoded:
            schema:
              type: object
      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:
        - imopenlines
  /imconnector.register:
    post:
      summary: Register the Connector imconnector.register
      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 `imconnector.register` registers a custom connector for Open Channels. The method works only in the context of the [application](../../../settings/app-installation/index.md).
      operationId: imconnector_register
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-register.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ID:
                  type: string
                  description: '| Unique identifier for the connector. The method converts the value to lowercase. It is recommended to add a unique prefix at the beginning of the identifier to avoid conflicts with existing and future identifiers of other connectors. Use digits, lowercase letters, and the underscore `_` to form...'
                NAME:
                  type: string
                  description: '| Name of the connector in the interface ||'
                ICON:
                  type: object
                  description: '| Parameters for the main icon.'
                PLACEMENT_HANDLER:
                  type: string
                  description: '| URL of the embedding handler for the connector settings. At this address, Bitrix24 opens the settings interface in a slider for the user. Read more about embedding interfaces in the article Widget Embedding Mechanism ||'
                ICON_DISABLED:
                  type: object
                  description: '| Parameters for the inactive state icon.'
                DEL_EXTERNAL_MESSAGES:
                  type: boolean
                  description: '| Allows deleting incoming messages. Default value is `true` ||'
                EDIT_INTERNAL_MESSAGES:
                  type: boolean
                  description: '| Allows editing operator messages. Default value is `true` ||'
                DEL_INTERNAL_MESSAGES:
                  type: boolean
                  description: '| Allows deleting operator messages. Default value is `true` ||'
                NEWSLETTER:
                  type: boolean
                  description: '| Allows using the channel in CRM newsletters. Default value is `true` ||'
                NEED_SYSTEM_MESSAGES:
                  type: boolean
                  description: '| Allows sending system messages to the channel. Default value is `true` ||'
                NEED_SIGNATURE:
                  type: boolean
                  description: '| Adds the operator''s signature to messages. Default value is `true` ||'
                CHAT_GROUP:
                  type: boolean
                  description: '| Indicates the chat processing mode of the connector: `true` — grouping by `chat.id` (group chat), `false` — by `user.id` (one-on-one chat). Default value is `false` ||'
                DATA_IMAGE:
                  type: string
                  description: '| SVG icon in Data URI format: a string with the prefix `data:image/svg+xml,`, followed by the SVG content, usually URL-encoded ||'
                COLOR:
                  type: string
                  description: '| Background color of the icon. Example: `#69acc0` ||'
                SIZE:
                  type: string
                  description: '| Background size. Example: `90%` ||'
                POSITION:
                  type: string
                  description: '| Background position. Example: `center` ||'
              required:
              - ID
              - NAME
              - ICON
              - PLACEMENT_HANDLER
              - DATA_IMAGE
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ID:
                  type: string
                  description: '| Unique identifier for the connector. The method converts the value to lowercase. It is recommended to add a unique prefix at the beginning of the identifier to avoid conflicts with existing and future identifiers of other connectors. Use digits, lowercase letters, and the underscore `_` to form...'
                NAME:
                  type: string
                  description: '| Name of the connector in the interface ||'
                ICON:
                  type: object
                  description: '| Parameters for the main icon.'
                PLACEMENT_HANDLER:
                  type: string
                  description: '| URL of the embedding handler for the connector settings. At this address, Bitrix24 opens the settings interface in a slider for the user. Read more about embedding interfaces in the article Widget Embedding Mechanism ||'
                ICON_DISABLED:
                  type: object
                  description: '| Parameters for the inactive state icon.'
                DEL_EXTERNAL_MESSAGES:
                  type: boolean
                  description: '| Allows deleting incoming messages. Default value is `true` ||'
                EDIT_INTERNAL_MESSAGES:
                  type: boolean
                  description: '| Allows editing operator messages. Default value is `true` ||'
                DEL_INTERNAL_MESSAGES:
                  type: boolean
                  description: '| Allows deleting operator messages. Default value is `true` ||'
                NEWSLETTER:
                  type: boolean
                  description: '| Allows using the channel in CRM newsletters. Default value is `true` ||'
                NEED_SYSTEM_MESSAGES:
                  type: boolean
                  description: '| Allows sending system messages to the channel. Default value is `true` ||'
                NEED_SIGNATURE:
                  type: boolean
                  description: '| Adds the operator''s signature to messages. Default value is `true` ||'
                CHAT_GROUP:
                  type: boolean
                  description: '| Indicates the chat processing mode of the connector: `true` — grouping by `chat.id` (group chat), `false` — by `user.id` (one-on-one chat). Default value is `false` ||'
                DATA_IMAGE:
                  type: string
                  description: '| SVG icon in Data URI format: a string with the prefix `data:image/svg+xml,`, followed by the SVG content, usually URL-encoded ||'
                COLOR:
                  type: string
                  description: '| Background color of the icon. Example: `#69acc0` ||'
                SIZE:
                  type: string
                  description: '| Background size. Example: `90%` ||'
                POSITION:
                  type: string
                  description: '| Background position. Example: `center` ||'
              required:
              - ID
              - NAME
              - ICON
              - PLACEMENT_HANDLER
              - DATA_IMAGE
      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:
        - imopenlines
  /imconnector.send.messages:
    post:
      summary: Send Messages to Bitrix24 imconnector.send.messages
      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 `imconnector.send.messages` accepts messages from an external system and forwards them to an open line in Bitrix24 via a custom connector. The method parameters utilize values from the external system: user ID, chat ID, chat link, and its name in the application that registered the connector. Upon execution, the method returns the chat ID and the open line dialog ID created in Bitrix24.'
      operationId: imconnector_send_messages
      tags:
      - Open Lines
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/imopenlines/imconnector/imconnector-send-messages.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| The string code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| The ID of the open line.'
                MESSAGES:
                  type: array
                  items: {}
                  description: '| An array of messages. Each element of the array represents a single message in the object format with three required blocks: `user`, `message`, `chat`.'
                user:
                  type: object
                  description: '| User data from the external system.'
                message:
                  type: object
                  description: '| Message data from the external system.'
                chat:
                  type: object
                  description: '| Chat data from the external system.'
                id:
                  type: string
                  description: '| User ID in the external system. The value is generated on the side of the external system ||'
                last_name:
                  type: string
                  description: '| User''s last name ||'
                name:
                  type: string
                  description: '| User''s first name ||'
                picture:
                  type: object
                  description: '| User''s avatar. Pass it as an object with the `url` field, for example, `{"url":"https://example.com/u42.png"}`. The link must be public ||'
                url:
                  type: string
                  description: '| Link to the user''s profile in the external system ||'
                gender:
                  type: string
                  description: '| User''s gender. Supported values are `male` and `female` ||'
                email:
                  type: string
                  description: '| User''s email ||'
                phone:
                  type: string
                  description: '| User''s phone ||'
                skip_phone_validate:
                  type: string
                  description: '| Disables phone validation before saving in CRM. Acceptable value is `Y`. If validation should be performed, do not pass this parameter ||'
                date:
                  type: integer
                  description: '| Message time in Unix Timestamp in seconds ||'
                text:
                  type: string
                  description: '| Message text. You must pass either the `text` or `files` element.'
                files:
                  type: array
                  items: {}
                  description: '| An array of files. Each file is passed as an array of the form `array(''url'' => ''File link'', ''name'' => ''File name'')`. The `url` link must be accessible from Bitrix24.'
                disable_crm:
                  type: string
                  description: '| Disables the CRM tracker for the message. Acceptable value is `Y`. If the CRM tracker should work, do not pass this parameter ||'
                user_id:
                  type: integer
                  description: '| The ID of the manager in Bitrix24. If you pass `user_id`, the message will be sent on behalf of this manager ||'
              required:
              - CONNECTOR
              - LINE
              - MESSAGES
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                CONNECTOR:
                  type: string
                  description: '| The string code of the connector specified in the `ID` parameter when calling imconnector.register ||'
                LINE:
                  type: integer
                  description: '| The ID of the open line.'
                MESSAGES:
                  type: array
                  items: {}
                  description: '| An array of messages. Each element of the array represents a single message in the object format with three required blocks: `user`, `message`, `chat`.'
                user:
                  type: object
                  description: '| User data from the external system.'
                message:
                  type: object
                  description: '| Message data from the external system.'
                chat:
                  type: object
                  description: '| Chat data from the external system.'
                id:
                  type: string
                  description: '| User ID in the external system. The value is generated on the side of the external system ||'
                last_name:
                  type: string
                  description: '| User''s last name ||'
                name:
                  type: string
                  description: '| User''s first name ||'
                picture:
                  type: object
                  description: '| User''s avatar. Pass it as an object with the `url` field, for example, `{"url":"https://example.com/u42.png"}`. The link must be public ||'
                url:
                  type: string
                  description: '| Link to the user''s profile in the external system ||'
                gender:
                  type: string
                  description: '| User''s gender. Supported values are `male` and `female` ||'
                email:
                  type: string
                  description: '| User''s email ||'
                phone:
                  type: string
                  description: '| User''s phone ||'
                skip_phone_validate:
                  type: string
                  description: '| Disables phone validation before saving in CRM. Acceptable value is `Y`. If validation should be performed, do not pass this parameter ||'
                date:
                  type: integer
                  description: '| Message time in Unix Timestamp in seconds ||'
                text:
                  type: string
                  description: '| Message text. You must pass either the `text` or `files` element.'
                files:
                  type: array
                  items: {}
                  description: '| An array of files. Each file is passed as an array of the form `array(''url'' => ''File link'', ''name'' => ''File name'')`. The `url` link must be accessible from Bitrix24.'
                disable_crm:
                  type: string
                  description: '| Disables the CRM tracker for the message. Acceptable value is `Y`. If the CRM tracker should work, do not pass this parameter ||'
                user_id:
                  type: integer
                  description: '| The ID of th

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