Function to delete a task (the task is marked as deleted and is no longer shown)
https://rest.crmango.com/api/DeleteTask
Bearer
varchar
Auth token (required in Authorization header)
task_id
integer
ID of the task to delete (required)
Function to delete a task (the task is marked as deleted and is no longer shown)
code
integer
HTTP status code (200 = OK)
message
varchar
Confirmation message
curl --request DELETE \
--url 'https://rest.crmango.com/api/DeleteTask' \
--header 'Authorization: Bearer auth_token' \
--header 'Content-Type: application/json' \
--data '{
{
"task_id": 1234
}
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/DeleteTask',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => '{
{
"task_id": 1234
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo $response;
var data = JSON.stringify({
{
"task_id": 1234
}
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://rest.crmango.com/api/DeleteTask");
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/DeleteTask"
payload = json.dumps({
{
"task_id": 1234
}
})
headers = {
'Authorization': 'Bearer auth_token',
'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"message": "Task has been deleted"
}
{
"code": "int",
"message": "string"
}