Tasks
Create and manage compliance tasks across frameworks.
List tasks
Returns the total number of tasks for a given framework within your company.
| Name | In | Type | Description |
|---|---|---|---|
framework |
path | integer | Enter framework's ID |
Tip
The Framework ID is located in the Frameworks Manager. You can access it via the Manage icon inside the header's framework selector in the TrustView app.
Create a task
Creates a new task under the specified framework.
| Name | In | Type | Description |
|---|---|---|---|
framework |
path | integer | Enter framework's ID |
Tip
The Framework ID is located in the Frameworks Manager. You can access it via the Manage icon inside the header's framework selector in the TrustView app.
curl -X POST https://nightly.api.trustview.eu/external/task/framework/1/new \
-H "X-API-Key: tvw_sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Review data retention policy",
"description": "Annual review of retention schedules",
"priority": 3,
"labels": [],
"startDate": "2026-06-01",
"dueDate": "2026-06-30",
"departmentId": 1,
"gaps": []
}'
const res = await fetch(
"https://nightly.api.trustview.eu/external/task/framework/1/new",
{
method: "POST",
headers: {
"X-API-Key": "tvw_sk_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Review data retention policy",
description: "Annual review of retention schedules",
priority: 3,
labels: [],
startDate: "2026-06-01",
dueDate: "2026-06-30",
departmentId: 1,
gaps: [],
}),
}
);
const task = await res.json();
$ch = curl_init('https://nightly.api.trustview.eu/external/task/framework/1/new');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: tvw_sk_live_your_key_here',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'title' => 'Review data retention policy',
'description' => 'Annual review of retention schedules',
'priority' => 3,
'labels' => [],
'startDate' => '2026-06-01',
'dueDate' => '2026-06-30',
'departmentId' => 1,
'gaps' => [],
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch));
curl_close($ch);
import requests
response = requests.post(
"https://nightly.api.trustview.eu/external/task/framework/1/new",
headers={"X-API-Key": "tvw_sk_live_your_key_here"},
json={
"title": "Review data retention policy",
"description": "Annual review of retention schedules",
"priority": 3,
"labels": [],
"startDate": "2026-06-01",
"dueDate": "2026-06-30",
"departmentId": 1,
"gaps": [],
},
)
task = response.json()
Response
Returns the created task object.
Get a task
Retrieves a single task by its unique ID.
| Name | In | Type | Description |
|---|---|---|---|
taskUniqueId |
path | string | Enter task's unique ID |
Tip
The task's unique ID can be found in the address bar when viewing a task.
Update a task
Updates an existing task. Send only the fields you want to change.
| Name | In | Type | Description |
|---|---|---|---|
taskUniqueId |
path | string | Enter task's unique ID |
Tip
The task's unique ID can be found in the address bar when viewing a task.
const res = await fetch(
"https://nightly.api.trustview.eu/external/task/6a054b8b9ae1a/edit",
{
method: "PATCH",
headers: {
"X-API-Key": "tvw_sk_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ title: "Review data retention policy (Q2)" }),
}
);
const task = await res.json();
$ch = curl_init('https://nightly.api.trustview.eu/external/task/6a054b8b9ae1a/edit');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: tvw_sk_live_your_key_here',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['title' => 'Review data retention policy (Q2)']));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch));
curl_close($ch);
Delete a task
Removes a task.
| Name | In | Type | Description |
|---|---|---|---|
taskUniqueId |
path | string | Enter task's unique ID |
Tip
The task's unique ID can be found in the address bar when viewing a task.
Response
Returns 204 No Content on success.