[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fsites\u002Fmenu-bindings\u002Flist":3,"docs-tabs-entities\u002Fsites\u002Fmenu-bindings\u002Flist":6},{"content":4,"lastmod":5},"## List knowledge base menu bindings\n\n`GET \u002Fv1\u002Fsites\u002Fmenu-bindings`\n\nReturns knowledge base bindings to Bitrix24 account menu items, either all at once or for a single menu code.\n\nSite type restrictions and how 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| `menuCode` (query) | string | no | Menu code, for example `crm_switcher:lead`. Encode the colon in the URL as `%3A`. An empty value returns `400 INVALID_PARAMS`. Without the parameter, bindings to all menus are returned |\n| `scope` (query) | string | no | Site scope: `KNOWLEDGE`, `GROUP` or `MAINPAGE`. Any other value returns `400 INVALID_SCOPE` |\n\nThere is no pagination: the response contains all bindings matching the filter in a single array. The `limit` and `offset` parameters are not processed.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002Fmenu-bindings?menuCode=crm_switcher%3Alead\" \\\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\u002Fmenu-bindings?menuCode=crm_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 params = new URLSearchParams({ menuCode: 'crm_switcher:lead' })\nconst res = await fetch(`https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002Fmenu-bindings?${params}`, {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log(`Bindings: ${data.length}`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst params = new URLSearchParams({ menuCode: 'crm_switcher:lead' })\nconst res = await fetch(`https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002Fmenu-bindings?${params}`, {\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 | Array of bindings. Empty array if no bindings match the filter |\n| `data[].siteId` | number | Knowledge base site ID. Get the site: `GET \u002Fv1\u002Fsites\u002F:id?scope=KNOWLEDGE` |\n| `data[].menuCode` | string | Code of the menu the site is bound to |\n| `data[].title` | string | Site title. Empty string if the title was not returned |\n| `data[].publicUrl` | string | Public URL of the knowledge base site. Empty string if the URL was not returned |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"siteId\": 61,\n      \"menuCode\": \"crm_switcher:lead\",\n      \"title\": \"Knowledge base\",\n      \"publicUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fknowledge\u002Fknowledge_base\u002F\"\n    },\n    {\n      \"siteId\": 131,\n      \"menuCode\": \"crm_switcher:lead\",\n      \"title\": \"Support knowledge base\",\n      \"publicUrl\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fknowledge\u002Fsupport_knowledge_base\u002F\"\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — empty `menuCode` value:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"menuCode must be a non-empty string\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `menuCode` is empty or whitespace only |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 422 | `BITRIX_ERROR` | 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| 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 request only reads data, so a retry is safe |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time. The request only reads data, so a retry is safe |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**One menu code, several sites.** Several knowledge bases can be bound to one menu, and each binding comes as a separate array element with the same `menuCode`. One site can also be bound to several menus.\n\n**The list contains only site bindings.** Bindings of individual knowledge base pages to a menu are not included in the response, so `siteId` always points to a site, not a page.\n\n## See also\n\n- [Knowledge base menu bindings](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings)\n- [Bind a knowledge base to a menu](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings\u002Fbind)\n- [Unbind a knowledge base from a menu](\u002Fdocs\u002Fentities\u002Fsites\u002Fmenu-bindings\u002Funbind)\n- [Knowledge base workgroup bindings](\u002Fdocs\u002Fentities\u002Fsites\u002Fgroup-binding)\n- [List sites](\u002Fdocs\u002Fentities\u002Fsites\u002Flist)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-19",{},1795415301369]