لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/sites/group-binding/list.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
List knowledge base bindings to workgroups
GET /v1/sites/group-bindings
Returns knowledge base bindings to the Bitrix24 account's workgroups, all at once or for one group.
How a binding affects the site type is described in Knowledge base bindings to a workgroup.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParametergroupId (query) |
Typenumber | Requiredno | DescriptionWorkgroup ID. List: GET /v1/workgroups. A positive integer. An empty value, zero or a non-numeric string returns 400 INVALID_PARAMS. Without the parameter, bindings of all groups are returned |
Parameterscope (query) |
Typestring | Requiredno | DescriptionSite scope: KNOWLEDGE, GROUP or MAINPAGE. Any other value returns 400 INVALID_SCOPE |
There is no pagination: the response contains all bindings matching the filter in a single array. The limit and offset parameters are ignored.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/sites/group-bindings" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/sites/group-bindings" \
-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/sites/group-bindings', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log(`Bindings: ${data.length}`)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/group-bindings', {
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 | DescriptionAlways true on success |
Fielddata |
Typearray | DescriptionArray of bindings. An empty array if no bindings match the filter |
Fielddata[].siteId |
Typenumber | DescriptionKnowledge base site ID. Get the site: GET /v1/sites/:id?scope=GROUP |
Fielddata[].groupId |
Typenumber | DescriptionWorkgroup ID. Get the group: GET /v1/workgroups/:id |
Fielddata[].title |
Typestring | DescriptionSite title. An empty string if no title was returned |
Fielddata[].publicUrl |
Typestring | DescriptionPublic URL of the knowledge base site. An empty string if no URL was returned |
Response example
{
"success": true,
"data": [
{
"siteId": 125,
"groupId": 51,
"title": "Knowledge base",
"publicUrl": "https://example.bitrix24.com/knowledge/group/knowledge_base/"
},
{
"siteId": 95,
"groupId": 7,
"title": "Support knowledge base",
"publicUrl": "https://example.bitrix24.com/knowledge/group/support_knowledge_base/"
}
]
}
Error response example
400 — empty groupId value:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "groupId must be a positive safe integer"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptiongroupId is passed but is not a positive integer, including an empty value |
| HTTP400 | CodeINVALID_SCOPE |
Descriptionscope is not KNOWLEDGE, GROUP or MAINPAGE |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned the list of bindings in an unexpected format |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 denied access to the key owner |
| HTTP403 | CodeB24_TARIFF_RESTRICTION |
DescriptionThe portal plan does not allow the call |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the landing scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP429 | CodeRATE_LIMITED |
DescriptionBitrix24 throttled requests to the portal. Retry after the delay from the Retry-After header |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 responded with a server error or the connection dropped before a complete response. The request only reads data, so a retry is safe |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 did not respond in time. The request only reads data, so a retry is safe |
Full list of common API errors — Errors.
Known specifics
The list contains only site bindings. Bindings of individual knowledge base pages to a group are not included in the response, so siteId always points to a site, not a page.