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: landing

Who 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
type

Description

id*
integer

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
object

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
type

Description

edit_mode
string

Hook export mode. When set to Y, edit mode is enabled. The default is standard mode

scope
string

Internal scope of the landings. It is not related to the REST scope landing or landing_cloud in the method name.

For GROUP, KNOWLEDGE, and MAINPAGE, the value of scope must correspond to the type of the exported site

hooks_disable
string[]

Codes of additional fields to be excluded from ADDITIONAL_FIELDS at the site and page level.

If the parameter is not provided, an empty array is used. Regardless of the input, the method always additionally excludes B24BUTTON_CODE and FAVICON_PICTURE

code
string

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 ([a-z0-9], without separators)

name
string

Name of the site in the export. If not provided, the current site name is used

description
string

Description of the site in the export. If not provided, the current site description is used

preview
string

URL of the main preview image. Defaults to an empty string

preview2x
string

URL of the enlarged preview image. Defaults to an empty string

preview3x
string

URL of the retina preview. Defaults to an empty string

preview_url
string

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
type

Description

result
object | array

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 [] is returned (detailed description)

time
time

Information about the execution time of the request

Object result

Name
type

Description

charset
string

Encoding of the exported set, usually UTF-8

code
string

Code of the site in the export

site_code
string

Original site code

name
string

Name of the site

description
string

Description of the site

preview
string

URL of the main preview image

preview2x
string

URL of the enlarged preview image

preview3x
string

URL of the retina preview

preview_url
string

URL of the preview

show_in_list
string

Flag for display in the template list Y/N

type
string

Type of the site in lowercase

version
integer

Version of the export format. The method returns 3

fields
object

Site fields (detailed description)

layout
object | array

Site template data. If the template is not linked, an empty array [] is returned (detailed description)

folders
object | array

Groups of pages by folders in the format {"<folder_page_code>": ["<page_code_1>", "..."]}.

If there are no folders, [] is returned

syspages
object | array

System pages in the format {"<system_page_type>": "<page_code>"}.

If system pages are not defined, [] is returned

items
object

Export of the site's pages, where the object key is the page code (detailed description)

Object fields

Name
type

Description

ADDITIONAL_FIELDS
object | array

Additional fields of the site after filtering by hooks_disable

TITLE
string

Site title

LANDING_ID_INDEX
string | integer

Code or identifier of the main page

LANDING_ID_404
string | integer

Code or identifier of the 404 page

Object layout

Name
type

Description

code
string

XML_ID of the site template

ref
string[]

Codes of pages associated with the site template

Object items

Name
type

Description

<page_code>
object

Export of an individual page (detailed description)

Object page

Name
type

Description

old_id
integer | string

Original page identifier

code
string

Page code in the export

name
string

Page name

description
string

Page description

preview
string

URL of the main preview image of the page

preview2x
string

URL of the enlarged preview image of the page

preview3x
string

URL of the retina preview of the page

preview_url
string

URL of the page preview

show_in_list
string

Flag for displaying the page Y/N

type
string

Type of the page site in lowercase

version
integer

Version of the page export format

fields
object

Page fields (detailed description)

layout
object | array

Page template data.

If the template is not linked, an empty array [] is returned (detailed description)

items
object | array

Page blocks (detailed description)

Object fields of the page

Name
type

Description

TITLE
string

Page title

RULE
string | null

Page routing rule

ADDITIONAL_FIELDS
object | array

Additional fields of the page after filtering by hooks_disable

Object layout of the page

Name
type

Description

code
string

XML_ID of the page template

ref
string[]

Codes of pages associated with the page template

Object blocks of the page

Name
type

Description

#block<id>
object

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
type

Description

old_id
integer | string

Original block identifier

code
string

Block code

access
string

Block access level

anchor
string

Local anchor of the block

repo_block
object

Block data from the repository (detailed description)

cards
object

Export of block cards

nodes
object

Export of block nodes

menu
object

Export of block menu

style
object

Export of block styles

attrs
object

Export of block attributes

dynamic
object

Export of block dynamic parameters

Object repo_block

Name
type

Description

app_code
string

Code of the source application of the block

xml_id
string

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
type

Description

error
string

String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only error_description shows the reason

error_description
string

Error message for the developer. Do not show it to the end user without processing

Possible Error Codes

Code

Description

MISSING_PARAMS

Required parameter id is missing

ACCESS_DENIED

Insufficient rights to access sites

AI_SITE_EXPORT_NOT_ALLOWED

AI site export is not supported

TYPE_ERROR

Parameter of incorrect type was provided

SYSTEM_ERROR

Internal execution error, for example, params.code contains characters other than Latin letters and digits

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
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

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

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

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 — REST is available only by subscription

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not 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

401

insufficient_scope
The request requires higher privileges than provided by the webhook token

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 provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

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

Continue Learning