Function to update a task. Only the sent fields are changed. The reporter cannot be changed. Unknown IDs and invalid values return code 400
https://rest.crmango.com/api/UpdateTask
Bearer
varchar
Auth token (required in Authorization header)
task_id
integer
ID of the task to update (required)
task_name
varchar
New task name (max 255 chars). Characters ' " ; < > are removed
watcher_id
varchar
Comma-separated IDs of watching users (e.g. "3,7"). Replaces the whole list, empty string = no watchers
Reference: GetAllUsers
is_private
integer
Private task (0 = public, 1 = private)
priority
integer
Task priority (0 = lowest, 5 = highest)
company_id
integer
ID of the related company. 0 = detach the company
label_id
varchar
Comma-separated label IDs (e.g. "4,6"). Replaces the whole list, empty string = no labels
status
integer
Task status. Status 2 = done (progress 100, completion time set); other status reopens a done task
Reference: GetAllLists
progress
integer
Task completion percentage (0–100). 100 = done
task_done
integer
1 = mark as done, 0 = reopen
done_date
date
Completion date when marking as done (Y-m-d). Default is the current time
description
varchar
New description, replaces the old one (auto-encoded to base64 if not already). Empty string = clear. Characters ' " ; < > are removed
is_description_base64
integer
1 = description is already base64 encoded, 0 = will be encoded server-side
task_deadline_date
date
New deadline (Y-m-d or Y-m-d H:i). Empty string = no deadline
planned_start
date
Planned start (Y-m-d H:i). Empty string = clear
planned_end
date
Planned end (Y-m-d H:i), must be after planned start. Empty string = clear
order_id
integer
Linked order ID, the change is applied to sub-tasks as well. 0 = detach the order
required_act_type_id
integer
Required activity type (optional)
act_id
integer
Activity ID (optional)
recurring_task_id
integer
ID of the recurring task template. 0 = detach
days_before
integer
How many days before the deadline to notify
repeat_after
integer
How many days after completion to repeat the task (0–5000, 0 = no repeat). When a task with repeat is completed, a copy with a new deadline is created
repeat_after_km
integer
Repeat after this many kilometers (vehicles)
km_before
integer
How many kilometers before the due tachometer status to notify
tachometer_status
integer
Tachometer status at which the task is due
vehicle_id
integer
ID of the related vehicle. 0 = detach
trailer_id
integer
ID of the related trailer. 0 = detach
driver_id
integer
ID of the driver (contact of the driver type). 0 = detach
register_id
integer
ID of the related register record. Used only together with register_type_id
register_type_id
integer
ID of the register type. Used only together with register_id
Function to update a task. Only the sent fields are changed. The reporter cannot be changed. Unknown IDs and invalid values return code 400
code
integer
HTTP status code (200 = OK)
message
varchar
Confirmation message
curl --request PUT \
--url 'https://rest.crmango.com/api/UpdateTask' \
--header 'Authorization: Bearer auth_token' \
--header 'Content-Type: application/json' \
--data '{
{
"task_id": 1234,
"assignee_id": 12,
"priority": 4,
"status": 3,
"progress": 50,
"label_id": "4,6",
"task_deadline_date": "2026-11-30 12:00"
}
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/UpdateTask',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
{
"task_id": 1234,
"assignee_id": 12,
"priority": 4,
"status": 3,
"progress": 50,
"label_id": "4,6",
"task_deadline_date": "2026-11-30 12:00"
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo $response;
var data = JSON.stringify({
{
"task_id": 1234,
"assignee_id": 12,
"priority": 4,
"status": 3,
"progress": 50,
"label_id": "4,6",
"task_deadline_date": "2026-11-30 12:00"
}
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("PUT", "https://rest.crmango.com/api/UpdateTask");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
import requests
import json
url = "https://rest.crmango.com/api/UpdateTask"
payload = json.dumps({
{
"task_id": 1234,
"assignee_id": 12,
"priority": 4,
"status": 3,
"progress": 50,
"label_id": "4,6",
"task_deadline_date": "2026-11-30 12:00"
}
})
headers = {
'Authorization': 'Bearer auth_token',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"message": "Task has been updated"
}
{
"code": "int",
"message": "string"
}