curl --request POST \
--url https://api.trycomp.ai/v1/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Implement access controls",
"description": "Set up role-based access controls for the platform"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Implement access controls',
description: 'Set up role-based access controls for the platform'
})
};
fetch('https://api.trycomp.ai/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks"
payload = {
"title": "Implement access controls",
"description": "Set up role-based access controls for the platform"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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": {}
}Create compliance task | Comp AI API
Create a compliance task for evidence collection, remediation, review, or recurring control work inside an organization.
curl --request POST \
--url https://api.trycomp.ai/v1/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Implement access controls",
"description": "Set up role-based access controls for the platform"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Implement access controls',
description: 'Set up role-based access controls for the platform'
})
};
fetch('https://api.trycomp.ai/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks"
payload = {
"title": "Implement access controls",
"description": "Set up role-based access controls for the platform"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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
Body
"Implement access controls"
"Set up role-based access controls for the platform"
"mem_abc123"
daily, weekly, monthly, quarterly, yearly "monthly"
Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
64"it"
["ctrl_abc123"]
"tmpl_abc123"
Vendor ID to connect this task to
"vnd_abc123"
Response
Task created 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?

