[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftasks\u002Fflows-completed":3,"docs-tabs-entities\u002Ftasks\u002Fflows-completed":6},{"content":4,"lastmod":5},"## List completed flow tasks\n\n`GET \u002Fv1\u002Ftasks\u002Fflows\u002F:flowId\u002Ftasks\u002Fcompleted`\n\nReturns the flow tasks completed within the given number of recent days: the flow's output for the period.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|----------|\n| `flowId` (path) | number | yes | — | Flow ID, a positive integer. List: [`GET \u002Fv1\u002Ftasks\u002Fflows`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fflows-list) |\n| `days` (query) | number | yes | — | How many recent days to cover, by closing date. A non-negative integer. With `0` the list is empty, even if a task was closed a minute ago |\n| `start` (query) | number | no | `0` | Page offset in steps of 50, a non-negative integer. See the Pagination paragraph below |\n\n**Pagination.** The response is one page of up to 50 tasks; the total number of tasks in the list is in `data.totalCount`. `start` selects the page in steps of 50: values from `0` to `49` return the first page, `50` returns the second. Request the next page with `start` increased by exactly 50. Pages are not loaded automatically.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002Fflows\u002F15\u002Ftasks\u002Fcompleted?days=30\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002Fflows\u002F15\u002Ftasks\u002Fcompleted?days=30\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002Fflows\u002F15\u002Ftasks\u002Fcompleted?days=30', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log(`Completed in the last 30 days: ${data.totalCount}`)\ndata.tasks.forEach((task) => {\n  const taskId = Number(task.url.split('\u002F').at(-2))\n  console.log(taskId, task.title, task.responsible.name, task.timeInStatus.formatted)\n})\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002Fflows\u002F15\u002Ftasks\u002Fcompleted?days=30', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | object | The list page and the total number of tasks |\n| `data.tasks` | array | Completed tasks on this page. An empty array if no tasks were closed within `days` days |\n| `data.tasks[].title` | string | Task title |\n| `data.tasks[].url` | string | Relative URL of the task in the Bitrix24 account. There is no separate task ID field: the ID is the last path segment, `3737` and `3719` in the example. The full task: [`GET \u002Fv1\u002Ftasks\u002F:id`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget) |\n| `data.tasks[].serial` | number | Sequence number of the task in the response, starting from `1` |\n| `data.tasks[].creator` | object | Task creator |\n| `data.tasks[].creator.id` | string | Creator ID, as a string. Get: [`GET \u002Fv1\u002Fusers\u002F:id`](\u002Fdocs\u002Fentities\u002Fusers\u002Fget) |\n| `data.tasks[].creator.name` | string | Employee display name |\n| `data.tasks[].creator.avatar` | string | Employee photo URL |\n| `data.tasks[].creator.workPosition` | string \\| null | Job title. Can be an empty string or `null` |\n| `data.tasks[].creator.pathToProfile` | string | Relative URL of the employee profile in the Bitrix24 account |\n| `data.tasks[].responsible` | object | Responsible person for the task. Same fields as `creator`. The ID is a string, get: [`GET \u002Fv1\u002Fusers\u002F:id`](\u002Fdocs\u002Fentities\u002Fusers\u002Fget) |\n| `data.tasks[].timeInStatus` | object | Time from task creation to its closing |\n| `data.tasks[].timeInStatus.years`, `months`, `days`, `hours`, `minutes`, `seconds` | number | Duration components: years, months, days, hours, minutes, seconds |\n| `data.tasks[].timeInStatus.formatted` | string | Duration as a label in the Bitrix24 account language, for example `8 days`. A duration under a minute is labeled `1 minute` |\n| `data.tasks[].canRead` | number | `1` — the employee on whose behalf the call is made can read the task |\n| `data.totalCount` | number | Total number of flow tasks closed within `days` days, across all pages |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"tasks\": [\n      {\n        \"title\": \"Approve the supplier contract\",\n        \"url\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F15\u002Ftasks\u002Ftask\u002Fview\u002F3737\u002F\",\n        \"serial\": 1,\n        \"creator\": {\n          \"id\": \"15\",\n          \"name\": \"Anna Smith\",\n          \"avatar\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fupload\u002Fmain\u002Fa1b\u002Favatar.jpg\",\n          \"workPosition\": \"\",\n          \"pathToProfile\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F15\u002F\"\n        },\n        \"responsible\": {\n          \"id\": \"27\",\n          \"name\": \"David Taylor\",\n          \"avatar\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fupload\u002Fmain\u002Fc2d\u002Favatar.jpg\",\n          \"workPosition\": \"Sales manager\",\n          \"pathToProfile\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F27\u002F\"\n        },\n        \"timeInStatus\": {\n          \"years\": 0,\n          \"months\": 0,\n          \"days\": 8,\n          \"hours\": 0,\n          \"minutes\": 0,\n          \"seconds\": 2,\n          \"formatted\": \"8 days\"\n        },\n        \"canRead\": 1\n      },\n      {\n        \"title\": \"Update the price list\",\n        \"url\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F15\u002Ftasks\u002Ftask\u002Fview\u002F3719\u002F\",\n        \"serial\": 2,\n        \"creator\": {\n          \"id\": \"15\",\n          \"name\": \"Anna Smith\",\n          \"avatar\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fupload\u002Fmain\u002Fa1b\u002Favatar.jpg\",\n          \"workPosition\": \"\",\n          \"pathToProfile\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F15\u002F\"\n        },\n        \"responsible\": {\n          \"id\": \"27\",\n          \"name\": \"David Taylor\",\n          \"avatar\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fupload\u002Fmain\u002Fc2d\u002Favatar.jpg\",\n          \"workPosition\": \"Sales manager\",\n          \"pathToProfile\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F27\u002F\"\n        },\n        \"timeInStatus\": {\n          \"years\": 0,\n          \"months\": 0,\n          \"days\": 29,\n          \"hours\": 0,\n          \"minutes\": 0,\n          \"seconds\": 17,\n          \"formatted\": \"29 days\"\n        },\n        \"canRead\": 1\n      }\n    ],\n    \"totalCount\": 2\n  }\n}\n```\n\n## Error response example\n\n400 — `days` is not passed:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"days must be a non-negative safe integer\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `days` is not passed or is not a non-negative integer. Message `days must be a non-negative safe integer` |\n| 400 | `INVALID_PARAMS` | The request contains a parameter other than `days` and `start`. Message `query contains unsupported fields` |\n| 400 | `INVALID_PARAMS` | `flowId` is not a positive integer. Message `flowId must be a positive safe integer` |\n| 400 | `INVALID_PARAMS` | `start` is not a non-negative integer. Message `start must be a non-negative safe integer` |\n| 401 | `MISSING_API_KEY` | `X-Api-Key` is missing |\n| 401 | `INVALID_API_KEY` | The key is not found |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key lacks the `task` or `tasks` scope |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the call. The text is in `error.message`; the Bitrix24 code, if any, is in `error.b24Code` |\n| 429 | `RATE_LIMITED` | The request rate to Bitrix24 or to the platform was exceeded. Retry after the delay in the `Retry-After` header |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**A nonexistent flow does not cause an error.** A nonexistent or deleted `flowId` returns `200` with an empty `tasks` array and `\"totalCount\": 0`, just like a flow with no tasks completed within `days` days. To check that the flow exists, use [`GET \u002Fv1\u002Ftasks\u002Fflows\u002F:flowId`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fflows-get).\n\n**The `timeInStatus` numbers do not add up to the exact duration.** Only the largest unit, rounded to a whole number, and the seconds are filled in; the units between them are `0`. A task closed 28 days 19 hours after creation appears in the response as `\"days\": 29` with `\"hours\": 0` and `\"minutes\": 0`. For the exact completion time, use the `createdDate` and `closedDate` fields in [`GET \u002Fv1\u002Ftasks\u002F:id`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget).\n\n## See also\n\n- [Flows and flow tasks](\u002Fdocs\u002Fentities\u002Ftasks\u002Fflows)\n- [List pending flow tasks](\u002Fdocs\u002Fentities\u002Ftasks\u002Fflows-pending)\n- [List in-progress flow tasks](\u002Fdocs\u002Fentities\u002Ftasks\u002Fflows-progress)\n- [Get flow](\u002Fdocs\u002Fentities\u002Ftasks\u002Fflows-get)\n- [Complete task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fcomplete)\n- [Get task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget)\n","2026-10-20",{},1794739434247]