Object Blocks: Overview of Methods
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.
A block is a fragment of a page that includes an HTML structure, content, cards, nodes, attributes, and style settings.
The methods in this group allow you to:
- read the structure and content of a block
- modify the composition and design of a block
- work with cards and block templates
The structure of a block is described in articles about attributes, node types, extended card descriptions, and the manifest file.
Quick navigation: all methods
How a Block Relates to a Page and Repository
A block can exist in two states.
In the repository. This is a block template that has not yet been added to a page. You can retrieve a list of available blocks from the repository using the landing.block.getrepository method, read the manifest through landing.block.getmanifestfile, and obtain the original content using the landing.block.getContentFromRepository method.
On the page. After a block is added to a page, it receives its own ID. You can get a list of the page's blocks using the landing.block.getlist method, and then work with a specific block through landing.block.getbyid, landing.block.getcontent, landing.block.getmanifest, and update methods.
You can add blocks to a page using landing.landing.addblock, move them with landing.landing.upblock and landing.landing.downblock, hide them with landing.landing.hideblock, and delete them with landing.landing.deleteblock.
How a Block is Structured
A block is not displayed on the page in its original form. During rendering, the system wraps it in a service container <div id="anchor" class="block-wrapper block-code">...</div>.
<section class="landing-block">
<div class="text-center g-color-gray-dark-v3 g-pa-10">
<div class="g-width-600 mx-auto">
<div class="landing-block-node-text g-font-size-12 ">
<p>© 2017 All rights reserved. Developed by
<a href="#" class="landing-block-node-link g-color-primary">Bitrix24</a></p>
</div>
</div>
</div>
</section>
In this wrapper:
- anchor — the block's anchor. If the user has not manually changed it, it appears as
block123, where123is the block ID. - block-wrapper — a common class for all blocks.
- block-code — a class that depends on the block's code, where
codeis a safely transformed version of the block's code.
In edit mode, the system creates copies of all blocks before they are published. If you access a block by ID, use the block identifier from the page draft. To ensure changes appear on the published page, publish it using the landing.landing.publication method after editing.
Overview of Methods
Scope:
landingWho can execute the method: depends on the method
Reading Block Data on the Page
|
Method |
Description |
|
Retrieves the list of blocks on the page |
|
|
Retrieves a block by its identifier |
|
|
Retrieves the content of a block |
|
|
Retrieves the manifest of a block already placed on the page |
Modifying Block Content and Parameters
|
Method |
Description |
|
Modifies the content of the block's nodes |
|
|
Modifies the attributes of the block's nodes |
|
|
Modifies the styles of the block |
|
|
Updates the content of the block placed on the page with arbitrary content |
|
|
Changes the tag name of a node |
|
|
Changes the symbolic code of the block's anchor |
|
|
Uploads a file and associates it with the block |
Working with Block Cards
|
Method |
Description |
|
Clones a block card |
|
|
Adds a block card with modified content |
|
|
Removes a block card |
|
|
Massively modifies block cards |
Working with the Block Repository
|
Method |
Description |
|
Retrieves the list of blocks from the repository |
|
|
Retrieves the manifest of a block from the repository |
|
|
Retrieves the content of a block from the repository before it is added to the page |