Automated employee tasks

Lesson 10 out of 29

How to assign a task to an employee via REST?

Automated employee tasks

1 min

To assign a task to an employee via REST, we must first navigate to the "Other" section and select the "Inbound Webhook" template.

The accompanying example code, which may be downloaded and uploaded to your server in a manner like the procedure demonstrated in the "Inbound and outbound webhooks" lesson, is crucial in this process.


Do not forget to copy your webhook code into the settings.php file and grant access to Tasks in the “Assign permissions” block.

Examining the code, we observe that it employs the task.task.add method, passing in parameters such as task name, description, deadline, and the employee ID of the individual assigned to the task.

The example illustrates the required format for specifying the deadline, which, in this instance, is set for 7 PM one week from the present date.

By accessing the index.php file through a browser, the example can be executed, resulting in the creation of a new task with the desired deadline in Bitrix24."


Lesson materials: