Skip to main content

Delete comment

Delete task comment by ID

Function DeleteTaskComment(Val URL, Val TaskID, Val CommentID, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
TaskID--taskNumber, StringTask ID
CommentID--commentNumber, StringID of comment to remove
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: task.commentitem.delete


1C:Enterprise/OneScript code example
    URL       = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
TaskID = "8622";
CommentID = "20004";

Result = OPI_Bitrix24.DeleteTaskComment(URL, TaskID, CommentID);

URL = "b24-ar17wx.bitrix24.by";
Token = "53100369006e9f06006b12e400000001000...";
CommentID = "20006";

Result = OPI_Bitrix24.DeleteTaskComment(URL, TaskID, CommentID, Token);
    oint bitrix24 DeleteTaskComment \
--url "b24-ar17wx.bitrix24.by" \
--task "8672" \
--comment 20116 \
--token "***"
Result
{
"result": true,
"time": {
"start": 1761911642,
"finish": 1761911643.11581,
"duration": 1.11580991744995,
"processing": 1,
"date_start": "2025-10-31T11:54:02+00:00",
"date_finish": "2025-10-31T11:54:03+00:00",
"operating_reset_at": 1761912242,
"operating": 0.210317134857178
}
}