Bitrix24 Drive API

The Drive API from Bitrix24 — 37 operation(s) for drive.

OpenAPI Specification

bitrix24-drive-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Bitrix24 REST BIconnector Drive 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: Drive
paths:
  /disk.attachedObject.get:
    post:
      summary: Get Information About Attached File disk.attachedObject.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 `disk.attachedObject.get` returns information about the attached file.
      operationId: disk_attachedObject_get
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/attached-object/disk-attached-object-get.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file attachment record, which is the link connecting the disk file with other objects.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file attachment record, which is the link connecting the disk file with other objects.'
              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:
        - disk
  /disk.file.copyto:
    post:
      summary: Copy File to Specified Folder disk.file.copyto
      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 `disk.file.copyto` copies a file to the specified folder.
      operationId: disk_file_copyto
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-copy-to.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file ||'
                targetFolderId:
                  type: integer
                  description: '| Identifier of the folder to which the file is copied ||'
              required:
              - id
              - targetFolderId
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file ||'
                targetFolderId:
                  type: integer
                  description: '| Identifier of the folder to which the file is copied ||'
              required:
              - id
              - targetFolderId
      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:
        - disk
  /disk.file.delete:
    post:
      summary: Permanently Delete File disk.file.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 `disk.file.delete` permanently deletes a file. If you want to move the file to the trash, use the method [disk.file.markdeleted](./disk-file-mark-deleted.md).
      operationId: disk_file_delete
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-delete.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
              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:
        - disk
  /disk.file.get:
    post:
      summary: Get File Parameters disk.file.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 `disk.file.get` returns data about a file.
      operationId: disk_file_get
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-get.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
              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:
        - disk
  /disk.file.getExternalLink:
    post:
      summary: Get Public Link for File disk.file.getExternalLink
      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 `disk.file.getExternalLink` returns a public link to a file.
      operationId: disk_file_getExternalLink
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-get-external-link.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
              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:
        - disk
  /disk.file.getVersions:
    post:
      summary: List of File Versions for disk.file.getVersions
      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 `disk.file.getVersions` returns a list of file versions. Versions are returned in descending order of creation date.
      operationId: disk_file_getVersions
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-get-versions.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
                filter:
                  type: array
                  items: {}
                  description: '| An array in the following format:'
                start:
                  type: integer
                  description: '| This parameter is used for managing pagination.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
                filter:
                  type: array
                  items: {}
                  description: '| An array in the following format:'
                start:
                  type: integer
                  description: '| This parameter is used for managing pagination.'
              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:
        - disk
  /disk.file.getfields:
    post:
      summary: Get Description of File Fields for disk.file.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 `disk.file.getfields` returns the description of file fields.
      operationId: disk_file_getfields
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-get-fields.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:
        - disk
  /disk.file.markdeleted:
    post:
      summary: Move File to Trash disk.file.markdeleted
      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 `disk.file.markdeleted` moves a file to the trash. Save the file ID after deletion so that it can be restored later using the [disk.file.restore](./disk-file-restore.md) method.
      operationId: disk_file_markdeleted
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-mark-deleted.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| File identifier.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| File 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:
        - disk
  /disk.file.moveto:
    post:
      summary: Move File to Specified Folder disk.file.moveto
      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 `disk.file.moveto` moves a file to the specified folder. You cannot move a file to a folder from a different storage.
      operationId: disk_file_moveto
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-move-to.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file ||'
                targetFolderId:
                  type: integer
                  description: '| Identifier of the folder to which the file should be moved ||'
              required:
              - id
              - targetFolderId
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file ||'
                targetFolderId:
                  type: integer
                  description: '| Identifier of the folder to which the file should be moved ||'
              required:
              - id
              - targetFolderId
      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:
        - disk
  /disk.file.rename:
    post:
      summary: Rename File disk.file.rename
      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 `disk.file.rename` renames a file.
      operationId: disk_file_rename
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-rename.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| File identifier.'
                newName:
                  type: string
                  description: '| New file name.'
              required:
              - id
              - newName
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| File identifier.'
                newName:
                  type: string
                  description: '| New file name.'
              required:
              - id
              - newName
      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:
        - disk
  /disk.file.restore:
    post:
      summary: Restore File from Trash disk.file.restore
      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 `disk.file.restore` restores a file from the trash.
      operationId: disk_file_restore
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-restore.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file located in the trash.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file located in the trash.'
              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:
        - disk
  /disk.file.restoreFromVersion:
    post:
      summary: Restore a File from a Specific Version disk.file.restoreFromVersion
      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 `disk.file.restoreFromVersion` restores a file from a specific version.
      operationId: disk_file_restoreFromVersion
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-restore-from-version.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
                versionId:
                  type: integer
                  description: '| Identifier of the file version.'
              required:
              - id
              - versionId
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the file.'
                versionId:
                  type: integer
                  description: '| Identifier of the file version.'
              required:
              - id
              - versionId
      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:
        - disk
  /disk.file.uploadversion:
    post:
      summary: Upload a New Version of a File disk.file.uploadversion
      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 `disk.file.uploadversion` uploads a new version of a file.
      operationId: disk_file_uploadversion
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/file/disk-file-upload-version.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| File identifier.'
                fileContent:
                  type: array
                  items: {}
                  description: '| An array containing the file name and a string in Base64 ||'
              required:
              - id
              - fileContent
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| File identifier.'
                fileContent:
                  type: array
                  items: {}
                  description: '| An array containing the file name and a string in Base64 ||'
              required:
              - id
              - fileContent
      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:
        - disk
  /disk.folder.addsubfolder:
    post:
      summary: Create a Subfolder disk.folder.addsubfolder
      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 `disk.folder.addsubfolder` creates a subfolder.
      operationId: disk_folder_addsubfolder
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/folder/disk-folder-add-subfolder.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the parent folder.'
                data:
                  type: array
                  items: {}
                  description: '| An array with the field `NAME`, where `NAME` is the name of the subfolder ||'
              required:
              - id
              - data
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the parent folder.'
                data:
                  type: array
                  items: {}
                  description: '| An array with the field `NAME`, where `NAME` is the name of the subfolder ||'
              required:
              - id
              - 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:
        - disk
  /disk.folder.copyto:
    post:
      summary: Copy a folder and all its contents to the specified folder disk.folder.copyto
      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 `disk.folder.copyto` copies a folder and all its contents to the specified folder.
      operationId: disk_folder_copyto
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/folder/disk-folder-copy-to.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the source folder to be copied.'
                targetFolderId:
                  type: integer
                  description: '| Identifier of the target folder where the folder is copied ||'
              required:
              - id
              - targetFolderId
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the source folder to be copied.'
                targetFolderId:
                  type: integer
                  description: '| Identifier of the target folder where the folder is copied ||'
              required:
              - id
              - targetFolderId
      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:
        - disk
  /disk.folder.deletetree:
    post:
      summary: Permanently Delete a Folder and All Its Contents disk.folder.deletetree
      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 `disk.folder.deletetree` permanently deletes a folder and all its contents. If you want to move the folder to the trash, use the method [disk.folder.markdeleted](./disk-folder-mark-deleted.md).
      operationId: disk_folder_deletetree
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/folder/disk-folder-delete-tree.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the folder.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the folder.'
              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:
        - disk
  /disk.folder.get:
    post:
      summary: Get Folder Parameters disk.folder.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 `disk.folder.get` returns data about a folder.
      operationId: disk_folder_get
      tags:
      - Drive
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/disk/folder/disk-folder-get.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the folder.'
              required:
              - id
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: '| Identifier of the folder.'
              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:
        - disk
  /disk.folder.getchildren:
    post:
      summary: Get a list of files and folders in the folder disk.folder

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