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 Req. Description
id (path) number yes Page identifier

Fields to update (body)

Field Type Description
title string Page title, up to 255 characters
code string Symbolic code of the page. Must not contain /. If the code is already taken on the site — a numeric suffix is added
description string Arbitrary description
siteId number Owner site ID. List: GET /v1/sites
public string Public flag (Y/N)
sitemap string Include in the sitemap (Y/N)
xmlId string External code
folderId number ID of the site's section folder
tplId number Template 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

Terminal
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

Terminal
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

javascript
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

javascript
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

The full object of the updated page is returned.

Field Type Description
id number Page identifier
title string Page title
code string Symbolic code of the page
siteId number Site identifier
active boolean Whether the page is active
description string | null Page description
createdById number Identifier of the employee who created it
dateCreate datetime Creation date. A string in the account locale format, not ISO 8601
dateModify datetime Last modification date (after the update)

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; new Date() cannot be trusted on such a value. Details: Field reference.

Response example

JSON
{
  "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:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Slash is forbidden in the landing address."
  }
}

Errors

HTTP error.code Marker in error.message Description
400 READONLY_FIELD A read-only field was passed in the body — for example active. The body is not applied at all
401 TOKEN_MISSING The API key has no configured tokens
403 BITRIX_ACCESS_DENIED The user does not have permission to change this page
403 SCOPE_DENIED The API key does not have the landing scope
404 ENTITY_NOT_FOUND A page with this id is not found or deleted
422 BITRIX_ERROR Slash is forbidden in the landing address A / character was passed in code
422 BITRIX_ERROR Page address cannot be empty An empty string was passed in code
422 BITRIX_ERROR Invalid page address A value in the __ format was passed in code

Full list of general API errors — Errors.

See also