## Dependencies of one task

`GET /v1/tasks/:taskId/dependencies`

Returns the task's predecessors — the tasks it depends on.

The generic `filter` parameter is not applied by this endpoint. By default, the API preserves the previous HTTP 200 response and data, adds `Warning: 299 - "filter is not supported on this endpoint and was ignored"`, and records unsupported-filter use in the server log.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `taskId` (path) | number | yes | Task ID, a positive integer. List: [`GET /v1/tasks`](/docs/entities/tasks/list) |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/tasks/4203/dependencies" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

const { success, data } = await res.json()
console.log('Predecessors:', data.map((dep) => `${dep.id}: ${dep.title ?? 'untitled'}`))
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/4203/dependencies', {
  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 success |
| `data` | array | Predecessors, in ascending `id` order. An empty array for a task without dependencies |
| `data[].id` | number | ID of the predecessor task. Get: [`GET /v1/tasks/:id`](/docs/entities/tasks/get) |
| `data[].title` | string \| null | Title of the predecessor task. `null` if Bitrix24 did not return it |
| `meta.total` | number | Number of predecessors, always equal to the length of `data` |
| `meta.hasMore` | boolean | Always `false`: the response is not truncated |
| `meta.direction` | string | Always `predecessors` — the method returns predecessors |
| `meta.source` | string | Always `RELATED_TASKS` — the source of dependencies in Bitrix24 |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 4199,
      "title": "Prepare the estimate"
    },
    {
      "id": 4201,
      "title": "Approve the budget"
    }
  ],
  "meta": {
    "total": 2,
    "hasMore": false,
    "direction": "predecessors",
    "source": "RELATED_TASKS"
  }
}
```

## Error response example

404 — the task does not exist or is not visible to the key:

```json
{
  "success": false,
  "error": {
    "code": "TASK_NOT_FOUND",
    "message": "Task not found."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 200 | `Warning: 299` | The filter is ignored by default; previous data is preserved and the warning is sent in the `Warning` header. |
| 400 (strict mode only) | `UNSUPPORTED_FILTER` | The server mode is disabled by default; until it is enabled, the endpoint preserves HTTP 200 and the previous data. |
| 404 | `TASK_NOT_FOUND` | The task does not exist or is not visible to the key — both cases return the same response. Message `Task not found.` |
| 422 | `DEPENDENCY_LIMIT_EXCEEDED` | The task has more than 1000 dependencies. The response is not truncated: you receive either the full list or this error |
| 400 | `INVALID_PARAMS` | `taskId` is not a positive integer |
| 401 | `MISSING_API_KEY` | `X-Api-Key` was not passed |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |
| 403 | `SCOPE_DENIED` | The key has no `task` scope |
| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |

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

## Known specifics

**Typed dependencies are not visible.** The method returns the set of predecessors from the task's `DEPENDS_ON` field. Bitrix24 stores typed dependencies such as "finish-to-start" separately from this set, and they do not appear in the response. So an empty `data` does not prove that the task has no dependencies at all.

## See also

- [Task dependencies](/docs/entities/tasks/dependencies)
- [Dependencies of several tasks](/docs/entities/tasks/dependencies-bulk)
- [Get task](/docs/entities/tasks/get)
- [Update task](/docs/entities/tasks/update)
