لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/pages.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Pages

Managing landing and online-store pages on the Bitrix24 platform: create, get, update, delete. A page always belongs to a site and inherits its type, PAGE or STORE.

Bitrix24 API: landing.landing.* Scope: landing

Create a page

POST /v1/pages

Creates a new page on the specified site. Fields are passed flat at the root of the JSON — without a fields wrapper. The minimum required fields are title and siteId. A new page is created inactive — active: false.

Request fields (body)

Field Type Required Description
Fieldtitle Typestring Requiredyes DescriptionPage title, up to 255 characters
FieldsiteId Typenumber Requiredyes DescriptionSite identifier. Source: GET /v1/sites
Fieldcode Typestring Requiredno DescriptionSymbolic code of the page in the URL. Must not contain /. If the field is omitted, the code is generated from title. An empty string returns 422 BITRIX_ERROR, except when creating a folder with folder: "Y": then the code is also generated from title. If the code is already taken on the site, a numeric suffix is added
Fielddescription Typestring Requiredno DescriptionArbitrary page description
Fieldpublic Typestring Requiredno DescriptionPublic flag (Y/N)
Fieldsitemap Typestring Requiredno DescriptionInclude in the sitemap (Y/N)
FieldxmlId Typestring Requiredno DescriptionExternal code
FieldfolderId Typenumber Requiredno DescriptionID of the site's section folder
FieldtplId Typenumber Requiredno DescriptionTemplate ID

For the full list of fields, see GET /v1/pages/fields: the endpoint returns a map of all fields with their type, a readonly flag and a label. Fields without a readonly flag are writable. The additional fields listed above are applied on creation alongside title/siteId/code/description.

Publishing is a separate call. The active field is not accepted in the create body: a request carrying it is rejected as a whole with 400 READONLY_FIELD and no page is created. To publish a created page, call POST /v1/pages/:id/publication; to unpublish it, call POST /v1/pages/:id/unpublish.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/pages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Spring sale",
    "code": "spring-sale",
    "siteId": 3,
    "description": "Landing page for a seasonal sale"
  }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/pages" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Spring sale",
    "code": "spring-sale",
    "siteId": 3,
    "description": "Landing page for a seasonal sale"
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/pages', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Spring sale',
    code: 'spring-sale',
    siteId: 3,
    description: 'Landing page for a seasonal sale',
  }),
})

const { success, data } = await res.json()
console.log('Page ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/pages', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Spring sale',
    code: 'spring-sale',
    siteId: 3,
    description: 'Landing page for a seasonal sale',
  }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe created page
Fielddata.id Typenumber DescriptionIdentifier of the created page
Fielddata.title Typestring DescriptionPage title
Fielddata.code Typestring DescriptionActual symbolic code. If the requested code was taken, it carries a numeric suffix
Fielddata.siteId Typenumber DescriptionSite identifier
Fielddata.active Typeboolean DescriptionAlways false for a just-created page
Fielddata.description Typestring | null DescriptionPage description
Fielddata.createdById Typenumber DescriptionIdentifier of the employee who created it
Fielddata.dateCreate Typedatetime DescriptionCreation date. A string in the account locale format, not ISO 8601
Fielddata.dateModify Typedatetime DescriptionLast modification date

The main fields are shown. Full list: Field reference.

Date format. dateCreate and dateModify are strings in the account locale format, not ISO 8601 (30.12.2021 12:30:52 in the RU locale, 12/30/2021 12:30:52 pm in the EN locale). The format is the same in the list and in the card; do not rely on new Date() to parse such a value. Details: Field reference.

The page URL in Bitrix24 is built from id and siteId:

https://<portal>.bitrix24.com/sites/site/<siteId>/view/<id>/

<siteId> — ID of the site the page belongs to (the siteId field in the response). <portal> — the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.

Response example

JSON
{
  "success": true,
  "data": {
    "id": 2295,
    "title": "Spring sale",
    "code": "spring-sale",
    "siteId": 3,
    "active": false,
    "description": "Landing page for a seasonal sale",
    "createdById": 1,
    "dateCreate": "08.05.2026 11:49:33",
    "dateModify": "08.05.2026 11:49:33"
  }
}

Error response example

422 — the required title field was not passed:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Required field \"Page title\" is not filled in"
  }
}

Errors

HTTP error.code Marker in error.message Description
HTTP400 error.codeREADONLY_FIELD Marker in error.message— DescriptionA read-only field was passed in the body — for example active. The page is not created
HTTP422 error.codeBITRIX_ERROR Marker in error.messageis not filled in Descriptiontitle or siteId is missing
HTTP422 error.codeBITRIX_ERROR Marker in error.messageSlash is forbidden in the landing address DescriptionA / character was passed in code — slashes are forbidden in the code
HTTP422 error.codeBITRIX_ERROR Marker in error.messagePage address cannot be empty DescriptionAn empty string was passed in code without indicating that a folder is being created
HTTP422 error.codeBITRIX_ERROR Marker in error.messageInvalid page address DescriptionA value in the __ format was passed in code, e.g. code_12_34
HTTP404 error.codeENTITY_NOT_FOUND Marker in error.messageSite not found DescriptionA nonexistent site identifier was passed in siteId
HTTP403 error.codeBITRIX_ACCESS_DENIED Marker in error.message— DescriptionThe user does not have the "edit" permission for the specified site
HTTP403 error.codeSCOPE_DENIED Marker in error.message— DescriptionThe API key does not have the landing scope
HTTP401 error.codeTOKEN_MISSING Marker in error.message— DescriptionThe API key has no configured tokens

Full list of general API errors — Errors.

See also