Delete task attachment
curl --request DELETE \
--url https://api.trycomp.ai/v1/tasks/{taskId}/attachments/{attachmentId} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/attachments/{attachmentId}', 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}/attachments/{attachmentId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"success": true,
"deletedAttachmentId": "att_abc123def456",
"message": "Attachment deleted successfully"
}{
"message": "Unauthorized"
}{
"message": "Task or attachment not found"
}Tasks
Delete task attachment | Comp AI API
Delete task attachment in Comp AI. Manage compliance task lifecycle, assignments, review approvals, evidence uploads, policy links, and activity history.
DELETE
/
v1
/
tasks
/
{taskId}
/
attachments
/
{attachmentId}
Delete task attachment
curl --request DELETE \
--url https://api.trycomp.ai/v1/tasks/{taskId}/attachments/{attachmentId} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/attachments/{attachmentId}', 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}/attachments/{attachmentId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"success": true,
"deletedAttachmentId": "att_abc123def456",
"message": "Attachment deleted successfully"
}{
"message": "Unauthorized"
}{
"message": "Task or attachment not found"
}Authorizations
API key for authentication
Path Parameters
Unique task identifier
Example:
"tsk_abc123def456"
Unique attachment identifier
Example:
"att_abc123def456"
Was this page helpful?

