## Get a flow

`GET /v1/tasks/flows/:flowId`

Returns a task flow by ID, together with the settings that the flow list omits.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `flowId` (path) | number | yes | Flow ID. List: [`GET /v1/tasks/flows`](/docs/entities/tasks/flows-list) |

## Examples

### curl — personal key

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

### curl — OAuth application

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

const { success, data } = await res.json()
console.log(`${data.name}: ${data.active ? 'enabled' : 'disabled'}`)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/flows/15', {
  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.id` | number | Flow ID |
| `data.creatorId` | number | ID of the employee who created the flow. Get: [`GET /v1/users/:id`](/docs/entities/users/get) |
| `data.ownerId` | number | ID of the flow administrator. Get: [`GET /v1/users/:id`](/docs/entities/users/get) |
| `data.groupId` | number | ID of the flow's workgroup. `0` for a demo flow. Get: [`GET /v1/workgroups/:id`](/docs/entities/workgroups/get) |
| `data.templateId` | number | ID of the template used to create tasks in the flow. `0` means no template. Get: [`GET /v1/task-templates/:templateId`](/docs/entities/tasks/templates-get) |
| `data.efficiency` | number | Flow efficiency as a percentage |
| `data.active` | boolean | `true` means the flow is enabled |
| `data.plannedCompletionTime` | number | Time to complete a task, in seconds |
| `data.activity` | string | Date and time of the flow's last activity, ISO 8601 with a time zone offset |
| `data.name` | string | Flow name |
| `data.description` | string | Flow description. An empty string when there is no description |
| `data.distributionType` | string | How tasks reach assignees: `manually` — a moderator distributes them, `queue` — in turn among employees, `himself` — employees take tasks themselves |
| `data.responsibleList` | array | Who receives the tasks: an array of pairs such as `["user", "1"]`, where the second element is the employee ID as a string. With `manually`, this is the moderator. An empty array for a demo flow. List: [`GET /v1/users`](/docs/entities/users/list) |
| `data.demo` | boolean | `true` means the flow is a Bitrix24 demo flow |
| `data.responsibleCanChangeDeadline` | boolean | `true` means the assignee can change the task deadline |
| `data.matchWorkTime` | boolean | `true` means weekends and holidays are skipped when the deadline is calculated |
| `data.matchSchedule` | boolean | `true` means the deadline is counted only in working hours according to the work schedule, excluding weekends and holidays |
| `data.taskControl` | boolean | `true` means a completed task goes to the task creator for review |
| `data.notifyAtHalfTime` | boolean | `true` means the assignee gets a reminder halfway to the deadline |
| `data.notifyOnQueueOverflow` | number \| null | The administrator is notified when the number of pending tasks in the flow exceeds this value. `null` means the notification is off |
| `data.notifyOnTasksInProgressOverflow` | number \| null | The administrator is notified when the number of tasks in progress exceeds this value. `null` means the notification is off |
| `data.notifyWhenEfficiencyDecreases` | number \| null | The administrator is notified when flow efficiency drops below this value, as a percentage. `null` means the notification is off |
| `data.taskCreators` | array | Who can create tasks in the flow: pairs of the same form as in `responsibleList`. `["meta-user", "all-users"]` means all employees |
| `data.team` | array | Employees who receive the flow's tasks: pairs of the same form as in `responsibleList`. An empty array for a demo flow |
| `data.trialFeatureEnabled` | boolean | Internal Bitrix24 flag |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 15,
    "creatorId": 29,
    "ownerId": 29,
    "groupId": 57,
    "templateId": 0,
    "efficiency": 0,
    "active": true,
    "plannedCompletionTime": 432000,
    "activity": "2025-02-06T16:13:59+00:00",
    "name": "Request handling",
    "description": "Customer service requests",
    "distributionType": "himself",
    "responsibleList": [
      [
        "user",
        "1"
      ]
    ],
    "demo": false,
    "responsibleCanChangeDeadline": true,
    "matchWorkTime": true,
    "matchSchedule": false,
    "taskControl": true,
    "notifyAtHalfTime": true,
    "notifyOnQueueOverflow": 50,
    "notifyOnTasksInProgressOverflow": 50,
    "notifyWhenEfficiencyDecreases": 70,
    "taskCreators": [
      [
        "meta-user",
        "all-users"
      ]
    ],
    "team": [
      [
        "user",
        "1"
      ]
    ],
    "trialFeatureEnabled": false
  }
}
```

## Error response example

422 — no flow with this ID exists:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Flow with this ID does not exist.",
    "b24Code": "0"
  }
}
```

The `error.message` text comes in the language of the Bitrix24 account.

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `flowId` is not a positive integer: `flowId must be a positive safe integer` |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `INVALID_API_KEY` | The key is not found |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |
| 403 | `SCOPE_DENIED` | The key does not have the `task` or `tasks` scope |
| 422 | `BITRIX_ERROR` | No flow with this `flowId` exists, or it was deleted: `Flow with this ID does not exist.` |
| 429 | `RATE_LIMITED` | The request rate limit of Bitrix24 or the platform was exceeded. Retry after the delay in the `Retry-After` header |

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

## See also

- [Flows and flow tasks](/docs/entities/tasks/flows)
- [List flows](/docs/entities/tasks/flows-list)
- [Update a flow](/docs/entities/tasks/flows-update)
- [Toggle flow activity](/docs/entities/tasks/flows-activate)
- [List pending flow tasks](/docs/entities/tasks/flows-pending)
- [Tasks](/docs/entities/tasks)
