Update Cards in landing.block.updateCards
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.
Scope:
landingWho can execute the method: a user with "edit" access permission for the site
The method landing.block.updateCards updates a set of cards in a block and the nodes within those cards in the draft of the page.
This method works with cards described in the cards key of the block manifest. If the page is already published, changes will be visible to visitors after publication through the interface or by using the landing.landing.publication method.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
scope |
Internal scope of landings. It is not related to the REST scope The value of |
|
lid* |
Identifier of the page. The page identifier can be obtained using the landing.landing.getlist method |
|
block* |
Identifier of the block in the draft of the page. The block identifier can be obtained using the landing.block.getlist method with the parameter |
|
data* |
Set of changes for the block cards (detailed description) |
Parameter data
|
Key |
Description |
|
Card selector from the cards section of the block manifest. The value describes the final set of cards for this selector and the changes to their nodes (detailed description). To find available card selectors and presets for a specific block, retrieve the manifest using the landing.block.getmanifest method |
Object
|
Name |
Description |
|
source |
Defines the final order and number of cards (detailed description) |
|
values |
Updates nodes within cards after applying |
Element of the source array
|
Name |
Description |
|
type |
Type of the card source. Possible values: Default - |
|
Value of the card source. For For |
If the source element does not contain type, the method uses the value card. If value is not provided, the method uses index 0.
To create a new card from a preset, specify type with the value preset and pass the preset code from the block manifest in value. For example:
"source": [
{
"type": "card",
"value": 0
},
{
"type": "preset",
"value": "preset_code"
}
]
Element of the values array
Each element of the values array must be an object that contains one or more node changes.
|
Key |
Description |
|
Node selector within the card with position indicated by The position is numbered from The format of the value is the same as the One object in the |
If an element of the values array is not an object, the method will skip it without error. For example, in one element of the array, you can change multiple cards at once:
"values": [
{
".landing-block-node-title@0": "First Card",
".landing-block-node-title@1": "Card from Preset"
}
]
For detailed information on value formats for different node types, refer to the article landing.block.updatenodes and the overview Node Types.
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"lid": 311,
"block": 6058,
"data": {
".landing-block-card": {
"source": [
{
"type": "card",
"value": 0
},
{
"type": "preset",
"value": "preset_code"
}
],
"values": [
{
".landing-block-node-title@0": "First Card",
".landing-block-node-title@1": "Card from Preset"
}
]
}
}
}' \
"https://**put.your-domain-here**/rest/**user_id**/**webhook_code**/landing.block.updateCards.json"
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"lid": 311,
"block": 6058,
"data": {
".landing-block-card": {
"source": [
{
"type": "card",
"value": 0
},
{
"type": "preset",
"value": "preset_code"
}
],
"values": [
{
".landing-block-node-title@0": "First Card",
".landing-block-node-title@1": "Card from Preset"
}
]
}
},
"auth": "**put_access_token_here**"
}' \
"https://**put.your-domain-here**/rest/landing.block.updateCards.json"
try
{
const response = await $b24.callMethod(
'landing.block.updateCards',
{
lid: 311,
block: 6058,
data: {
'.landing-block-card': {
source: [
{
type: 'card',
value: 0
},
{
type: 'preset',
value: 'preset_code'
}
],
values: [
{
'.landing-block-node-title@0': 'First Card',
'.landing-block-node-title@1': 'Card from Preset'
}
]
}
}
}
);
const result = response.getData().result;
console.info(result);
}
catch (error)
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'landing.block.updateCards',
[
'lid' => 311,
'block' => 6058,
'data' => [
'.landing-block-card' => [
'source' => [
[
'type' => 'card',
'value' => 0,
],
[
'type' => 'preset',
'value' => 'preset_code',
],
],
'values' => [
[
'.landing-block-node-title@0' => 'First Card',
'.landing-block-node-title@1' => 'Card from Preset',
],
],
],
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . var_export($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error updating block cards: ' . $e->getMessage();
}
BX24.callMethod(
'landing.block.updateCards',
{
lid: 311,
block: 6058,
data: {
'.landing-block-card': {
source: [
{
type: 'card',
value: 0
},
{
type: 'preset',
value: 'preset_code'
}
],
values: [
{
'.landing-block-node-title@0': 'First Card',
'.landing-block-node-title@1': 'Card from Preset'
}
]
}
}
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'landing.block.updateCards',
[
'lid' => 311,
'block' => 6058,
'data' => [
'.landing-block-card' => [
'source' => [
[
'type' => 'card',
'value' => 0,
],
[
'type' => 'preset',
'value' => 'preset_code',
],
],
'values' => [
[
'.landing-block-node-title@0' => 'First Card',
'.landing-block-node-title@1' => 'Card from Preset',
],
],
],
],
]
);
if (isset($result['error']))
{
echo 'Error: ' . $result['error_description'];
}
else
{
echo '<pre>';
print_r($result['result']);
echo '</pre>';
}
Response Handling
HTTP Status: 200
{
"result": true,
"time": {
"start": 1774525085,
"finish": 1774525085.858169,
"duration": 0.8581690788269043,
"processing": 0,
"date_start": "2026-03-26T14:38:05+02:00",
"date_finish": "2026-03-26T14:38:05+02:00",
"operating_reset_at": 1774525685,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Result of the card update. Returns |
|
time |
Information about the execution time of the request |
Error Handling
HTTP Status: 400
{
"error": "MISSING_PARAMS",
"error_description": "Not enough call parameters, missing: data"
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Code |
Description |
|
|
Required parameter |
|
|
Page with identifier |
|
|
Block with identifier |
|
|
User does not have permission to edit the site |
|
|
The server could not confirm that the changes were applied correctly. The error depends on server settings and is not related to the request parameters |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not permitted for calls using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The HTTPS protocol is required for method calls |
|
|
|
The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it |
|
|
|
The REST API is only available on commercial plans |
|
|
|
The user associated with the access token or webhook used to call the method lacks the necessary permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the portal administrator has restricted access to this application to specific users only |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Clone Card of Block landing.block.clonecard
- Remove Card from Block landing.block.removecard
- Update Nodes of the Block landing.block.updatenodes
- Add Card to Block landing.block.addcard
- Get the Manifest of the `landing.block.getmanifest` Method