Get a List of Templates for Creating Pages landing.demos.getPageList

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

Who can execute the method: a user with View access permission in the Sites section

The method landing.demos.getPageList retrieves a list of file demo templates for pages.

Method Parameters

Required parameters are marked with *

Name
type

Description

type*
string

Template type.

Possible values:

  • page — templates for pages
  • store — templates for stores
  • knowledge — templates for knowledge bases
  • group — templates for groups
  • mainpage — templates for main pages

filter
object

Object format:

{
            field_1: value_1,
            field_2: value_2,
            ...,
            field_n: value_n
        }
        

where:

  • field_n — filter field
  • value_n — filter value

Filtering is applied to the top-level fields of the template object.

You can filter by fields from the Page Template Type section. Nested fields (e.g., DATA.*) are not considered in the filter

Code Examples

How to Use Examples in Documentation

Example of retrieving a list of page templates, where:

  • type — code of the template set
  • filter — filter by template fields
curl -X POST \
          -H "Content-Type: application/json" \
          -d '{
            "type": "page",
            "filter": {
              "TYPE": "PAGE"
            }
          }' \
          "https://**put.your-domain-here**/rest/**user_id**/**webhook_code**/landing.demos.getPageList.json"
        
curl -X POST \
          -H "Content-Type: application/json" \
          -d '{
            "type": "page",
            "filter": {
              "TYPE": "PAGE"
            },
            "auth": "**put_access_token_here**"
          }' \
          "https://**put.your-domain-here**/rest/landing.demos.getPageList.json"
        
