[{"data":1,"prerenderedAt":12},["ShallowReactive",2],{"docs-entities\u002Fsites\u002Fsystem-pages":3,"docs-tabs-entities\u002Fsites\u002Fsystem-pages":6},{"content":4,"lastmod":5},"# System pages\n\nAssigns site pages to system roles — cart, checkout, customer account and others — reads the assignments, returns a page URL by role, and removes roles one at a time or all at once. The pages themselves stay on the site when a role is removed.\n\nBitrix24 API: `landing.syspage.get`, `landing.syspage.set`, `landing.syspage.getSpecialPage`, `landing.syspage.deleteForSite`\nScope: `landing`\n\n## Operations\n\n- [List site system pages](.\u002Fsystem-pages-list.md) — `GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`\n- [Assign a system page](.\u002Fsystem-pages-set.md) — `PUT \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type`\n- [Get a system page URL](.\u002Fsystem-pages-url.md) — `GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type\u002Furl`\n- [Remove a system page](.\u002Fsystem-pages-delete-delete.md) — `DELETE \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type`\n- [Remove all site system pages](.\u002Fsystem-pages-delete.md) — `DELETE \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`\n\n## Roles\n\nThe role is passed in the request path as `type` and comes back in the `type` response field. Values not in the table below are rejected with `400 INVALID_PARAMS` before any call to Bitrix24.\n\n| Role | Page |\n|------|----------|\n| `mainpage` | Home page |\n| `catalog` | Product catalog |\n| `personal` | Customer account |\n| `cart` | Cart |\n| `order` | Checkout |\n| `payment` | Order payment |\n| `compare` | Product comparison |\n| `feedback` | Feedback |\n\n## Key fields\n\nFields of a single binding. They are returned in every element of the list, assign and single-role remove responses.\n\n| Field | Description |\n|------|----------|\n| `type` | Role from the table above |\n| `pageId` | ID of the page assigned to the role. Site pages: [`GET \u002Fv1\u002Fpages?filter[siteId]=:id`](\u002Fdocs\u002Fentities\u002Fpages\u002Flist) |\n| `title` | Page title |\n| `deleted` | The page is in the trash |\n| `active` | The page is published |\n\n## Before you start\n\n1. **One page per role, any number of roles per page.** Assigning to an occupied role replaces the page on it. The same page can hold several roles at once.\n2. **Only a page of the same site can be assigned.** A page from another site returns `400 INVALID_PARAMS`, and a nonexistent page returns `404 ENTITY_NOT_FOUND`. The page does not need to be published before assignment.\n3. **The trash does not remove a role.** A page moved to the trash keeps its role with `deleted: true`, and its URL by role is still returned. A role is removed only explicitly.\n4. **Writes are verified by rereading.** After a change, write methods reread the site bindings and return them. If the change was not saved, the response is `422 BITRIX_ERROR`, not `200`.\n5. **Repeats behave differently.** Reassigning the same page and removing all roles again both return `200`. Removing a single role again returns `404 ENTITY_NOT_FOUND`.\n6. **Site in a separate scope: knowledge base, workgroup or the `MAINPAGE` scope.** For such a site, pass the `scope` query parameter set to `KNOWLEDGE`, `GROUP` or `MAINPAGE` — without it the site is not found and `404` is returned. For an ordinary site, omit `scope`.\n\n## Typical workflow\n\n1. Find the site: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist).\n2. Find the site pages: [`GET \u002Fv1\u002Fpages?filter[siteId]=:id`](\u002Fdocs\u002Fentities\u002Fpages\u002Flist).\n3. Check which roles are already taken: [`GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`](.\u002Fsystem-pages-list.md).\n4. Assign a page to a role: [`PUT \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002Fcart`](.\u002Fsystem-pages-set.md) with `pageId`.\n5. Get the page URL by role to use in a link: [`GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002Fcart\u002Furl`](.\u002Fsystem-pages-url.md).\n\n## Limits\n\n| Limit | Value |\n|-------|----------|\n| Bindings per site | At most eight — one per role. The list has no pagination |\n| Roles per call | One when assigning and removing. [`DELETE \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`](.\u002Fsystem-pages-delete.md) removes all at once |\n| Request rate | General API limits — [Limits and optimization](\u002Fdocs\u002Foptimization) |\n\n## See also\n\n- [Sites](\u002Fdocs\u002Fentities\u002Fsites)\n- [Pages](\u002Fdocs\u002Fentities\u002Fpages)\n- [Page system roles](\u002Fdocs\u002Fentities\u002Fpages\u002Fsystem-pages)\n- [Page public URL](\u002Fdocs\u002Fentities\u002Fpages\u002Fpublic-url)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-10-14",{"system-pages-list.md":7,"system-pages-set.md":8,"system-pages-url.md":9,"system-pages-delete-delete.md":10,"system-pages-delete.md":11},"## List site system pages\n\n`GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`\n\nReturns the site pages assigned to system roles: cart, checkout, customer account and others.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `active` (query) | boolean | no | `true` — only published pages that are not in the trash. Bindings of the other pages are kept but do not appear in the response. Default `false`: all bindings are returned |\n| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` \u002F `GROUP` \u002F `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. Omit it for an ordinary site |\n\nThe method accepts no other query parameters: for example, `limit` returns `400 INVALID_PARAMS`. There is no pagination: a site has at most eight bindings — one per role.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\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\u002Fsites\u002F223\u002Fsystem-pages', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconst cart = data.find((row) => row.type === 'cart')\nconsole.log('Cart:', cart ? cart.pageId : 'not assigned')\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages', {\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 | Always `true` on success |\n| `data` | array | Site bindings. Empty array for a site without 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\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"type\": \"cart\",\n      \"pageId\": 2371,\n      \"title\": \"Docs test cart\",\n      \"deleted\": false,\n      \"active\": false\n    },\n    {\n      \"type\": \"personal\",\n      \"pageId\": 2373,\n      \"title\": \"Docs test personal\",\n      \"deleted\": false,\n      \"active\": false\n    }\n  ]\n}\n```\n\n## Error response example\n\n404 — no site with this ID:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Entity not found or not visible\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `id must be a positive safe integer` — `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `active must be true or false` — `active` is neither `true` nor `false` |\n| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query parameter the method does not accept was passed |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 404 | `ENTITY_NOT_FOUND` | No site with this ID, the site is not visible to the user, or it belongs to another scope: the wrong `scope` was passed |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned the binding list in an unexpected form: `Bitrix24 returned invalid system pages` |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **The trash does not remove a binding.** A page moved to the trash keeps its role and is returned with `deleted: true` and `active: false`. After the page is restored from the trash, the binding stays the same. A role is removed only explicitly — [`DELETE \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type`](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-delete-delete).\n\n## See also\n\n- [System pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages)\n- [Assign a system page](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-set)\n- [Get a system page URL](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-url)\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- [List pages](\u002Fdocs\u002Fentities\u002Fpages\u002Flist)\n","## Assign a system page\n\n`PUT \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type`\n\nAssigns a site page to a system role, for example making it the cart or the personal account page. If the role is already taken, the new page replaces the previous one.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `type` (path) | string | yes | Role: `mainpage`, `catalog`, `personal`, `cart`, `order`, `payment`, `compare`, `feedback`. What each one means — [System pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages) |\n| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` \u002F `GROUP` \u002F `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. Omit it for an ordinary site |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `pageId` | number | yes | ID of a page on the same site. List of the site's pages: [`GET \u002Fv1\u002Fpages?filter[siteId]=:id`](\u002Fdocs\u002Fentities\u002Fpages\u002Flist) |\n\nThe body accepts no other fields: an extra field returns `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PUT \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"pageId\": 2373}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PUT \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"pageId\": 2373}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal', {\n  method: 'PUT',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ pageId: 2373 }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Site roles:', data.map((row) => `${row.type} → ${row.pageId}`))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal', {\n  method: 'PUT',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ pageId: 2373 }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nThe response contains all of the site's bindings after the change, not only the assigned one.\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | All of the site's 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\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"type\": \"cart\",\n      \"pageId\": 2371,\n      \"title\": \"Docs test cart\",\n      \"deleted\": false,\n      \"active\": false\n    },\n    {\n      \"type\": \"personal\",\n      \"pageId\": 2373,\n      \"title\": \"Docs test personal\",\n      \"deleted\": false,\n      \"active\": false\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — the page belongs to another site:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"Page must belong to this site\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `Page must belong to this site` — the page with `pageId` is on another site |\n| 400 | `INVALID_PARAMS` | `Unknown system-page type` — `type` is not in the list of roles |\n| 400 | `INVALID_PARAMS` | `pageId must be a positive safe integer` — `pageId` is not a positive integer |\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 sent |\n| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query parameter the method does not accept was sent |\n| 400 | `MISSING_REQUIRED_FIELDS` | The body has no `pageId` |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 404 | `ENTITY_NOT_FOUND` | `Entity not found or not visible` — a site with this ID was not found, is not accessible to the user or belongs to another scope |\n| 404 | `ENTITY_NOT_FOUND` | `Page not found or not visible` — the page with `pageId` was not found or is not accessible to the user |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |\n| 422 | `BITRIX_ERROR` | `Bitrix24 did not save the binding change; site settings permission may be missing` — the binding is absent after the write. 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 shape |\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 configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **One page can hold several roles.** Assigning a page to a second role does not remove it from the first: it appears twice in the response, with different `type` values.\n- **Repeated assignment is safe.** Assigning the same page to the same role again returns `200` with the same set of bindings.\n- **Publishing is not required.** An unpublished page can be assigned too: it has `active: false` in the response.\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- [Get a system page URL](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-url)\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- [List pages](\u002Fdocs\u002Fentities\u002Fpages\u002Flist)\n","## Get a system page URL\n\n`GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type\u002Furl`\n\nReturns the public URL of the page assigned to a system role, for example to link to the cart or the customer account.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `type` (path) | string | yes | Role: `mainpage`, `catalog`, `personal`, `cart`, `order`, `payment`, `compare`, `feedback`. What each one means — [System pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages) |\n| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` \u002F `GROUP` \u002F `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. Omit it for an ordinary site |\n\nThe method accepts no other query parameters: any other one returns `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal\u002Furl\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal\u002Furl\" \\\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\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal\u002Furl', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data, error } = await res.json()\n\nif (success) {\n  console.log('Customer account:', data.url)\n} else if (error.message === 'System-page binding not found') {\n  console.log('Role not assigned')\n} else {\n  console.log('Error:', error.code, error.message)\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fpersonal\u002Furl', {\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 | Always `true` on success |\n| `data.url` | string | Public URL of the page assigned to the role |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"url\": \"https:\u002F\u002Fb24-y4xx51.bitrix24site.com\u002Fdocs-personal\u002F\"\n  }\n}\n```\n\n## Error response example\n\n404 — no page is assigned to the role:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"System-page binding not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | `System-page binding not found` — no page is assigned to the `type` role. The code is the same as for a site that is not found: tell them apart by `error.message` |\n| 404 | `ENTITY_NOT_FOUND` | `Entity not found or not visible` — no site with this ID, the site is not visible to the user, or it belongs to another scope |\n| 400 | `INVALID_PARAMS` | `Unknown system-page type` — `type` is not in the list of roles |\n| 400 | `INVALID_PARAMS` | `id must be a positive safe integer` — `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query parameter the method does not accept was passed |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |\n| 422 | `BITRIX_ERROR` | `Bitrix24 returned an invalid URL` — Bitrix24 returned the URL in an unexpected form |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **The URL is returned for an unpublished page too.** The method does not check publication: the URL matches what [`GET \u002Fv1\u002Fpages\u002F:id\u002Fpublic-url`](\u002Fdocs\u002Fentities\u002Fpages\u002Fpublic-url) returns for the same page, but visitors see the page at that URL only after it is published. Check publication by the `active` field in the [list of site system pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-list).\n- **For the site home page, the domain root is returned.** If the role is assigned a page that serves as the home page of the whole site, `url` is the site domain root, without the page path.\n- **The URL is returned for a page in the trash too.** Moving a page to the trash does not remove it from the role, and the method keeps returning its URL.\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- [Page public URL](\u002Fdocs\u002Fentities\u002Fpages\u002Fpublic-url)\n- [Site public URL](\u002Fdocs\u002Fentities\u002Fsites\u002Fpublic-url)\n","## Remove a system page\n\n`DELETE \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages\u002F:type`\n\nFrees one system role of the site. The page that was assigned to it stays on the site, and the other roles do not change.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `type` (path) | string | yes | Role to free: `mainpage`, `catalog`, `personal`, `cart`, `order`, `payment`, `compare`, `feedback`. Roles currently in use: [`GET \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-list) |\n| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` \u002F `GROUP` \u002F `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. Omit it for an ordinary site |\n\nNo request body is needed: a body with any field returns `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fcart\" \\\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\u002Fsites\u002F223\u002Fsystem-pages\u002Fcart\" \\\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\u002Fsites\u002F223\u002Fsystem-pages\u002Fcart', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Roles left:', data.length)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\u002Fsystem-pages\u002Fcart', {\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\nThe method returns `200` with the site's remaining bindings.\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | The site's bindings after the role is freed. Empty if the freed role was the last one |\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\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"type\": \"personal\",\n      \"pageId\": 2373,\n      \"title\": \"Docs test personal\",\n      \"deleted\": false,\n      \"active\": false\n    }\n  ]\n}\n```\n\n## Error response example\n\n404 — the role is already free:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"System-page binding not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | `System-page binding not found` — no page is assigned to the `type` role. Removing the same role again returns the same response |\n| 404 | `ENTITY_NOT_FOUND` | `Entity not found or not visible` — a site with this ID was not found, is not accessible to the user or belongs to another scope |\n| 400 | `INVALID_PARAMS` | `Unknown system-page type` — `type` is not in the list of roles |\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 sent |\n| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query parameter the method does not accept was sent |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |\n| 422 | `BITRIX_ERROR` | `Bitrix24 did not save the binding change; site settings permission may be missing` — the role is still taken after the write. 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 shape |\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 configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\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 all site system pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-delete)\n","## Remove all site system pages\n\n`DELETE \u002Fv1\u002Fsites\u002F:id\u002Fsystem-pages`\n\nFrees all system roles of the site in one call. The pages that were assigned to them stay on the site.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` \u002F `GROUP` \u002F `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. Omit it for an ordinary site |\n\nNo request body is needed: a body with any field returns `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\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\u002Fsites\u002F223\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\u002Fsites\u002F223\u002Fsystem-pages', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Roles removed:', success && data.length === 0)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F223\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 | Always `true` on success |\n| `data` | array | The site's bindings after removal. Always an empty array on success. The element format — `type`, `pageId`, `title`, `deleted`, `active` — is described in [List site system pages](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-list) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": []\n}\n```\n\n## Error response example\n\n404 — a site with this ID was not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Entity not found or not visible\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | A site with this ID was not found, is not accessible to the user or belongs to another scope: the wrong `scope` was sent |\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 sent |\n| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query parameter the method does not accept was sent |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |\n| 422 | `BITRIX_ERROR` | `Bitrix24 did not save the binding change; site settings permission may be missing` — the site still has bindings after the write. 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 shape |\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 configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Repeated removal is safe.** A call on a site without bindings returns `200` with an empty `data` array, unlike removing a single role, which returns `404` for an unassigned role.\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- [Remove a system page](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-delete-delete)\n- [Assign a system page](\u002Fdocs\u002Fentities\u002Fsites\u002Fsystem-pages-set)\n",1795376984855]