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: task

Who 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
type

Description

taskId*
integer

The identifier of the task for which the history needs to be retrieved.

The task identifier can be obtained when creating a new task or by using the get task list method

filter
object

Filter by event type in the format {FIELD: 'EVENT'}. A list of possible values for FIELD is described below

order
object

An object for sorting the result in the form {"field": "sort value", ... }.

The sorting direction can take the following values:

  • asc — ascending
  • desc — descending

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
        
// This snippet is an ES module: top-level await requires type="module" or a bundler.
        // $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
        import { Text } from '@bitrix24/b24jssdk'
        import type { B24Frame, ISODate } from '@bitrix24/b24jssdk'
        
        declare const $b24: B24Frame
        
        // Shape of the payload returned in result (match the "response handling" section of the page)
        type TaskHistoryResult = {
          list: Array<{
            id: number
            createdDate: ISODate
            field: string
            value: {
              from: string | null
              to: string | null
            }
            user: {
              id: number
              name: string
              lastName: string
              secondName: string
              login: string
            }
          }>
        }
        
        try {
          // tasks.task.history.list returns a single page (max 50 records). For the whole result set
          // use a list helper: $b24.actions.v2.callList.make() returns every record as one
          // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
          // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
          // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
          const response = await $b24.actions.v2.call.make<TaskHistoryResult>({
            method: 'tasks.task.history.list',
            params: {
              taskId: 8137,
              filter: { FIELD: 'COMMENT' },
              order: { createdDate: 'ASC' },
              start: 0,
            },
            requestId: Text.getUuidRfc4122()
          })
        
          // The payload is available only on a successful response
          if (!response.isSuccess) {
            console.error(response.getErrorMessages().join('; '))
          } else {
            const result = response.getData()!.result
            console.info('History entries:', result.list.length, result.list)
          }
        } catch (error) {
          // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
          console.error(error)
        }
        
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
        <script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
        <script>
          async function fetchTaskHistory() {
            try {
              // Initialize the SDK inside a Bitrix24 frame
              const $b24 = await B24Js.initializeB24Frame()
        
              // tasks.task.history.list returns a single page (max 50 records). For the whole result set
              // use a list helper: $b24.actions.v2.callList.make() returns every record as one
              // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
              // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
              // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
              const response = await $b24.actions.v2.call.make({
                method: 'tasks.task.history.list',
                params: {
                  taskId: 8137,
                  filter: { FIELD: 'COMMENT' },
                  order: { createdDate: 'ASC' },
                  start: 0,
                },
                requestId: B24Js.Text.getUuidRfc4122()
              })
        
              // The payload is available only on a successful response
              if (!response.isSuccess) {
                console.error(response.getErrorMessages().join('; '))
                return
              }
        
              const result = response.getData().result
              console.info('History entries:', result.list.length, result.list)
            } catch (error) {
              // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
              console.error(error)
            }
          }
        
          document.addEventListener('DOMContentLoaded', fetchTaskHistory)
        </script>
        
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": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@mysite.com"
                        }
                    },
                    {
                        "id": 16361,
                        "createdDate": "2025-09-25T14:09:45+02:00",
                        "field": "COMMENT",
                        "value": {
                            "from": null,
                            "to": "3409"
                        },
                        "user": {
                            "id": 503,
                            "name": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@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": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@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": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@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": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@mysite.com"
                        }
                    },
                    {
                        "id": 16369,
                        "createdDate": "2025-09-25T14:09:45+02:00",
                        "field": "CHECKLIST_ITEM_CREATE",
                        "value": {
                            "from": "",
                            "to": "Sign the contract"
                        },
                        "user": {
                            "id": 503,
                            "name": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@mysite.com"
                        }
                    },
                    {
                        "id": 16371,
                        "createdDate": "2025-09-25T14:09:57+02:00",
                        "field": "AUDITORS",
                        "value": {
                            "from": "",
                            "to": "547"
                        },
                        "user": {
                            "id": 503,
                            "name": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@mysite.com"
                        }
                    },
                    {
                        "id": 16375,
                        "createdDate": "2025-09-25T14:09:57+02:00",
                        "field": "COMMENT",
                        "value": {
                            "from": null,
                            "to": "3411"
                        },
                        "user": {
                            "id": 503,
                            "name": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@mysite.com"
                        }
                    },
                    {
                        "id": 16373,
                        "createdDate": "2025-09-25T14:09:58+02:00",
                        "field": "COMMENT",
                        "value": {
                            "from": null,
                            "to": "3413"
                        },
                        "user": {
                            "id": 503,
                            "name": "Maria",
                            "lastName": "Johnson",
                            "secondName": "",
                            "login": "maria@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
type

Description

result
object

The root element of the response. Contains an array list, which includes objects with event descriptions for the task.

Returns an empty array "list":[] if the task does not exist

time
time

Information about the request execution time

Objects lists

Name
type

Description

id
integer

Identifier of the history event

createdDate
string

Date and time of the event creation in ISO 8601 format

field
string

Type of the history event. Possible values for field:

  • TITLE — change of task title
  • DESCRIPTION — change of task description
  • REAL_STATUS — change of actual status
  • STATUS — change of task status
  • PRIORITY — change of priority
  • MARK — change of task rating
  • COMMENT — addition of a comment
  • DELETE — deletion of a task
  • NEW — creation of a new task
  • RENEW — restoration of a task
  • MOVE_TO_BACKLOG — moving a task to the backlog
  • MOVE_TO_SPRINT — moving a task to a sprint
  • PARENT_ID — change of parent task
  • GROUP_ID — change of working group/project
  • STAGE_ID — change of stage
  • CREATED_BY — change of task author
  • RESPONSIBLE_ID — change of executor
  • ACCOMPLICES — change of participants
  • AUDITORS — change of auditors
  • DEADLINE — change of deadline
  • START_DATE_PLAN — change of planned start date
  • END_DATE_PLAN — change of planned end date
  • DURATION_PLAN — change of planned duration
  • DURATION_PLAN_SECONDS — change of planned duration in seconds
  • DURATION_FACT — change of actual duration
  • TIME_ESTIMATE — change of time estimate
  • TIME_SPENT_IN_LOGS — change of actual time spent in logs
  • TAGS — change of task tags
  • DEPENDS_ON — change of task dependencies
  • FILES — change of file list
  • UF_TASK_WEBDAV_FILES — change of user field with files
  • CHECKLIST_ITEM_CREATE — creation of a checklist item
  • CHECKLIST_ITEM_RENAME — renaming of a checklist item
  • CHECKLIST_ITEM_REMOVE — deletion of a checklist item
  • CHECKLIST_ITEM_CHECK — marking a checklist item as completed
  • CHECKLIST_ITEM_UNCHECK — unchecking a checklist item
  • ADD_IN_REPORT — change of the "add to report" flag
  • TASK_CONTROL — change of result control
  • ALLOW_TIME_TRACKING — enabling or disabling time tracking
  • ALLOW_CHANGE_DEADLINE — allowing or prohibiting deadline changes
  • FLOW_ID — change of flow

value
object

The object describes what change occurred:

  • from — value before the change
  • to — value after the change

The type of value depends on the event: for a new comment — ID of the comment, for a checklist item change — text of the item, for adding an auditor — user identifier, and so on

user
object

An object with user description who performed the action

User Object

Name
type

Description

id
integer

User identifier

name
string

First name

lastName
string

Last name

secondName
string

Middle name

login
string

Login

Error Handling

HTTP Status: 400

{
            "error": "0",
            "error_description": "Access denied. (internal error)"
        }
        

Name
type

Description

error
string

String error code. It may consist of digits, Latin letters, and underscores

error_description
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

100

CTaskItem All parameters in the constructor must have real class type (internal error)

Required parameter taskId is not specified

0

wrong task id (internal error)

The value of taskId is of incorrect type

0

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
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

405

ERROR_BATCH_METHOD_NOT_ALLOWED
Method is not allowed for batch usage

The current method is not permitted for calls using batch

400

ERROR_BATCH_LENGTH_EXCEEDED
Max batch length exceeded

The maximum length of parameters passed to the batch method has been exceeded

401

NO_AUTH_FOUND
Wrong authorization data

Invalid access token or webhook code

400

INVALID_REQUEST
Https required

The HTTPS protocol is required for method calls

503

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it

403

ACCESS_DENIED
REST API is available only on commercial plans

The REST API is only available on commercial plans

403

INVALID_CREDENTIALS
Invalid request credentials

The user associated with the access token or webhook used to call the method lacks the necessary permissions

404

ERROR_MANIFEST_IS_NOT_AVAILABLE
Manifest is not available

The manifest is not available

403

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires higher privileges than those provided by the webhook token

401

expired_token
The access token provided has expired

The provided access token has expired

403

user_access_error
The user does not have access to the application

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

500

PORTAL_DELETED
Portal was deleted

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

Continue Learning