curl --request PATCH \
--url https://api.trycomp.ai/v1/tasks/{taskId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Review access controls",
"description": "Review and update access control policies",
"status": "in_progress",
"assigneeId": "mem_abc123",
"approverId": "mem_abc123",
"frequency": "monthly",
"integrationScheduleFrequency": "daily",
"department": "it",
"reviewDate": "2025-01-01T00:00:00.000Z",
"notRelevantJustification": "This control is out of scope for our SOC 2 audit."
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Review access controls',
description: 'Review and update access control policies',
status: 'in_progress',
assigneeId: 'mem_abc123',
approverId: 'mem_abc123',
frequency: 'monthly',
integrationScheduleFrequency: 'daily',
department: 'it',
reviewDate: '2025-01-01T00:00:00.000Z',
notRelevantJustification: 'This control is out of scope for our SOC 2 audit.'
})
};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks/{taskId}"
payload = {
"title": "Review access controls",
"description": "Review and update access control policies",
"status": "in_progress",
"assigneeId": "mem_abc123",
"approverId": "mem_abc123",
"frequency": "monthly",
"integrationScheduleFrequency": "daily",
"department": "it",
"reviewDate": "2025-01-01T00:00:00.000Z",
"notRelevantJustification": "This control is out of scope for our SOC 2 audit."
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "tsk_abc123def456",
"title": "Implement user authentication",
"status": "in_progress",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"integrationScheduleFrequency": "daily",
"description": "Add OAuth 2.0 authentication to the platform",
"taskTemplateId": "frk_tt_68406e353df3bc002994acef",
"integrationLastRunAt": {}
}Update a task | Comp AI API
Update a task in Comp AI. Manage compliance task lifecycle, assignments, review approvals, evidence uploads, policy links, and activity history.
curl --request PATCH \
--url https://api.trycomp.ai/v1/tasks/{taskId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Review access controls",
"description": "Review and update access control policies",
"status": "in_progress",
"assigneeId": "mem_abc123",
"approverId": "mem_abc123",
"frequency": "monthly",
"integrationScheduleFrequency": "daily",
"department": "it",
"reviewDate": "2025-01-01T00:00:00.000Z",
"notRelevantJustification": "This control is out of scope for our SOC 2 audit."
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Review access controls',
description: 'Review and update access control policies',
status: 'in_progress',
assigneeId: 'mem_abc123',
approverId: 'mem_abc123',
frequency: 'monthly',
integrationScheduleFrequency: 'daily',
department: 'it',
reviewDate: '2025-01-01T00:00:00.000Z',
notRelevantJustification: 'This control is out of scope for our SOC 2 audit.'
})
};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks/{taskId}"
payload = {
"title": "Review access controls",
"description": "Review and update access control policies",
"status": "in_progress",
"assigneeId": "mem_abc123",
"approverId": "mem_abc123",
"frequency": "monthly",
"integrationScheduleFrequency": "daily",
"department": "it",
"reviewDate": "2025-01-01T00:00:00.000Z",
"notRelevantJustification": "This control is out of scope for our SOC 2 audit."
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "tsk_abc123def456",
"title": "Implement user authentication",
"status": "in_progress",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"integrationScheduleFrequency": "daily",
"description": "Add OAuth 2.0 authentication to the platform",
"taskTemplateId": "frk_tt_68406e353df3bc002994acef",
"integrationLastRunAt": {}
}Authorizations
API key for authentication
Path Parameters
Unique task identifier
"tsk_abc123def456"
Body
Task title
"Review access controls"
Task description
"Review and update access control policies"
todo, in_progress, in_review, done, not_relevant, failed "in_progress"
Assignee member ID, or null to unassign
"mem_abc123"
Approver member ID, or null to unassign
"mem_abc123"
daily, weekly, monthly, quarterly, yearly "monthly"
Cadence for running the integration check attached to this task
daily, weekly, monthly, quarterly, yearly "daily"
Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
64"it"
"2025-01-01T00:00:00.000Z"
Required justification when marking evidence tasks as not_relevant
"This control is out of scope for our SOC 2 audit."
Response
Task updated successfully
Unique identifier for the task
"tsk_abc123def456"
Task title
"Implement user authentication"
Task status
todo, in_progress, done, blocked "in_progress"
Task creation timestamp
"2024-01-15T10:30:00Z"
Task last update timestamp
"2024-01-15T10:30:00Z"
Cadence for running the integration check attached to this task
daily, weekly, monthly, quarterly, yearly "daily"
Task description
"Add OAuth 2.0 authentication to the platform"
Task template ID
"frk_tt_68406e353df3bc002994acef"
Last successful integration check run timestamp
Was this page helpful?

