For AI agents: markdown of this page — /docs-content-en/timeline-logs/bindings/unbind.md documentation index — /llms.txt

Unbind

POST /v1/timeline-logs/:id/unbind

Removes the binding of a log entry to the specified CRM entity. The entry no longer appears in that entity's timeline but remains in the logs of the other bound entities.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionLog entry ID

Request fields (body)

The same fields as in bind:

Field Type Required Description
FieldentityId Typenumber Requiredyes DescriptionID of the entity to unbind from
FieldentityTypeId Typenumber Requiredyes* DescriptionNumeric CRM entity type
FieldentityType Typestring Requiredyes* DescriptionString type code: "lead", "deal", "contact", "company", "quote", "order", "smart_invoice", "dynamic_<entityTypeId>"

*Pass either entityTypeId or entityType. Full list of supported types — Bind an entry.

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/timeline-logs/5012/unbind \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "entityTypeId": 3, "entityId": 50 }'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/timeline-logs/5012/unbind \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "entityTypeId": 3, "entityId": 50 }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/timeline-logs/5012/unbind', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ entityTypeId: 3, entityId: 50 }),
})

const { success } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/timeline-logs/5012/unbind', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ entityTypeId: 3, entityId: 50 }),
})

const { success } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.bound Typeboolean DescriptionAlways false — confirmation that the binding was removed

Response example

JSON
{
  "success": true,
  "data": { "bound": false }
}

Error response example

400 — entityTypeId with no mapping:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_ENTITY_TYPE_ID",
    "message": "entityTypeId=99 has no ENTITY_TYPE mapping. Use 1=lead, 2=deal, 3=contact, 4=company, 7=quote, 14=order, 31=smart_invoice, or ≥128 for smart-processes."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionentityId is missing, or neither entityTypeId nor entityType is passed
HTTP400 CodeINVALID_ENTITY_TYPE_ID DescriptionentityTypeId < 128 and not in the mapping table
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

Known specifics

Idempotent. Unbinding from an already-unbound entity returns 200 + {bound: false} with no error.

It does not validate the existence of the :id log entry. For a nonexistent id, unbind also returns 200 + {bound: false} — the operation is a silent no-op. If you need to know that the binding actually existed and was removed, first call GET /v1/timeline-logs/:id/bindings and check the list before unbind.

Do not unbind the only binding — the entry will be "orphaned". If an entry has only one binding (for example, the one created automatically with the entry), unbind returns 200 + {bound: false}, but the entry then becomes inaccessible via the API: GET /v1/timeline-logs/:id returns 403 BITRIX_ACCESS_DENIED. This is Bitrix24 behavior — without an active binding, the entry is no longer accessible.

Safe order when changing the parent. First bind to the new entity via POST /:id/bind, then unbind from the original one. As long as at least one binding remains, the entry stays accessible through its timeline.

To remove the entry everywhere — delete it via DELETE. DELETE /v1/timeline-logs/:id deletes the entry from all bound timelines at once (subject to the cross-app restriction — see the method's documentation).

See also