try
        {
        	const response = await $b24.callMethod(
        		'landing.demos.getPageList',
        		{
        			type: 'page',
        			filter: {
        				TYPE: 'PAGE'
        			}
        		}
        	);
        
        	console.info(response.getData().result);
        }
        catch (error)
        {
        	console.error(error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'landing.demos.getPageList',
                    [
                        'type' => 'page',
                        'filter' => [
                            'TYPE' => 'PAGE',
                        ],
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error getting page demo list: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'landing.demos.getPageList',
            {
                type: 'page',
                filter: {
                    TYPE: 'PAGE'
                }
            },
            function(result)
            {
                if (result.error())
                {
                    console.error(result.error());
                }
                else
                {
                    console.info(result.data());
                }
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'landing.demos.getPageList',
            [
                'type' => 'page',
                'filter' => [
                    'TYPE' => 'PAGE',
                ],
            ]
        );
        
        echo '<pre>';
        print_r($result);
        echo '</pre>';
        

Response Handling

HTTP Status: 200

{
            "result": {
                "empty": {
                    "ID": "empty",
                    "XML_ID": "empty",
                    "TYPE": ["PAGE", "KNOWLEDGE", "GROUP", "MAINPAGE"],
                    "TITLE": "Empty Page",
                    "ACTIVE": true,
                    "PUBLICATION": false,
                    "LOCK_DELETE": false,
                    "AVAILABLE": true,
                    "SINGLETON": false,
                    "SECTION": [],
                    "DESCRIPTION": "Create your own website from scratch and attract customers!",
                    "PREVIEW": "//bitrix24.com/bitrix/components/bitrix/landing.demo/data/page/empty/preview.jpg",
                    "PREVIEW2X": "//bitrix24.com/bitrix/components/bitrix/landing.demo/data/page/empty/preview@2x.jpg",
                    "PREVIEW3X": "//bitrix24.com/bitrix/components/bitrix/landing.demo/data/page/empty/preview@3x.jpg",
                    "APP_CODE": "",
                    "REST": 0,
                    "DATA": {
                        "name": "Empty Page",
                        "active": true,
                        "type": ["PAGE", "KNOWLEDGE", "GROUP", "MAINPAGE"],
                        "items": [],
                        "version": 1,
                        "old_id": 402,
                        "encoded": true,
                        "charset": "UTF-8"
                    }
                },
                "search-result": {
                    "ID": "search-result",
                    "XML_ID": "search-result",
                    "TYPE": ["PAGE", "KNOWLEDGE", "GROUP"],
                    "TITLE": "Search Results",
                    "ACTIVE": false,
                    "PUBLICATION": true,
                    "SECTION": ["dynamic"],
                    "DATA": {
                        "code": "search-result",
                        "section": ["dynamic"],
                        "publication": true,
                        "layout": [],
                        "items": {
                            "#block3430": {
                                "code": "59.1.search"
                            }
                        },
                        "encoded": true,
                        "charset": "UTF-8"
                    }
                }
            },
            "time": {
                "start": 1774625365,
                "finish": 1774625365.92986,
                "duration": 0.9298601150512695,
                "processing": 0,
                "date_start": "2026-03-27T18:29:25+02:00",
                "date_finish": "2026-03-27T18:29:25+02:00",
                "operating_reset_at": 1774625965,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
object | array

Map of page demo templates in the format:

{
            "template_code": page_template
        }
        

where:

  • template_code — template code
  • page_template — page template object more details

If no suitable templates are found, the method returns an empty array result: [] without an error.

The composition of template fields may vary and depends on the specific template

time
time

Information about the execution time of the request

Page Template Type

Name
type

Description

ID
string

Template identifier

XML_ID
string

External template code

TYPE
string[] | string

Types for which the template is available.

For file templates, an array is usually returned; for registered application templates — a string

TITLE
string

Template title

ACTIVE
boolean

Active status

PUBLICATION
boolean

Publication availability status

LOCK_DELETE
boolean

Deletion prohibition status

AVAILABLE
boolean

Template availability status

SINGLETON
boolean

Singleton status

SECTION
string[]

Template sections

DESCRIPTION
string

Template description

PREVIEW
string

Preview 1x

PREVIEW2X
string

Preview 2x

PREVIEW3X
string

Preview 3x

APP_CODE
string

Application code

REST
integer

REST template status

DATA
object | array

Template data from file source more details.

For registered application templates, an empty array may be returned

Template DATA Structure

Name
type

Description

code
string

Template code in export data

name
string

Template name in export data

type
string[]

Template types.

Possible values:

  • page — templates for pages
  • store — templates for stores
  • knowledge — templates for knowledge bases
  • group — templates for groups
  • mainpage — templates for main pages

description
string | null

Template description

active
boolean

Template active status in export data

publication
boolean

Template publication status in export data

singleton
boolean

Template singleton status in export data

lock_delete
boolean

Deletion prohibition status in export data

preview
string

Preview 1x in export data

preview2x
string

Preview 2x in export data

preview3x
string

Preview 3x in export data

preview_url
string

Preview link in export data

show_in_list
string

Show in list status (Y/N)

sort
integer

Template sorting index

section
string[]

Template sections in export data

parent
string

Parent template/site code

disable_import
string

Import prohibition flag in template data (e.g., Y)

is_webform_page
string

CRM form page flag (e.g., Y)

fields
object

Template fields more details.

Codes for fields.ADDITIONAL_FIELDS can be found in the Additional Page Fields section

items
array | object

Template composition more details

layout
array | object

Template layout data more details

folders
array | object

Template folders more details

syspages
array | object

Template system pages more details

master_pages
array

List of template master pages more details

version
integer

Data format version

old_id
integer | string

Original identifier (may come as a number or string depending on the template)

encoded
boolean

Added by the method with a value of true if the DATA contains the items field

charset
string

Added by the method with a value of UTF-8 if the DATA contains the items field

Error Handling

HTTP Status: 400

{
            "error": "ERROR_ARGUMENT",
            "error_description": "The value of an argument 'filter' has an invalid type",
            "argument": "filter"
        }
        

Name
type

Description

error
string

String error code. It may consist of digits, Latin letters, and underscores

error_description
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

Value

ERROR_ARGUMENT

The value of an argument 'filter' has an invalid type

The filter parameter is passed in an incorrect type

MISSING_PARAMS

Insufficient call parameters

The required parameter type is missing

ACCESS_DENIED

Insufficient permissions

The user did not pass the general access checks for the Landing module

TYPE_ERROR

Data type error

Method call with incorrect parameter types

SYSTEM_ERROR

Internal error

Error executing the method on the server side

Statuses and System Error Codes

HTTP Status: 20x, 40x, 50x

The errors described below may occur when calling any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

405

ERROR_BATCH_METHOD_NOT_ALLOWED
Method is not allowed for batch usage

The current method is not permitted for calls using batch

400

ERROR_BATCH_LENGTH_EXCEEDED
Max batch length exceeded

The maximum length of parameters passed to the batch method has been exceeded

401

NO_AUTH_FOUND
Wrong authorization data

Invalid access token or webhook code

400

INVALID_REQUEST
Https required

The HTTPS protocol is required for method calls

503

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it

403

ACCESS_DENIED
REST API is available only on commercial plans

The REST API is only available on commercial plans

403

INVALID_CREDENTIALS
Invalid request credentials

The user associated with the access token or webhook used to call the method lacks the necessary permissions

404

ERROR_MANIFEST_IS_NOT_AVAILABLE
Manifest is not available

The manifest is not available

403

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

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

401

expired_token
The access token provided has expired

The provided access token has expired

403

user_access_error
The user does not have access to the application

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

500

PORTAL_DELETED
Portal was deleted

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