
## Get activity

`GET /v1/activities/:id`

Returns an activity by ID.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Activity ID. List: [`GET /v1/activities`](/docs/entities/activities/list) |
| `select` (query) | string | no | Response fields, comma-separated, for example `id,subject`. Without the parameter, all fields are returned. Names come from [Activity fields](/docs/entities/activities/fields) |
| `include` (query) | string | no | Related employees, comma-separated: `responsible`, `author`, `editor`. See the "Related data" section below |

## Examples

### curl — personal key

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

### curl — OAuth application

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

const { success, data } = await res.json()
console.log('Activity:', data.subject, '— completed:', data.completed)
```

### JavaScript — OAuth application

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

const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | `true` on a successful request |
| `data` | object | The activity with all fields. All fields — [Activity fields](/docs/entities/activities/fields) |
| `data._included` | object | Related employees. Returned only with the `include` parameter — see "Related data" |

## Related data

To get an activity together with its related employees, pass the `include` parameter in the GET request:

```
GET /v1/activities/1111?include=responsible,author
```

Available includes — up to three names per request:

| Name | Source field | Key in `_included` | Result |
|------|--------------|--------------------|--------|
| `responsible` | `responsibleId` — the responsible person | `responsible` | Employee card or `null` |
| `author` | `authorId` — the author | `author` | Employee card or `null` |
| `editor` | `editorId` — the last editor | `editor` | Employee card or `null` |

The employee card is the same as in the [`GET /v1/users/:id`](/docs/entities/users/get) response. The relation reads an employee, so the key needs the `user` scope in addition to `crm`. The result is in the `_included` field:

```json
{
  "success": true,
  "data": {
    "id": 1111,
    "subject": "Sales proposal",
    "ownerTypeId": 3,
    "ownerId": 409,
    "responsibleId": 29,
    "authorId": 1,
    "_included": {
      "responsible": { "id": 29, "name": "Emma", "lastName": "Wilson", "email": "emma.wilson@example.com", "active": false },
      "author": { "id": 1, "name": "John", "lastName": "Brown", "email": "john.brown@example.com", "active": true }
    }
  }
}
```

The main fields of the activity and the employee are shown. For the full list of card fields, see [Employee fields](/docs/entities/users/fields).

## Response example

The main fields are shown. Full list: [Activity fields](/docs/entities/activities/fields).

```json
{
  "success": true,
  "data": {
    "id": 3894,
    "typeId": 1,
    "ownerTypeId": 3,
    "ownerId": 17,
    "subject": "Project meeting",
    "description": "Discussing delivery terms",
    "responsibleId": 1,
    "priority": 2,
    "direction": 2,
    "completed": false,
    "startTime": "2026-10-21T07:00:00.000Z",
    "endTime": "2026-10-21T08:00:00.000Z",
    "deadline": "2026-10-21T07:00:00.000Z",
    "createdAt": "2026-10-19T12:08:24.000Z",
    "updatedAt": "2026-10-19T12:08:24.000Z"
  }
}
```

## Error response example

404 — activity not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Activity is not found."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | Activity with this ID not found |
| 400 | `INVALID_PARAMS` | `id` is not a non-negative integer. Message: `id must be a non-negative integer` |
| 400 | `UNKNOWN_SELECT_FIELD` | `select` contains an unknown field. The message lists the allowed names |
| 400 | `INVALID_INCLUDE` | `include` contains a name outside the set `responsible`, `author`, `editor`. The response lists the available names |
| 400 | `INVALID_INCLUDE` | `include` is not a comma-separated string of names (for example, `include[a]=1`). The response does not list the names |
| 400 | `INCLUDE_LIMIT_EXCEEDED` | `include` contains more than three names, including duplicates |
| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permission for this activity in Bitrix24 |
| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |
| 403 | `SCOPE_DENIED` | `include` requests a relation to an employee, but the key lacks the `user` scope. The response names the relation and the missing scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Update activity](/docs/entities/activities/update)
- [List activities](/docs/entities/activities/list)
- [Activity fields](/docs/entities/activities/fields)
- [Related data](/docs/includes)
- [Limits and optimization](/docs/optimization)
