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

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

Activity bindings

A CRM activity — a call, meeting, task or email — appears in the timeline of the record it belongs to. Bindings make a single activity appear in several cards at once: for example, a call is visible both in a deal and in a smart process card.

Bitrix24 API: crm.activity.binding.* Scope: crm

List bindings

GET /v1/activities/:activityId/bindings

Returns the CRM entities the activity is bound to. The list may be empty: if Bitrix24 returns an empty array or a result that is not an array, data is [].

Parameters

Parameter Type Required Description
ParameteractivityId (path) Typenumber Requiredyes DescriptionActivity ID. List: GET /v1/activities

Examples

curl — personal key

Terminal
curl https://vibecode.bitrix24.com/v1/activities/3631/bindings \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl https://vibecode.bitrix24.com/v1/activities/3631/bindings \
  -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/activities/3631/bindings', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
data.forEach(b => console.log(`${b.entityTypeId}:${b.entityId}`))

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3631/bindings', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of bindings that may be empty
Fielddata[].entityTypeId Typenumber DescriptionNumeric CRM 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
Fielddata[].entityId Typenumber DescriptionID of the bound entity

Response example

JSON
{
  "success": true,
  "data": [
    { "entityTypeId": 2, "entityId": 4219 },
    { "entityTypeId": 3, "entityId": 9 }
  ]
}

Error response example

404 — the activity does not exist:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Element not found"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionactivityId is not a positive integer
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo activity exists for the given activityId
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned a business error that was not mapped to another API error code
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no configured tokens

Full list of common API errors — Errors.

See also