For AI agents: markdown of this page — /docs-content-en/entities/activities/bindings/unbind.md documentation index — /llms.txt
Unbind
DELETE /v1/activities/:activityId/bindings
Removes the activity's binding to a given CRM entity. The activity no longer shows in that entity's timeline but stays in the timelines of the other bound entities.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
activityId (path) |
number | yes | Activity ID. List: GET /v1/activities |
entityTypeId (query) |
number | yes | Numeric entity-type code: 1 — lead 2 — deal 3 — contact 4 — company 7 — quote 31 — invoice ≥128 — smart-process, its code — in GET /v1/smart-processes |
entityId (query) |
number | yes | ID of the entity to unbind from |
entityTypeId and entityId can be passed as query parameters or in the request body.
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/activities/3631/bindings?entityTypeId=3&entityId=9" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth app
curl -X DELETE "https://vibecode.bitrix24.com/v1/activities/3631/bindings?entityTypeId=3&entityId=9" \
-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/activities/3631/bindings?entityTypeId=3&entityId=9', {
method: 'DELETE',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
JavaScript — OAuth app
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3631/bindings?entityTypeId=3&entityId=9', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | Always true on success |
data.activityId |
number | Activity ID |
data.entityTypeId |
number | Numeric type code of the unbound entity |
data.entityId |
number | ID of the unbound entity |
data.deleted |
boolean | Always true — confirmation that the binding was removed |
Response example
{
"success": true,
"data": {
"activityId": 3631,
"entityTypeId": 3,
"entityId": 9,
"deleted": true
}
}
Error response example
422 — attempting to remove the only binding:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "You cannot delete the only binding of an activity to an entity"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
activityId, entityTypeId or entityId is not a positive integer |
| 404 | ENTITY_NOT_FOUND |
No activity exists for the given activityId |
| 422 | BITRIX_ERROR |
Attempt to remove the activity's only remaining binding |
| 403 | SCOPE_DENIED |
The key lacks the crm scope |
| 401 | TOKEN_MISSING |
The key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
You cannot remove the last binding. An activity must stay bound to at least one entity — an attempt to unbind the only one returns 422 and the binding is kept.
Moving an activity to another record. To move an activity without breaking the ban on removing the last binding, see Move a binding — it describes the safe order and a single-call move within the same type.