[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Factivities\u002Fbindings\u002Funbind":3,"docs-tabs-entities\u002Factivities\u002Fbindings\u002Funbind":6},{"content":4,"lastmod":5},"\n## Unbind\n\n`DELETE \u002Fv1\u002Factivities\u002F:activityId\u002Fbindings`\n\nRemoves 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.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `activityId` (path) | number | yes | Activity ID. List: `GET \u002Fv1\u002Factivities` |\n| `entityTypeId` (query or body) | number | yes | Numeric entity-type code:\u003Cbr>1 — lead\u003Cbr>2 — deal\u003Cbr>3 — contact\u003Cbr>4 — company\u003Cbr>7 — quote\u003Cbr>31 — invoice\u003Cbr>≥128 — smart-process, its code — in [`GET \u002Fv1\u002Fsmart-processes`](\u002Fdocs\u002Fentities\u002Fsmart-processes\u002Flist) |\n| `entityId` (query or body) | number | yes | ID of the entity to unbind from |\n\nBoth `entityTypeId` and `entityId` are required, but each can be passed as a query parameter or in the JSON request body. For each field, the query value takes precedence over the body value.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3631\u002Fbindings?entityTypeId=3&entityId=9\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3631\u002Fbindings?entityTypeId=3&entityId=9\" \\\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 res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3631\u002Fbindings?entityTypeId=3&entityId=9', {\n  method: 'DELETE',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3631\u002Fbindings?entityTypeId=3&entityId=9', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.activityId` | number | Activity ID |\n| `data.entityTypeId` | number | Numeric type code of the unbound entity |\n| `data.entityId` | number | ID of the unbound entity |\n| `data.deleted` | boolean | `true` only if Bitrix24 returned the boolean value `true`. Otherwise `false` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"activityId\": 3631,\n    \"entityTypeId\": 3,\n    \"entityId\": 9,\n    \"deleted\": true\n  }\n}\n```\n\n## Error response example\n\n422 — attempting to remove the only binding:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"You cannot delete the only binding of an activity to an entity\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `activityId`, `entityTypeId` or `entityId` is not a positive integer |\n| 404 | `ENTITY_NOT_FOUND` | No activity exists for the given `activityId` |\n| 422 | `BITRIX_ERROR` | Attempt to remove the activity's only remaining binding |\n| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key's access mode blocks binding changes |\n| 401 | `TOKEN_MISSING` | The key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**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.\n\n**Moving an activity to another record.** To move an activity without breaking the ban on removing the last binding, see [Move a binding](\u002Fdocs\u002Fentities\u002Factivities\u002Fbindings\u002Fmove) — it describes the safe order and a single-call move within the same type.\n\n## See also\n\n- [Bind](\u002Fdocs\u002Fentities\u002Factivities\u002Fbindings\u002Fbind)\n- [Move a binding](\u002Fdocs\u002Fentities\u002Factivities\u002Fbindings\u002Fmove)\n- [List bindings](\u002Fdocs\u002Fentities\u002Factivities\u002Fbindings\u002Flist)\n","2026-10-09",{},1794739303493]