Exporting the site landing.site.fullExport
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
landingWho can execute the method: user with "export" access permission for sites
The method landing.site.fullExport exports the site and its pages into an array for subsequent import, for example, via landing.demos.register.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
id* |
Site identifier. The site identifier can be obtained using the method landing.site.getList or from the result of the method landing.site.add |
|
params |
Additional export parameters (detailed description) |
Pages within the export are selected in the order of ID ASC and returned in a single response.
Parameter params
Required parameters are marked with *
|
Name |
Description |
|
edit_mode |
Hook export mode. When set to |
|
scope |
Internal scope of the landings. It is not related to the REST scope For |
|
hooks_disable |
Codes of additional fields to be excluded from If the parameter is not provided, an empty array is used. Regardless of the input, the method always additionally excludes |
|
code |
Code of the exported site. If not provided, the current site code is used without leading or trailing Only Latin letters and digits are allowed ( |
|
name |
Name of the site in the export. If not provided, the current site name is used |
|
description |
Description of the site in the export. If not provided, the current site description is used |
|
preview |
URL of the main preview image. Defaults to an empty string |
|
preview2x |
URL of the enlarged preview image. Defaults to an empty string |
|
preview3x |
URL of the retina preview. Defaults to an empty string |
|
preview_url |
URL of the template preview. Defaults to an empty string |
The parameters name, description, preview, preview2x, preview3x, and preview_url apply to the page data only if the site contains a single page. If there are multiple pages, these parameters set the top level of the site export, and the page data is taken from the current values of each page.
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"id": 326,
"params": {
"edit_mode": "Y",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview_url": "https://example.com/previews/myfirstsite2026"
}
}' \
"https://**put.your-domain-here**/rest/**user_id**/**webhook_code**/landing.site.fullExport.json"
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"id": 326,
"params": {
"edit_mode": "Y",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview_url": "https://example.com/previews/myfirstsite2026"
},
"auth": "**put_access_token_here**"
}' \
"https://**put.your-domain-here**/rest/landing.site.fullExport.json"
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
// Shape of the payload returned in result (match the "response handling" section of the page)
type FullExportResult = {
charset: string
code: string
site_code: string
name: string
description: string
preview: string
preview2x: string
preview3x: string
preview_url: string
show_in_list: string
type: string
version: number
fields: {
ADDITIONAL_FIELDS: Record<string, unknown> | unknown[]
TITLE: string
LANDING_ID_INDEX: string | number
LANDING_ID_404: string | number
}
layout: Record<string, unknown> | unknown[]
folders: Record<string, unknown> | unknown[]
syspages: Record<string, unknown> | unknown[]
items: Record<string, unknown>
}
try {
const response = await $b24.actions.v2.call.make<FullExportResult>({
method: 'landing.site.fullExport',
params: {
id: 326,
params: {
edit_mode: 'Y',
code: 'myfirstsite2026',
name: 'Car workshop site',
description: 'Site for car service',
preview_url: 'https://example.com/previews/myfirstsite2026',
},
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info(result.code, result.name, Object.keys(result.items))
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function exportSite() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'landing.site.fullExport',
params: {
id: 326,
params: {
edit_mode: 'Y',
code: 'myfirstsite2026',
name: 'Car workshop site',
description: 'Site for car service',
preview_url: 'https://example.com/previews/myfirstsite2026',
},
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info(result.code, result.name, Object.keys(result.items))
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', exportSite)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.landing.site.full_export(
bitrix_id=326,
params={
"edit_mode": "Y",
"code": "myfirstsite2026",
"name": "Car workshop site",
"description": "Site for car service",
"preview_url": "https://example.com/previews/myfirstsite2026",
},
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
try {
$response = $b24Service
->core
->call(
'landing.site.fullExport',
[
'id' => 326,
'params' => [
'edit_mode' => 'Y',
'code' => 'myfirstsite2026',
'name' => 'Auto Repair Shop',
'description' => 'Website for auto service',
'preview_url' => 'https://example.com/previews/myfirstsite2026',
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error exporting site: ' . $e->getMessage();
}
BX24.callMethod(
'landing.site.fullExport',
{
id: 326,
params: {
edit_mode: 'Y',
code: 'myfirstsite2026',
name: 'Auto Repair Shop',
description: 'Website for auto service',
preview_url: 'https://example.com/previews/myfirstsite2026'
}
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'landing.site.fullExport',
[
'id' => 326,
'params' => [
'edit_mode' => 'Y',
'code' => 'myfirstsite2026',
'name' => 'Auto Repair Shop',
'description' => 'Website for auto service',
'preview_url': 'https://example.com/previews/myfirstsite2026',
],
]
);
if (isset($result['error']))
{
echo 'Error: ' . $result['error_description'];
}
else
{
echo '<pre>';
print_r($result['result']);
echo '</pre>';
}
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "landing.site.fullExport", b24.Params{
"id": 326,
"params": b24.Params{
"edit_mode": "Y",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview_url": "https://example.com/previews/myfirstsite2026",
},
})
if err != nil {
return fmt.Errorf("landing.site.fullExport: %w", err)
}
var item struct {
Charset string `json:"charset"`
Code string `json:"code"`
SiteCode string `json:"site_code"`
Name string `json:"name"`
Description string `json:"description"`
Preview string `json:"preview"`
}
if err := json.Unmarshal(res.Result, &item); err != nil {
return fmt.Errorf("parse response: %w", err)
}
fmt.Println(item.Charset, item.Code)
Response Handling
HTTP Status: 200
{
"result": {
"charset": "UTF-8",
"code": "myfirstsite2026",
"site_code": "/dgiy8z1opr/",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview": "",
"preview2x": "",
"preview3x": "",
"preview_url": "https://example.com/previews/myfirstsite2026",
"show_in_list": "Y",
"type": "page",
"version": 3,
"fields": {
"ADDITIONAL_FIELDS": {
"COOKIES_USE": "N",
"B24BUTTON_COLOR": "site",
"BACKGROUND_PICTURE": "https://cdn.com.bitrix24.com/.../15_1x.jpg",
"THEME_USE": "Y"
},
"TITLE": "Auto Repair Shop",
"LANDING_ID_INDEX": "myfirstsite2026",
"LANDING_ID_404": "0"
},
"layout": [],
"folders": [],
"syspages": [],
"items": {
"myfirstsite2026": {
"old_id": "2213",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview": "",
"preview2x": "",
"preview3x": "",
"preview_url": "https://example.com/previews/myfirstsite2026",
"show_in_list": "Y",
"type": "page",
"version": 3,
"fields": {
"TITLE": "Auto Repair Shop",
"RULE": null,
"ADDITIONAL_FIELDS": {
"B24BUTTON_USE": "N",
"METAOG_TITLE": "Vacation Home in Germany Villa Randu",
"THEME_USE": "N"
}
},
"layout": [],
"items": {
"#block28175": {
"old_id": 28175,
"code": "0.menu_02",
"access": "X",
"anchor": "b2884",
"nodes": {
".landing-block-node-menu-list-item-link": [
{
"href": "#cottages",
"target": "_self",
"text": "Villas"
}
]
},
"style": {
".navbar": [
"navbar navbar-expand-lg p-0 g-px-15 u-navbar-align-right"
]
},
"attrs": {
".navbar-collapse": [
{
"id": "navBar2884"
}
]
}
}
}
}
}
},
"time": {
"start": 1773161828.471138,
"finish": 1773161828.871144,
"duration": 0.4000060558319092,
"processing": 0.10344195365905762,
"date_start": "2026-03-10T19:57:08+02:00",
"date_finish": "2026-03-10T19:57:08+02:00",
"operating_reset_at": 1773162428,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
Fields of the exported site. If the site is not found in the selection or there are no available pages for export, an empty array |
|
|
time |
Information about the execution time of the request |
Object result
|
Name |
Description |
|
charset |
Encoding of the exported set, usually |
|
code |
Code of the site in the export |
|
site_code |
Original site code |
|
name |
Name of the site |
|
description |
Description of the site |
|
preview |
URL of the main preview image |
|
preview2x |
URL of the enlarged preview image |
|
preview3x |
URL of the retina preview |
|
preview_url |
URL of the preview |
|
show_in_list |
Flag for display in the template list |
|
type |
Type of the site in lowercase |
|
version |
Version of the export format. The method returns |
|
fields |
Site fields (detailed description) |
|
Site template data. If the template is not linked, an empty array |
|
|
Groups of pages by folders in the format If there are no folders, |
|
|
System pages in the format If system pages are not defined, |
|
|
items |
Export of the site's pages, where the object key is the page code (detailed description) |
Object fields
|
Name |
Description |
|
Additional fields of the site after filtering by |
|
|
TITLE |
Site title |
|
Code or identifier of the main page |
|
|
Code or identifier of the |
Object layout
|
Name |
Description |
|
code |
XML_ID of the site template |
|
ref |
Codes of pages associated with the site template |
Object items
|
Name |
Description |
|
|
Export of an individual page (detailed description) |
Object page
|
Name |
Description |
|
Original page identifier |
|
|
code |
Page code in the export |
|
name |
Page name |
|
description |
Page description |
|
preview |
URL of the main preview image of the page |
|
preview2x |
URL of the enlarged preview image of the page |
|
preview3x |
URL of the retina preview of the page |
|
preview_url |
URL of the page preview |
|
show_in_list |
Flag for displaying the page |
|
type |
Type of the page site in lowercase |
|
version |
Version of the page export format |
|
fields |
Page fields (detailed description) |
|
Page template data. If the template is not linked, an empty array |
|
|
Page blocks (detailed description) |
Object fields of the page
|
Name |
Description |
|
TITLE |
Page title |
|
RULE |
Page routing rule |
|
Additional fields of the page after filtering by |
Object layout of the page
|
Name |
Description |
|
code |
XML_ID of the page template |
|
ref |
Codes of pages associated with the page template |
Object blocks of the page
|
Name |
Description |
|
|
Export of a page block (detailed description) |
Object block
Fields of the block that do not contain data are removed from the result and may be absent in the object
|
Name |
Description |
|
Original block identifier |
|
|
code |
Block code |
|
access |
Block access level |
|
anchor |
Local anchor of the block |
|
repo_block |
Block data from the repository (detailed description) |
|
cards |
Export of block cards |
|
nodes |
Export of block nodes |
|
menu |
Export of block menu |
|
style |
Export of block styles |
|
attrs |
Export of block attributes |
|
dynamic |
Export of block dynamic parameters |
Object repo_block
|
Name |
Description |
|
app_code |
Code of the source application of the block |
|
xml_id |
XML_ID of the block in the repository |
Error Handling
HTTP Status: 400
{
"error": "SYSTEM_ERROR",
"error_description": "The parameter code can only consist of Latin letters and digits."
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Code |
Description |
|
|
Required parameter |
|
|
Insufficient rights to access sites |
|
|
AI site export is not supported |
|
|
Parameter of incorrect type was provided |
|
|
Internal execution error, for example, |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it 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 |