لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/pages/system-pages.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Remove a page's system roles
DELETE /v1/pages/:id/system-pages
Releases every site system role the page is assigned to in a single call. The page itself stays on the site, and the roles of other pages do not change. Moving a page to the trash does not release its roles, so release them with this method before moving the page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionPage ID. List: GET /v1/pages |
Parameterscope (query) |
Typestring | Requiredno | DescriptionSite area: KNOWLEDGE — knowledge base, GROUP — workgroup pages, MAINPAGE — main pages. Omit the parameter for pages of all other sites |
No request body is needed.
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/42/system-pages" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/42/system-pages" \
-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/pages/42/system-pages', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/pages/42/system-pages', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typearray | DescriptionSite bindings after the page's roles are removed. The array keeps the roles of other pages on the site. Empty array if there are no other bindings |
Fielddata[].type |
Typestring | DescriptionRole: mainpage, catalog, personal, cart, order, payment, compare, feedback. What each one means — System pages |
Fielddata[].pageId |
Typenumber | DescriptionID of the page assigned to the role. Get the page: GET /v1/pages/:id |
Fielddata[].title |
Typestring | DescriptionPage title |
Fielddata[].deleted |
Typeboolean | DescriptionThe page is in the trash |
Fielddata[].active |
Typeboolean | DescriptionThe page is published |
Response example
The roles of page 42 are removed, and the site keeps the cart role of page 43:
{
"success": true,
"data": [
{
"type": "cart",
"pageId": 43,
"title": "Cart",
"deleted": false,
"active": true
}
]
}
Error response example
422 — before the call, the page had no roles on its own site:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "Bitrix24 acknowledged the removal, but cross-site roles cannot be verified without a prior own-site binding"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionEntity not found or not visible — no page with this ID exists, the user cannot access it, or it belongs to a different area: the wrong scope was passed |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid must be a positive safe integer — id is not a positive integer |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionUnsupported body field — the body contains a field the method does not accept |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionBody must be a JSON object — the body is not a JSON object, for example an array was passed |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionUnsupported query parameter — a query string parameter the method does not accept was passed |
| HTTP400 | CodeINVALID_SCOPE |
Descriptionscope is not KNOWLEDGE, GROUP or MAINPAGE |
| HTTP409 | CodePORTAL_ADDRESS_CHANGED |
DescriptionThe self-hosted Bitrix24 has moved to a new address, but the key's webhook was issued for the old one. Reissue the key's webhook |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 acknowledged the removal, but cross-site roles cannot be verified without a prior own-site binding — before the call, the page had no roles on its own site. The removal request was still sent to the Bitrix24 account |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 did not save the binding change; site settings permission may be missing — after the write, the page still holds a role on its own site. Check whether the user has permission to change site settings |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 did not confirm the binding change — Bitrix24 did not confirm the write |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned invalid system pages — Bitrix24 returned the list of bindings in an unexpected format |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only. The request is refused before any call to the Bitrix24 account |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the landing scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 access tokens |
Full list of common API errors — Errors.
Known specifics
- A repeated call returns
422, not200. A second call on the same page, once it has no roles left, gets422 BITRIX_ERROR, unlike removing all site roles, which returns200on a site with no bindings. Check the result with the site role listGET /v1/sites/:id/system-pagesand look for the page'spageIdin it.