Get Task History tasks.task.history.list
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
taskWho can execute the method: any user with read access to the task
The method tasks.task.history.list retrieves the history of changes for a task.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
taskId* |
The identifier of the task for which to retrieve the history. The task identifier can be obtained when creating a new task or by using the get task list method |
|
filter |
Filter by event type in the format |
|
order |
An object for sorting the result in the form The sorting direction can take the following values:
By default, records are sorted in descending order by creation time, meaning from newest to oldest |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"taskId":8137,"filter":{"FIELD":"COMMENT"},"order":{"createdDate":"ASC"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/tasks.task.history.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"taskId":8137,"filter":{"FIELD":"COMMENT"},"order":{"createdDate":"ASC"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/tasks.task.history.list
// callListMethod: Retrieves all data at once.
// Use only for small selections (< 1000 items) due to high
// memory load.
try {
const response = await $b24.callListMethod(
'tasks.task.history.list',
{
taskId: 8137,
filter: { FIELD: 'COMMENT' },
order: { createdDate: 'ASC' }
},
(progress) => { console.log('Progress:', progress) }
);
const items = response.getData() || [];
for (const entity of items) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error)
}
// fetchListMethod: Retrieves data in parts using an iterator.
// Use for large volumes of data for efficient memory consumption.
try {
const generator = $b24.fetchListMethod('tasks.task.history.list', {
taskId: 8137,
filter: { FIELD: 'COMMENT' },
order: { createdDate: 'ASC' }
}, 'ID');
for await (const page of generator) {
for (const entity of page) { console.log('Entity:', entity) }
}
} catch (error) {
console.error('Request failed', error)
}
// callMethod: Manual control of pagination through the start parameter.
// Use for precise control over request batches.
// Less efficient for large data than fetchListMethod.
try {
const response = await $b24.callMethod('tasks.task.history.list', {
taskId: 8137,
filter: { FIELD: 'COMMENT' },
order: { createdDate: 'ASC' }
}, 0);
const result = response.getData().result || [];
for (const entity of result) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error)
}
try {
$response = $b24Service
->core
->call(
'tasks.task.history.list',
[
'taskId' => 8137,
'filter' => ['FIELD' => 'COMMENT'],
'order' => ['createdDate' => 'ASC']
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
processData($result);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error fetching task history: ' . $e->getMessage();
}
BX24.callMethod(
'tasks.task.history.list',
{
taskId: 8137,
filter: { FIELD: 'COMMENT' },
order: {createdDate: 'ASC'},
},
function(result){
console.info(result.data());
console.log(result);
}
);
require_once('crest.php');
$result = CRest::call(
'tasks.task.history.list',
[
'taskId' => 8137,
'filter' => ['FIELD' => 'COMMENT'],
'order' => ['createdDate' => 'ASC']
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": {
"list": [
{
"id": 16359,
"createdDate": "2025-09-25T14:09:45+02:00",
"field": "NEW",
"value": {
"from": null,
"to": null
},
"user": {
"id": 503,
"name": "Danielle",
"lastName": "Foster",
"secondName": "",
"login": "danielle@mysite.com"
}
},
{
"id": 16361,
"createdDate": "2025-09-25T14:09:45+02:00",
"field": "COMMENT",
"value": {
"from": null,
"to": "3409"
},
"user": {
"id": 503,
"name": "Danielle",
"lastName": "Foster",
"secondName": "",
"login": "danielle@mysite.com"
}
},
{
"id": 16363,
"createdDate": "2025-09-25T14:09:45+02:00",
"field": "CHECKLIST_ITEM_CREATE",
"value": {
"from": "",
"to": "What to do"
},
"user": {
"id": 503,
"name": "Danielle",
"lastName": "Foster",
"secondName": "",
"login": "danielle@mysite.com"
}
},
{
"id": 16365,
"createdDate": "2025-09-25T14:09:45+02:00",
"field": "CHECKLIST_ITEM_CREATE",
"value": {
"from": "",
"to": "Contact the client"
},
"user": {
"id": 503,
"name": "Danielle",
"lastName": "Foster",
"secondName": "",
"login": "danielle@mysite.com"
}
},
{
"id": 16367,
"createdDate": "2025-09-25T14:09:45+02:00",
"field": "CHECKLIST_ITEM_CREATE",
"value": {
"from": "",
"to": "Prepare the contract"
},
"user": {
"id": 503,
"name": "Danielle",
"lastName": "Foster",
"secondName": "",
"login": "danielle@mysite.com"
}
}
],
},
"time": {
"start": 1758798620,
"finish": 1758798620.969019,
"duration": 0.9690189361572266,
"processing": 0,
"date_start": "2025-09-25T14:10:20+02:00",
"date_finish": "2025-09-25T14:10:20+02:00",
"operating_reset_at": 1758799220,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
The root element of the response. Contains an array Returns an empty array |
|
time |
Information about the request execution time |
Objects lists
|
Name |
Description |
|
id |
Identifier of the history event |
|
createdDate |
Date and time of the event creation in ISO 8601 format |
|
field |
Type of history event. Possible values for
|
|
value |
The object describes what change occurred:
The type of value depends on the event: for a new comment — |
|
user |
An object with user description who performed the action |
User Object
|
Name |
Description |
|
id |
User identifier |
|
name |
First name |
|
lastName |
Last name |
|
secondName |
Middle name |
|
login |
Login |
Error Handling
HTTP Status: 400
{
"error": "0",
"error_description": "Access denied. (internal error)"
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Code |
Description |
Value |
|
|
CTaskItem All parameters in the constructor must have real class type (internal error) |
Required parameter |
|
|
wrong task id (internal error) |
The value of |
|
|
Access denied. (internal error) |
The user does not have access to the task |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not permitted for calls using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The HTTPS protocol is required for method calls |
|
|
|
The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it |
|
|
|
The REST API is only available on commercial plans |
|
|
|
The user associated with the access token or webhook used to call the method lacks the necessary permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the portal administrator has restricted access to this application to specific users only |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |