[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fsites\u002Fmenu-bindings\u002Funbind":3,"docs-tabs-entities\u002Fsites\u002Fmenu-bindings\u002Funbind":6},{"content":4,"lastmod":5},"## Unbind a knowledge base from a menu\n\n`DELETE \u002Fv1\u002Fsites\u002F:id\u002Fmenu-bindings\u002F:menuCode`\n\nRemoves the binding of a knowledge base site to a Bitrix24 menu by menu code, and that menu changes for all employees of the Bitrix24 account.\n\nSite type restrictions and how removing a binding changes the employees' menu are covered in [Knowledge base menu bindings](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings).\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Knowledge base site ID. List: `GET \u002Fv1\u002Fsites?scope=KNOWLEDGE` |\n| `menuCode` (path) | string | yes | Code of the menu the site is unbound from. Encode the colon as `%3A`: `crm_switcher%3Alead`. Site bindings and their codes: `GET \u002Fv1\u002Fsites\u002Fmenu-bindings` |\n| `scope` (query) | string | no | Site scope: `KNOWLEDGE`, `GROUP` or `MAINPAGE`. A knowledge base site is found even without the parameter |\n\nNo request body is sent.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F235\u002Fmenu-bindings\u002Fcrm_switcher%3Alead\" \\\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\u002F235\u002Fmenu-bindings\u002Fcrm_switcher%3Alead\" \\\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 menuCode = encodeURIComponent('crm_switcher:lead')\nconst res = await fetch(`https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F235\u002Fmenu-bindings\u002F${menuCode}`, {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log(success && data.length === 0 ? 'Binding removed' : data)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst menuCode = encodeURIComponent('crm_switcher:lead')\nconst res = await fetch(`https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F235\u002Fmenu-bindings\u002F${menuCode}`, {\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()\nconsole.log(success && data.length === 0 ? 'Binding removed' : data)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Bindings of this site to the removed menu code, read back after removal. Empty array after a successful removal |\n| `data[].siteId` | number | Site ID |\n| `data[].menuCode` | string | Menu code |\n| `data[].title` | string | Site title |\n| `data[].publicUrl` | string | Public URL of the site |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": []\n}\n```\n\n## Error response example\n\n404 — site not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Site not found or not visible\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `menuCode` in the path is whitespace only |\n| 400 | `INVALID_PARAMS` | `id` in the path is not a positive integer |\n| 400 | `INVALID_PARAMS` | A non-empty body was sent — message `DELETE takes no body` |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 404 | `ENTITY_NOT_FOUND` | No site with this `id` was found among knowledge bases, workgroup sites and sites of the `scope` — message `Site not found or not visible` |\n| 409 | `SITE_BINDING_TYPE_MISMATCH` | The site is not a knowledge base: a regular site or a site bound to a workgroup |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on the portal. Ask the portal administrator to enable it — while the module is off, a retry returns the same rejection |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the removal. A repeated removal of an already removed binding gets the same response. `message` lists possible causes: the site is unavailable, not a knowledge base, no write permission, no binding exists |\n| 422 | `BITRIX_ERROR` | The binding was removed, but Bitrix24 returned the bindings list in an unexpected format |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access to the key owner |\n| 403 | `B24_TARIFF_RESTRICTION` | The portal plan does not allow the call |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode, the request does not reach Bitrix24 |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 429 | `RATE_LIMITED` | Bitrix24 throttled requests to the portal. Retry after the period from the `Retry-After` header |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 returned a server error or the connection dropped before the full response. The operation may have succeeded — read the bindings back before retrying |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time. The operation may have succeeded — read the bindings back before retrying |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**A repeated removal is indistinguishable by the response.** To find out after a `422` rejection whether the binding has been removed, call `GET \u002Fv1\u002Fsites\u002Fmenu-bindings?menuCode=crm_switcher%3Alead` and check whether the response contains this site.\n\n## See also\n\n- [Knowledge base menu bindings](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings)\n- [List knowledge base menu bindings](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings\u002Flist)\n- [Bind a knowledge base to a menu](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings\u002Fbind)\n- [Knowledge base bindings to a workgroup](\u002Fdocs\u002Fentities\u002Fsites\u002Fgroup-binding)\n- [List sites](\u002Fdocs\u002Fentities\u002Fsites\u002Flist)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-19",{},1795415301493]