For AI agents: markdown of this page — /docs-content-en/entities/sites/fields.md documentation index — /llms.txt
Site fields
GET /v1/sites/fields
Returns a map of all site fields with their type and a read-only flag. Fields without that flag are writable on create and update.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/sites/fields" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/sites/fields" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/fields', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log('Fields:', Object.keys(data.fields).length)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/fields', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
The data object contains a fields map, an aggregatable list of the fields you can group by in aggregation, and a batch list with the operations available in batch mode.
Every field in the fields map is described by the type and readonly keys. The type field also carries a label, a description and an enum of allowed values, each value with its own label. The nullable: true key is present on the eight fields whose value may be absent: description, xmlId, landingIdIndex, landingId404, landingId503, tplCode, smnSiteId, lang. What an absent value looks like for each of them is shown in the table below.
| Field | Bitrix24 | Type | RO | Description |
|---|---|---|---|---|
id |
ID |
number | yes | Site identifier |
title |
TITLE |
string | Name, up to 255 characters | |
code |
CODE |
string | Symbolic code in the URL | |
type |
TYPE |
string | Site type: PAGE, STORE, KNOWLEDGE — created via the API. Responses may also contain VIBE and SMN |
|
active |
ACTIVE |
boolean | Whether the site is active. Not settable through the API — the value is accepted without an error but not saved, activation happens by publishing in the interface | |
domainId |
DOMAIN_ID |
number | Domain identifier | |
description |
DESCRIPTION |
string | null | Description, up to 255 characters. null if not set |
|
xmlId |
XML_ID |
string | null | External identifier. null if not set |
|
landingIdIndex |
LANDING_ID_INDEX |
number | null | Home page. Set in an update after pages are created | |
landingId404 |
LANDING_ID_404 |
number | null | 404 error page. If not assigned — 0 or null |
|
landingId503 |
LANDING_ID_503 |
number | null | 503 error page. If not assigned — 0 or null |
|
deleted |
DELETED |
string | yes | Recycle bin flag: "Y" / "N" |
createdById |
CREATED_BY_ID |
number | yes | Creator. Lookup: GET /v1/users |
modifiedById |
MODIFIED_BY_ID |
number | yes | Last editor. Lookup: GET /v1/users |
dateCreate |
DATE_CREATE |
datetime | yes | Creation date. Bitrix24 locale format, not ISO 8601 |
dateModify |
DATE_MODIFY |
datetime | yes | Last modification date. Bitrix24 locale format |
tplId |
TPL_ID |
number | yes | Site template identifier |
tplCode |
TPL_CODE |
string | null | yes | Template symbolic code. null if the template has no code |
smnSiteId |
SMN_SITE_ID |
string | null | yes | Linked Site Management site of type SMN. null for regular sites |
lang |
LANG |
string | null | yes | Language code, for example ru. null if not set |
special |
SPECIAL |
string | yes | Bitrix24 service flag: "Y" / "N" |
version |
VERSION |
number | yes | Version of the site's internal structure |
Response example
{
"success": true,
"data": {
"fields": {
"id": { "type": "number", "readonly": true },
"title": { "type": "string", "readonly": false },
"type": {
"type": "string",
"readonly": false,
"label": "Site type",
"description": "Site type. PAGE/STORE/KNOWLEDGE are creatable via the API (KNOWLEDGE needs scope: \"KNOWLEDGE\" on create and update). VIBE (a site built in the constructor) and SMN (a link with the \"Site Management\" module) appear in responses only and are read-only.",
"enum": [
{ "value": "PAGE", "label": "Landing" },
{ "value": "STORE", "label": "Online store" },
{ "value": "KNOWLEDGE", "label": "Knowledge base 2.0" },
{ "value": "VIBE", "label": "Constructor site (read-only)" },
{ "value": "SMN", "label": "Site Management link (read-only)" }
]
},
"active": { "type": "boolean", "readonly": false },
"description": { "type": "string", "readonly": false, "nullable": true }
},
"aggregatable": ["type", "active", "deleted", "lang", "tplId", "domainId", "createdById", "modifiedById"],
"batch": ["create", "update", "delete"]
}
}
5 of 22 fields are shown. The full list is in the table above.
Error response example
403 — no scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'landing' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 403 | SCOPE_DENIED |
The API key does not have the landing scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
The full list of common API errors — Errors.