[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftasks\u002Frenew":3,"docs-tabs-entities\u002Ftasks\u002Frenew":6},{"content":4,"lastmod":5},"## Renew task\n\n`POST \u002Fv1\u002Ftasks\u002F:taskId\u002Frenew`\n\nPuts a task in the Completed, Deferred or Awaiting Control status back to work: moves it to the Pending status.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `taskId` (path) | number | yes | Task ID. List: [`GET \u002Fv1\u002Ftasks`](\u002Fdocs\u002Fentities\u002Ftasks\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `params` | object | no | Additional action parameters. Passed to Bitrix24 unchanged |\n\nThe request body can be empty or `{}`. Any field other than `params` is rejected with `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST 'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Frenew' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST 'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Frenew' \\\n  -H 'X-Api-Key: YOUR_APP_KEY' \\\n  -H 'Authorization: Bearer USER_SESSION_TOKEN' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Frenew', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({}),\n})\nconst result = await response.json()\nconsole.log(result.data.task.status)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Frenew', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({}),\n})\nconst result = await response.json()\nconsole.log(result.data.task.status)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data.task` | object | The full task object after the action. Values arrive in raw form: numbers as strings (`\"id\": \"289\"`), flags as `Y` or `N` (`\"taskControl\": \"Y\"`). [`GET \u002Fv1\u002Ftasks\u002F:id`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget) returns the same fields as numbers and `true`\u002F`false` |\n| `data.task.id` | string | Task ID |\n| `data.task.status` | string | Status after the action, here `2` — Pending. Value meanings: `GET \u002Fv1\u002Ftasks\u002Ffields` → `fields.status.enum` |\n| `data.task.closedDate` | string \\| null | Closing date. After renewal it is `null` |\n| `data.task.action` | object | Which actions the key's user can take after the call: the key is the action name (`start`, `pause`, `complete`, `approve`, `disapprove`, `defer`, `renew` and others), the value is `true` or `false` |\n\n## Response example\n\nOnly the main fields of the task object are shown.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"task\": {\n      \"id\": \"289\",\n      \"title\": \"Prepare the quarterly report\",\n      \"status\": \"2\",\n      \"statusChangedDate\": \"2026-10-13T13:46:54+02:00\",\n      \"createdBy\": \"1\",\n      \"responsibleId\": \"1\",\n      \"closedDate\": null,\n      \"taskControl\": \"Y\",\n      \"action\": {\n        \"start\": true,\n        \"pause\": false,\n        \"complete\": true,\n        \"approve\": false,\n        \"disapprove\": false,\n        \"defer\": true,\n        \"renew\": false\n      }\n    }\n  }\n}\n```\n\n## Error response example\n\n422 — the task is in progress, so there is nothing to renew:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Action unavailable\",\n    \"b24Code\": \"1048582\"\n  }\n}\n```\n\nThe `error.message` text comes from Bitrix24, so its wording and language depend on the Bitrix24 account language. Branch on `error.code`, not on the message text.\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `taskId` is not a positive integer: `taskId must be a positive integer` |\n| 400 | `INVALID_PARAMS` | The request body is not a JSON object: `body must be an object` |\n| 400 | `INVALID_PARAMS` | The body contains fields other than `params`: `body contains unsupported fields` |\n| 400 | `INVALID_PARAMS` | `params` is not an object: `params must be an object` |\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 valid Bitrix24 token |\n| 403 | `SCOPE_DENIED` | The key lacks the `task` or `tasks` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only |\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no rights to the task |\n| 422 | `BITRIX_ERROR` | The task is in the In Progress status: `Action unavailable` |\n| 422 | `BITRIX_ERROR` | No task exists with this `taskId`. The message is the same: `Action unavailable` |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Which statuses allow renewal.** The action moves a task in the Completed, Deferred or Awaiting Control status to Pending. A task that is already Pending stays in that status, and the response is `200`. A task that is In Progress cannot be renewed: the call returns `422`.\n- **Availability is visible in advance.** The `action` map in the [`GET \u002Fv1\u002Ftasks\u002F:id`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget) response shows `renew: true` when the key's user can renew the task right now.\n- **A missing task does not return `404`.** An unknown `taskId` gets the same `422 BITRIX_ERROR` with the message `Action unavailable` as a task in the wrong status. To tell the two apart, request the task with [`GET \u002Fv1\u002Ftasks\u002F:id`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget): for a missing task it returns `404`.\n\n## See also\n\n- [Complete task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fcomplete)\n- [Defer task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fdefer)\n- [Start task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fstart)\n- [Get task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget)\n- [Tasks](\u002Fdocs\u002Fentities\u002Ftasks)\n","2026-10-19",{},1794739435967]