لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/sites/group-binding/unbind.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Unbind a knowledge base from a workgroup

DELETE /v1/sites/:id/group-binding/:groupId

Removes the binding of a knowledge base site to a Bitrix24 workgroup, after which the knowledge base no longer belongs to the group.

For the site type after unbinding, see Knowledge base bindings to a workgroup.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionSite ID. List of bound sites: GET /v1/sites/group-bindings
ParametergroupId (path) Typenumber Requiredyes DescriptionID of the workgroup the site is unbound from. List: GET /v1/sites/group-bindings
Parameterscope (query) Typestring Requiredno DescriptionSite scope: KNOWLEDGE, GROUP or MAINPAGE

No request body is sent.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/sites/235/group-binding/171" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/sites/235/group-binding/171" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/235/group-binding/171', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { data } = await res.json()
console.log(data.type, data.bindings)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/235/group-binding/171', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()
console.log(data.type, data.bindings)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe site and its bindings to the group, re-read after the operation
Fielddata.id Typenumber DescriptionSite ID
Fielddata.title Typestring DescriptionSite title
Fielddata.type Typestring DescriptionSite type after the binding is removed — KNOWLEDGE
Fielddata.active Typeboolean DescriptionWhether the site is published
Fielddata.deleted Typeboolean DescriptionWhether the site is in the trash
Fielddata.bindings Typearray DescriptionThe site's bindings to the groupId group from the path, re-read after the operation. After a successful unbind — an empty array
Fielddata.bindings[].siteId Typenumber DescriptionSite ID
Fielddata.bindings[].groupId Typenumber DescriptionWorkgroup ID
Fielddata.bindings[].title Typestring DescriptionKnowledge base title. An empty string if no title was returned
Fielddata.bindings[].publicUrl Typestring DescriptionKnowledge base URL inside the group. An empty string if no URL was returned

Response example

JSON
{
  "success": true,
  "data": {
    "id": 235,
    "title": "VIBE-PROBE",
    "type": "KNOWLEDGE",
    "active": false,
    "deleted": false,
    "bindings": []
  }
}

Error response example

404 — site not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Site not found or not visible"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptiongroupId in the path is not a positive integer
HTTP400 CodeINVALID_PARAMS Descriptionid in the path is not a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionA non-empty body was passed — message DELETE takes no body
HTTP400 CodeINVALID_SCOPE Descriptionscope is not KNOWLEDGE, GROUP or MAINPAGE
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo site with this id among knowledge bases, group sites and sites in the requested scope — message Site not found or not visible
HTTP404 CodeENTITY_NOT_FOUND DescriptionThe binding was removed, but the site was not found on re-read — message Site is no longer visible after the binding action
HTTP409 CodeSITE_BINDING_TYPE_MISMATCH DescriptionThe site type is neither KNOWLEDGE nor GROUP
HTTP409 CodeLANDING_MODULE_NOT_ENABLED DescriptionThe Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 refused to unbind: the site is not bound to this group, the site is not writable, or the user has no permissions on the group
HTTP422 CodeBITRIX_ERROR DescriptionThe binding was removed, but Bitrix24 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 Bitrix24 account's plan does not allow the call
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the landing scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only. The request is refused before any call to the Bitrix24 account
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP429 CodeRATE_LIMITED DescriptionBitrix24 throttled requests to the Bitrix24 account. 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 operation may have succeeded — re-read the bindings before retrying
HTTP503 CodeBITRIX_TIMEOUT DescriptionBitrix24 did not respond in time. The operation may have succeeded — re-read the bindings before retrying

Full list of common API errors — Errors.

Known specifics

Retry after a dropped connection. If the response to the first call is lost and the binding is already removed, a repeated call returns 422 BITRIX_ERROR. Before retrying, check the state with GET /v1/sites/group-bindings?groupId=171: if your id is not in the response, the binding is already removed.

See also