How to Work with Files

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect the MCP server so that the assistant can utilize the official REST documentation.

Files can be transmitted to Bitrix24 fields in Base64 format or uploaded to Drive. The choice of method depends on the type of field and the method that accepts the file.

Quick Navigation: choose tutorial

Types of File Fields

  • File. The field is not linked to Drive. It accepts a Base64 string or an array containing the file name and Base64 string.
  • File (Drive). The field is linked to Drive. It stores the ID of the Drive object. The methods disk.folder.uploadfile, disk.storage.uploadfile, and disk.file.* are suitable for uploading and updating such files.

Relationships with Other Objects

Files are associated with CRM entities, Drive, catalogs, chats, tasks, sites, and other Bitrix24 tools.

Main Methods for Working with Files

Task

Methods

Upload a file to Drive

disk.folder.uploadfile, disk.storage.uploadfile

Update a file on Drive

disk.file.uploadversion

Get information about a file on Drive

disk.file.get

Delete a file on Drive

disk.file.delete

Get a link to a file on Drive

disk.file.getExternalLink

How to Get Started

  1. Determine the type of field: file or file (Drive).
  2. Encode the file in Base64 if you need to transmit the file to a regular field.
  3. URL-encode the Base64 string if the file is transmitted via a GET request or cURL.
  4. Upload the file to Drive and provide the ID of the Drive object if the field is linked to Drive.

How to Choose a Tutorial

If you need

Open

To transmit a new file to a Bitrix24 field or upload it to Drive

How to Upload Files

To replace a file, delete a file, or keep other files in a multiple field

How to Update and Delete Files