
## List bindings

`GET /v1/activities/:activityId/bindings`

Returns every CRM entity the activity is bound to. There is always at least one binding — the owner entity set when the activity was created.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `activityId` (path) | number | yes | Activity ID. List: `GET /v1/activities` |

## Examples

### curl — personal key

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

### curl — OAuth app

```bash
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 app

```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 |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of bindings |
| `data[].entityTypeId` | number | Numeric CRM entity-type code:<br>1 — lead<br>2 — deal<br>3 — contact<br>4 — company<br>7 — quote<br>31 — invoice<br>≥128 — smart-process, its code — in [`GET /v1/smart-processes`](/docs/entities/smart-processes/list) |
| `data[].entityId` | number | ID 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 |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `activityId` is not a positive integer |
| 404 | `ENTITY_NOT_FOUND` | No activity exists for the given `activityId` |
| 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](/docs/errors).

## See also

- [Bind](/docs/entities/activities/bindings/bind)
- [Move a binding](/docs/entities/activities/bindings/move)
- [Activities](/docs/entities/activities)
