[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fpages\u002Fsystem-pages":3,"docs-tabs-entities\u002Fpages\u002Fsystem-pages":6},{"content":4,"lastmod":5},"## Remove a page's system roles\n\n`DELETE \u002Fv1\u002Fpages\u002F:id\u002Fsystem-pages`\n\nReleases 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.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Page ID. List: [`GET \u002Fv1\u002Fpages`](\u002Fdocs\u002Fentities\u002Fpages\u002Flist) |\n| `scope` (query) | string | no | Site area: `KNOWLEDGE` — knowledge base, `GROUP` — workgroup pages, `MAINPAGE` — main pages. Omit the parameter for pages of all other sites |\n\nNo request body is needed.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F42\u002Fsystem-pages\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F42\u002Fsystem-pages\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F42\u002Fsystem-pages', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F42\u002Fsystem-pages', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | array | Site 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 |\n| `data[].type` | string | Role: `mainpage`, `catalog`, `personal`, `cart`, `order`, `payment`, `compare`, `feedback`. What each one means — [System pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages) |\n| `data[].pageId` | number | ID of the page assigned to the role. Get the page: [`GET \u002Fv1\u002Fpages\u002F:id`](\u002Fdocs\u002Fentities\u002Fpages\u002Fget) |\n| `data[].title` | string | Page title |\n| `data[].deleted` | boolean | The page is in the trash |\n| `data[].active` | boolean | The page is published |\n\n## Response example\n\nThe roles of page `42` are removed, and the site keeps the `cart` role of page `43`:\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"type\": \"cart\",\n      \"pageId\": 43,\n      \"title\": \"Cart\",\n      \"deleted\": false,\n      \"active\": true\n    }\n  ]\n}\n```\n\n## Error response example\n\n422 — before the call, the page had no roles on its own site:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Bitrix24 acknowledged the removal, but cross-site roles cannot be verified without a prior own-site binding\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | `Entity 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 |\n| 400 | `INVALID_PARAMS` | `id must be a positive safe integer` — `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `Unsupported body field` — the body contains a field the method does not accept |\n| 400 | `INVALID_PARAMS` | `Body must be a JSON object` — the body is not a JSON object, for example an array was passed |\n| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query string parameter the method does not accept was passed |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 409 | `PORTAL_ADDRESS_CHANGED` | The 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 |\n| 422 | `BITRIX_ERROR` | `Bitrix24 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 |\n| 422 | `BITRIX_ERROR` | `Bitrix24 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 |\n| 422 | `BITRIX_ERROR` | `Bitrix24 did not confirm the binding change` — Bitrix24 did not confirm the write |\n| 422 | `BITRIX_ERROR` | `Bitrix24 returned invalid system pages` — Bitrix24 returned the list of bindings in an unexpected format |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only. The request is refused before any call to the Bitrix24 account |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 access tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **A repeated call returns `422`, not `200`.** A second call on the same page, once it has no roles left, gets `422 BITRIX_ERROR`, unlike [removing all site roles](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-delete), which returns `200` on a site with no bindings. Check the result with the site role list [`GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-list) and look for the page's `pageId` in it.\n\n## See also\n\n- [System pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages)\n- [List site system pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-list)\n- [Assign a system page](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-set)\n- [Remove a system page](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-delete-delete)\n- [Remove all site system pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-delete)\n- [Move to trash](\u002Fdocs\u002Fentities\u002Fpages\u002Ftrash)\n","2026-10-20",{},1795415274711]