[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-tasks":3,"docs-tabs-tasks":6},{"content":4,"lastmod":5},"# Tasks: kanban, My Plan and the day plan\n\nStages of a workgroup kanban and of the personal My Plan, moving tasks between stages with ordering, and reading the day plan. The tasks themselves are read and changed in the [Tasks](\u002Fdocs\u002Fentities\u002Ftasks) section.\n\n**Scope:** `task` | **Base URL:** `https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1` | **Authorization:** `X-Api-Key`\n\n[Quick start](#quick-start) | [Full example](#full-example-a-new-stage-and-moving-tasks) | [Endpoint reference](#endpoint-reference) | [Error codes](#error-codes)\n\nA task can sit in three independent places, and each one is read differently:\n\n| What | Whose | How it is set | How it is read |\n|-----|-----|--------------|--------------|\n| Group kanban | shared by all group members | `entityId` — group ID | the task's `stageId` field, [`GET \u002Fv1\u002Ftasks\u002Fstages\u002F:entityId`](\u002Fdocs\u002Ftask-stages\u002Flist) |\n| My Plan | the key owner's personal kanban | `entityId` equals `0` | the `filter[stagesId]` filter in the [task list](\u002Fdocs\u002Fentities\u002Ftasks\u002Flist) |\n| Day plan | the key owner's personal list for the day | manually in the workday widget | [`GET \u002Fv1\u002Ftasks\u002Fday-plan`](\u002Fdocs\u002Ftasks\u002Fday-plan) |\n\nMoving a task in My Plan does not change the task's `stageId` in the group, and the day plan is not linked to either board.\n\n## Quick start\n\nRead the stages of the key owner's My Plan:\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002Fstages\u002F0\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 489,\n      \"title\": \"Not planned\",\n      \"sort\": 100,\n      \"color\": \"00C4FB\",\n      \"systemType\": \"NEW\",\n      \"entityId\": 1317,\n      \"entityType\": \"U\"\n    },\n    {\n      \"id\": 491,\n      \"title\": \"This week\",\n      \"sort\": 200,\n      \"color\": \"47D1E2\",\n      \"systemType\": null,\n      \"entityId\": 1317,\n      \"entityType\": \"U\"\n    }\n  ]\n}\n```\n\nFor a group kanban, pass the group ID from [`GET \u002Fv1\u002Fworkgroups`](\u002Fdocs\u002Fentities\u002Fworkgroups\u002Flist) instead of `0`.\n\n## Full example: a new stage and moving tasks\n\nThe scenario adds a stage to a group kanban, moves two tasks onto it in the required order, reads the board and removes the stage. Substitute the ID of your group and of two of its tasks.\n\n```javascript\nconst VIBE_URL = 'https:\u002F\u002Fvibecode.bitrix24.com'\nconst VIBE_API_KEY = process.env.VIBE_API_KEY\nconst GROUP_ID = 155    \u002F\u002F workgroup ID, GET \u002Fv1\u002Fworkgroups\nconst TASK_ID = 4127    \u002F\u002F the task of this group being moved\nconst ANCHOR_ID = 4125  \u002F\u002F the task it will be placed before\n\nasync function api(method, path, body) {\n  const res = await fetch(`${VIBE_URL}\u002Fv1${path}`, {\n    method,\n    headers: { 'X-Api-Key': VIBE_API_KEY, 'Content-Type': 'application\u002Fjson' },\n    body: body ? JSON.stringify(body) : undefined,\n  })\n  const json = res.status === 204 ? null : await res.json()\n  if (!res.ok) throw new Error(`${method} ${path}: ${json?.error?.code} ${json?.error?.message}`)\n  return json?.data\n}\n\n\u002F\u002F Step 1. Make sure the key's user can sort the group kanban.\nconst { canMove } = await api('GET', `\u002Ftasks\u002Fstages\u002F${GROUP_ID}\u002Fcan-move`)\nif (!canMove) throw new Error('No permission to move tasks in this group kanban')\n\n\u002F\u002F Step 2. Add a stage to the end of the kanban.\nconst stage = await api('POST', `\u002Ftasks\u002Fstages\u002F${GROUP_ID}`, { title: 'Pending approval', color: 'FF8800' })\nconsole.log('New stage:', stage.id, stage.title)\n\n\u002F\u002F Step 3. Move the tasks to the new stage. The anchor task must be on\n\u002F\u002F the same board, so move it first, then place the second one before it.\nawait api('POST', `\u002Ftasks\u002F${ANCHOR_ID}\u002Fmove-stage`, { stageId: stage.id })\nawait api('POST', `\u002Ftasks\u002F${TASK_ID}\u002Fmove-stage`, { stageId: stage.id, beforeTaskId: ANCHOR_ID })\n\n\u002F\u002F Step 4. Re-read the board: stages come in ascending sort order.\nconst stages = await api('GET', `\u002Ftasks\u002Fstages\u002F${GROUP_ID}`)\nfor (const s of stages) console.log(s.sort, s.id, s.title, s.systemType ?? '')\n\n\u002F\u002F Step 5. Remove the stage. Only an empty stage can be deleted, so first\n\u002F\u002F move the tasks to the first stage of the board.\nconst first = stages[0]\nawait api('POST', `\u002Ftasks\u002F${TASK_ID}\u002Fmove-stage`, { stageId: first.id })\nawait api('POST', `\u002Ftasks\u002F${ANCHOR_ID}\u002Fmove-stage`, { stageId: first.id })\nawait api('DELETE', `\u002Ftask-stages\u002F${stage.id}`)\nconsole.log('Stage deleted')\n```\n\nThe first stage of the board is the default stage with `systemType: NEW`. It cannot be deleted, and when the first stage changes, tasks without a stage stay assigned to the former first stage. Details are on the stage [update](\u002Fdocs\u002Ftask-stages\u002Fupdate) and [delete](\u002Fdocs\u002Ftask-stages\u002Fdelete) pages.\n\n## Endpoint reference\n\n| Method | Path | Bitrix24 method | Description |\n|-------|------|---------------|----------|\n| GET | [`\u002Fv1\u002Ftasks\u002Fstages\u002F:entityId`](\u002Fdocs\u002Ftask-stages\u002Flist) | task.stages.get | Stages of a group kanban or My Plan |\n| POST | [`\u002Fv1\u002Ftasks\u002Fstages\u002F:entityId`](\u002Fdocs\u002Ftasks\u002Fstages) | task.stages.add | Create a stage |\n| PATCH | [`\u002Fv1\u002Ftask-stages\u002F:stageId`](\u002Fdocs\u002Ftask-stages\u002Fupdate) | task.stages.update | Update a stage |\n| DELETE | [`\u002Fv1\u002Ftask-stages\u002F:stageId`](\u002Fdocs\u002Ftask-stages\u002Fdelete) | task.stages.delete | Delete an empty stage |\n| POST | [`\u002Fv1\u002Ftasks\u002F:taskId\u002Fmove-stage`](\u002Fdocs\u002Ftasks\u002Fmove-stage) | task.stages.movetask | Move a task with ordering |\n| GET | [`\u002Fv1\u002Ftasks\u002Fstages\u002F:entityId\u002Fcan-move`](\u002Fdocs\u002Ftasks\u002Fstages-can-move) | task.stages.canmovetask | Permission to sort a group kanban |\n| GET | [`\u002Fv1\u002Ftasks\u002Fday-plan`](\u002Fdocs\u002Ftasks\u002Fday-plan) | task.planner.getlist | The key owner's day plan |\n\nA [task update](\u002Fdocs\u002Fentities\u002Ftasks\u002Fupdate) with the `stageId` field also changes the task's stage in the group kanban, but without ordering and only within the task's group.\n\n## Error codes\n\n### Section errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | Parameter or body validation failed. The conditions are listed on each method's page |\n| 404 | `ENTITY_NOT_FOUND` | No task or stage with this ID |\n| 409 | `TASK_NOT_IN_PLAN` | A move in My Plan, but the task is not in the key owner's plan |\n| 409 | `STAGE_NOT_EMPTY` | Deleting a stage that contains tasks |\n| 409 | `STAGE_IS_SYSTEM` | Deleting the first stage of the board |\n\n### System errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `UNSUPPORTED_FILTER` | A `filter` was passed in the stages request: the stage list is always returned in full |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | The key has no valid Bitrix24 token |\n| 403 | `SCOPE_DENIED` | The key has neither the `task` nor the `tasks` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | A read-only key attempted a create, update, delete or move |\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permissions for the group or the task |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request or did not confirm the change |\n| 502 | `BITRIX_ERROR` | Bitrix24 returned an unexpectedly structured response to the permission check or the day plan read |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Tasks](\u002Fdocs\u002Fentities\u002Ftasks)\n- [Task change history](\u002Fdocs\u002Ftask-history)\n- [Scrum kanban stages](\u002Fdocs\u002Fscrum\u002Fstages)\n- [Workgroups](\u002Fdocs\u002Fentities\u002Fworkgroups)\n- [Workday](\u002Fdocs\u002Fworkday)\n","2026-10-14",{},1795602469067]