Get a List of Templates for Creating Websites landing.demos.getSiteList
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: a user with View access permission in the Sites section
The method landing.demos.getSiteList retrieves a list of file demo templates for websites.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
type* |
Template type. Possible values:
|
|
filter |
Object format:
where:
Filtering is applied to the top-level fields of the template object. You can filter by fields from the Website Template Type. Nested fields (e.g., |
Code Examples
How to Use Examples in Documentation
Example of retrieving a list of website templates, where:
type— code of the template setfilter— filter by website 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.getSiteList.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.getSiteList.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 SiteListResult = Record<string, SiteTemplate>
type SiteTemplate = {
ID: string,
XML_ID: string,
TYPE: string[] | string,
TITLE: string,
ACTIVE: boolean,
PUBLICATION: boolean,
LOCK_DELETE: boolean,
AVAILABLE: boolean,
SINGLETON: boolean,
SECTION: string[],
DESCRIPTION: string,
PREVIEW: string,
PREVIEW2X: string,
PREVIEW3X: string,
APP_CODE: string,
REST: number,
DATA: Record<string, unknown>,
}
try {
const response = await $b24.actions.v2.call.make<SiteListResult>({
method: 'landing.demos.getSiteList',
params: {
type: 'page',
filter: {
TYPE: 'page',
},
},
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('Site demo templates:', Object.keys(result))
}
} 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 fetchSiteList() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'landing.demos.getSiteList',
params: {
type: 'page',
filter: {
TYPE: 'page',
},
},
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('Site demo templates:', Object.keys(result))
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', fetchSiteList)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.landing.demos.get_site_list(
type="page",
filter={
"TYPE": "page",
},
).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.demos.getSiteList',
[
'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 site demo list: ' . $e->getMessage();
}
BX24.callMethod(
'landing.demos.getSiteList',
{
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.getSiteList',
[
'type' => 'page',
'filter' => [
'TYPE' => 'page',
],
]
);
echo '<pre>';
print_r($result);
echo '</pre>';
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "landing.demos.getSiteList", b24.Params{
"type": "page",
"filter": b24.Params{
"TYPE": "page",
},
})
if err != nil {
return fmt.Errorf("landing.demos.getSiteList: %w", err)
}
// The method wraps the response in an object with the "empty" key.
raw, ok := b24.Unwrap(res.Result, "empty")
if !ok {
return fmt.Errorf("no empty key in the response")
}
var item struct {
ID string `json:"ID"`
XMLID string `json:"XML_ID"`
Title string `json:"TITLE"`
Active bool `json:"ACTIVE"`
Publication bool `json:"PUBLICATION"`
LockDelete bool `json:"LOCK_DELETE"`
}
if err := json.Unmarshal(raw, &item); err != nil {
return fmt.Errorf("parse response: %w", err)
}
fmt.Println(item.ID, item.XMLID)
Response Handling
HTTP Status: 200
{
"result": {
"empty": {
"ID": "empty",
"XML_ID": "empty",
"TYPE": ["KNOWLEDGE", "GROUP", "PAGE", "MAINPAGE"],
"TITLE": "Empty Template",
"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/site/empty/preview.jpg",
"PREVIEW2X": "//bitrix24.com/bitrix/components/bitrix/landing.demo/data/site/empty/preview@2x.jpg",
"PREVIEW3X": "//bitrix24.com/bitrix/components/bitrix/landing.demo/data/site/empty/preview@3x.jpg",
"APP_CODE": "",
"REST": 0,
"DATA": {
"name": "Empty Template",
"items": [],
"encoded": true,
"charset": "UTF-8"
}
}
},
"time": {
"start": 1774623040,
"finish": 1774623040.337361,
"duration": 0.33736109733581543,
"processing": 0,
"date_start": "2026-03-27T17:50:40+01:00",
"date_finish": "2026-03-27T17:50:40+01:00",
"operating_reset_at": 1774623640,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
Map of website demo templates in the format:
where:
If no suitable templates are found, the method returns an empty array The composition of template fields may vary and depends on the specific template |
|
|
time |
Information about the request execution time |
Website Template Type
|
Name |
Description |
|
ID |
Template identifier |
|
XML_ID |
External template code |
|
Types for which the template is available. For file templates, an array is usually returned; for registered application templates, a string |
|
|
TITLE |
Template title |
|
ACTIVE |
Active status |
|
PUBLICATION |
Publication availability status |
|
LOCK_DELETE |
Deletion prohibition status |
|
AVAILABLE |
Template availability status |
|
SINGLETON |
Singleton status |
|
SECTION |
Template sections |
|
DESCRIPTION |
Template description |
|
PREVIEW |
Preview 1x |
|
PREVIEW2X |
Preview 2x |
|
PREVIEW3X |
Preview 3x |
|
APP_CODE |
Application code |
|
REST |
REST template status |
|
Template data from file source more details. For registered application templates, an empty array may be returned |
Template DATA Type
|
Name |
Description |
|
code |
Template code in export data |
|
name |
Template name in export data |
|
type |
Template types. Possible values:
|
|
Template description |
|
|
active |
Template active status in export data |
|
singleton |
Template singleton status in export data |
|
lock_delete |
Deletion prohibition status in export data |
|
preview |
Preview 1x in export data |
|
preview2x |
Preview 2x in export data |
|
preview3x |
Preview 3x in export data |
|
preview_url |
Preview link in export data |
|
show_in_list |
Show in list status ( |
|
sort |
Template sort index |
|
fields |
Template fields more details. Codes for |
|
Template composition more details |
|
|
Template layout data more details |
|
|
Template folders more details |
|
|
Template system pages more details |
|
|
master_pages |
List of template master pages more details |
|
version |
Data format version |
|
Original identifier |
|
|
encoded |
Added by the method with the value |
|
charset |
Added by the method with the value |
Error Handling
HTTP Status: 400
{
"error": "ERROR_ARGUMENT",
"error_description": "The value of an argument 'filter' has an invalid type",
"argument": "filter"
}
|
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 |
Value |
|
|
The value of an argument 'filter' has an invalid type |
The |
|
|
Insufficient call parameters |
The required parameter |
|
|
Insufficient permissions |
The user did not pass the general access checks for the Landing module |
|
|
Data type error |
Method call with incorrect parameter types |
|
|
Internal error |
Error executing the method on the server side |
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 |
Continue Learning
- Register a Template in the Site Creation Wizard landing.demos.register
- Get a List of Templates for Creating Pages landing.demos.getPageList
- Get a List of Registered Templates landing.demos.getList
- Delete Registered Template landing.demos.unregister
- Template Localization
- Custom Templates: Overview of Methods