Files in Knowledge Base 2.0: Methods Overview
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Files in Knowledge Base 2.0 are linked to documents and are used as Markdown attachments: images, videos, and regular files. The note.file.* methods help upload a file, retrieve its metadata, determine the field schema, and return a Markdown block for insertion into a document.
Quick navigation: All Methods
User documentation: Knowledge Base 2.0
Getting Started
- Create a document using the note.document.add method if you do not already have a page to which the file should be linked
- Upload a file using the note.file.add method and retain the returned
idor immediatelyassetMarkdown - If you need to re-retrieve file metadata or a Markdown block by ID, call note.file.get
- Determine the field composition and types using the note.file.field.list and note.file.field.get methods if you are building a form, table, or validation on your side
Limitations and Features
- The
note.file.addmethod only uploads a file and links it to a document, but does not insert the attachment into the document text. After uploading, you must take theassetMarkdownfrom the method response or retrieve it vianote.file.get, and then update the page - The file size limit is taken from the
main.max_file_sizesetting, and if it is not specified, a limit is used25 MiB (25 * 1024 * 1024 bytes). Therefore, the allowed size may vary across different Bitrix24 instances - Only specific file extensions are allowed. If an extension is not in the list of allowed extensions, the file will not be uploaded
Connection with Other Objects
Documents. A file always belongs to a specific page rather than the Knowledge base as a whole. Therefore, before uploading a file, you must first create a document or select an existing document where the attachment should appear. The scenario consists of three steps:
- upload a file using the note.file.add method
- take the
assetMarkdownblock from thenote.file.addresponse or retrieve it using the note.file.get method - insert this block into
markdownand update the document using the note.document.update method
Overview of Methods
Scope:
noteWho can execute the methods: depends on the method
|
Method |
Description |
|
Uploads a file to a document |
|
|
Returns the document file data and a Markdown block for insertion into the document |
|
|
Returns the description of a document file field |
|
|
Returns a list of document file fields |