--- sidebar_position: 7 description: Approve task and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24] --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Approve task Approve task by ID `Function ApproveTask(Val URL, Val TaskID, Val Token = "") Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used | | TaskID | --task | Number, String | ✔ | Task ID | | Token | --token | String | ✖ | Access token, when app auth method used | Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
:::tip Method at API documentation: [tasks.task.approve](https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_approve.php) :::
```bsl title="1C:Enterprise/OneScript code example" URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m..."; TaskID = "8618"; Result = OPI_Bitrix24.ApproveTask(URL, TaskID); URL = "b24-ar17wx.bitrix24.by"; Token = "53100369006e9f06006b12e400000001000..."; TaskID = "8620"; Result = OPI_Bitrix24.ApproveTask(URL, TaskID, Token); ``` ```bash oint bitrix24 ApproveTask \ --url "b24-ar17wx.bitrix24.by" \ --task "8670" \ --token "***" ``` ```batch oint bitrix24 ApproveTask ^ --url "b24-ar17wx.bitrix24.by" ^ --task "8670" ^ --token "***" ``` ```json title="Result" { "result": { "task": { "id": "8720", "title": "Another task title", "description": "Another task description", "descriptionInBbcode": "Y", "declineReason": "", "priority": "1", "notViewed": "N", "statusComplete": "2", "multitask": "N", "stageId": "0", "responsibleId": "2956", "responsibleName": "Олег", "responsibleLastName": "Лама", "responsibleSecondName": null, "responsibleLogin": "237b4af3-e06e-499c-b2ac-2e8df3535bfe@exepmple.org", "responsibleWorkPosition": null, "responsiblePhoto": null, "dateStart": null, "durationFact": null, "timeEstimate": "0", "timeSpentInLogs": null, "replicate": "N", "deadline": "2025-11-01T11:52:00+00:00", "deadlineOrig": "01.11.2025 14:52:00", "startDatePlan": "2025-10-31T11:52:31+00:00", "endDatePlan": "2025-10-31T21:00:00+00:00", "createdBy": "1", "createdByName": "Антон", "createdByLastName": "Титовец", "createdBySecondName": null, "createdByLogin": "VKuser657846756", "createdByWorkPosition": null, "createdByPhoto": "30", "createdDate": "2025-10-31T11:52:31+00:00", "changedBy": "1", "changedDate": "2025-10-31T11:52:56+00:00", "statusChangedBy": "1", "closedBy": "1", "closedDate": "2025-10-31T11:52:56+00:00", "activityDate": "2025-10-31T11:52:56+00:00", "guid": "{27e3fa0d-cd63-4993-965c-3f9f350bfea8}", "xmlId": null, "mark": null, "allowChangeDeadline": "N", "allowTimeTracking": "N", "matchWorkTime": "N", "taskControl": "N", "addInReport": "N", "forumTopicId": "5636", "parentId": null, "commentsCount": "2", "serviceCommentsCount": "2", "forumId": "11", "siteId": "s1", "subordinate": "Y", "exchangeModified": null, "exchangeId": null, "outlookVersion": "6", "viewedDate": "2025-10-31T11:52:56+00:00", "deadlineCounted": "0", "forkedByTemplateId": null, "sorting": null, "durationPlanSeconds": null, "durationTypeAll": "days", "scenarioName": [ "default" ], "isRegular": "N", "flowId": null, "isMuted": "N", "isPinned": "N", "isPinnedInGroup": "N", "ufCrmTask": false, "ufTaskWebdavFiles": false, "ufMailMessage": null, "status": "5", "statusChangedDate": "2025-10-31T11:52:56+00:00", "durationPlan": null, "durationType": "days", "favorite": "N", "groupId": "0", "auditors": [], "accomplices": [], "tags": [], "checklist": [], "files": [], "dependsOn": [], "group": [], "creator": { "id": "1", "name": "Антон Титовец", "link": "/company/personal/user/1/", "icon": "https://b24-ar17wx.bitrix24.by/b28528874/resize_cache/30/c0120a8d7c10d63c83e32398d1ec4d9e/main/d7e/d7e99cf556e4ab676463dae2c00ddfbb/a7e0af6899300e3c684caeca5c334d81.jpg", "workPosition": null }, "responsible": { "id": "2956", "name": "Олег Лама", "link": "/company/personal/user/2956/", "icon": "/bitrix/images/tasks/default_avatar.png", "workPosition": null }, "accomplicesData": [], "auditorsData": [], "newCommentsCount": 0, "action": { "accept": false, "decline": false, "complete": false, "approve": false, "disapprove": false, "start": false, "pause": false, "delegate": false, "remove": true, "edit": true, "defer": false, "renew": true, "create": true, "changeDeadline": true, "checklistAddItems": true, "addFavorite": true, "deleteFavorite": false, "rate": true, "take": false, "edit.originator": false, "checklist.reorder": true, "elapsedtime.add": true, "dayplan.timer.toggle": false, "edit.plan": true, "checklist.add": true, "favorite.add": true, "favorite.delete": false }, "checkListTree": { "nodeId": 0, "fields": { "id": null, "copiedId": null, "entityId": null, "userId": 1, "createdBy": null, "parentId": null, "title": "", "sortIndex": null, "displaySortIndex": "", "isComplete": false, ... ```