For AI agents: markdown of this page — /docs-content-en/entities/pages/update.md documentation index — /llms.txt
Update a page
PATCH /v1/pages/:id
Updates the fields of an existing page. Pass only the fields you want to change, flat at the root of the JSON — without a fields wrapper. Fields that are not passed keep their current values.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionPage identifier. List: GET /v1/pages |
Fields to update (body)
| Field | Type | Description |
|---|---|---|
Fieldtitle |
Typestring | DescriptionPage title, up to 255 characters |
Fieldcode |
Typestring | DescriptionSymbolic code of the page. Must not contain /. If the code is already taken on the site, a numeric suffix is added |
Fielddescription |
Typestring | DescriptionArbitrary description |
FieldsiteId |
Typenumber | DescriptionOwner site ID. List: GET /v1/sites |
Fieldpublic |
Typestring | DescriptionPublic flag (Y/N) |
Fieldsitemap |
Typestring | DescriptionInclude in the sitemap (Y/N) |
FieldxmlId |
Typestring | DescriptionExternal code |
FieldfolderId |
Typenumber | DescriptionID of the site's section folder |
FieldtplId |
Typenumber | DescriptionTemplate ID |
The active field is not accepted in the body. A request carrying it is rejected as a whole — the response is 400 READONLY_FIELD, and the remaining body fields are not applied. Publishing and unpublishing are separate calls: POST /v1/pages/:id/publication and POST /v1/pages/:id/unpublish.
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/pages/2295" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Spring sale — updated",
"description": "Discounts up to 50%"
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/pages/2295" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Spring sale — updated",
"description": "Discounts up to 50%"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/pages/2295', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Spring sale — updated',
description: 'Discounts up to 50%',
}),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/pages/2295', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Spring sale — updated',
description: 'Discounts up to 50%',
}),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionThe page after the update |
Fielddata.id |
Typenumber | DescriptionPage identifier |
Fielddata.title |
Typestring | DescriptionPage title |
Fielddata.code |
Typestring | DescriptionSymbolic code of the page |
Fielddata.siteId |
Typenumber | DescriptionSite identifier |
Fielddata.active |
Typeboolean | DescriptionWhether the page is active |
Fielddata.description |
Typestring | null | DescriptionPage description |
Fielddata.createdById |
Typenumber | DescriptionIdentifier of the employee who created the page. List: GET /v1/users |
Fielddata.dateCreate |
Typedatetime | DescriptionCreation date. A string in the account locale format, not ISO 8601 |
Fielddata.dateModify |
Typedatetime | DescriptionLast modification date, after the update |
The main fields are shown. Full list: Field reference.
Date format.
dateCreateanddateModifyare strings in the account locale format, not ISO 8601 (30.12.2021 12:30:52in the RU locale,12/30/2021 12:30:52 pmin the EN locale). The format is the same in the list and in the card. Do not rely onnew Date()to parse such a value. Details: Field reference.
Response example
{
"success": true,
"data": {
"id": 2295,
"title": "Spring sale — updated",
"code": "spring-sale",
"siteId": 3,
"active": false,
"description": "Discounts up to 50%",
"createdById": 1,
"dateCreate": "08.05.2026 11:49:33",
"dateModify": "08.05.2026 12:14:08"
}
}
Error response example
422 — a slash in code:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "Slash is forbidden in the landing address."
}
}
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 body is not applied at all |
| HTTP401 | error.codeTOKEN_MISSING |
Marker in error.message— | DescriptionThe API key has no configured tokens |
| HTTP403 | error.codeBITRIX_ACCESS_DENIED |
Marker in error.message— | DescriptionThe user does not have permission to change this page |
| HTTP403 | error.codeSCOPE_DENIED |
Marker in error.message— | DescriptionThe API key does not have the landing scope |
| HTTP404 | error.codeENTITY_NOT_FOUND |
Marker in error.message— | DescriptionA page with this id was not found or has been deleted |
| HTTP422 | error.codeBITRIX_ERROR |
Marker in error.messageSlash is forbidden in the landing address |
DescriptionA / character was passed in code |
| HTTP422 | error.codeBITRIX_ERROR |
Marker in error.messagePage address cannot be empty |
DescriptionAn empty string was passed in code |
| HTTP422 | error.codeBITRIX_ERROR |
Marker in error.messageInvalid page address |
DescriptionA value in the __ format was passed in code |
Full list of general API errors — Errors.