Get task attachments
curl --request GET \
--url https://api.trycomp.ai/v1/tasks/{taskId}/attachments \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/attachments', 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"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "att_abc123def456",
"name": "evidence.pdf",
"type": "application/pdf",
"size": 123456,
"downloadUrl": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=...",
"createdAt": "2024-01-15T10:30:00Z"
}
]{
"message": "Unauthorized"
}{
"message": "Task with ID tsk_abc123def456 not found"
}Tasks
Get task attachments | Comp AI API
Get task attachments in Comp AI. Manage compliance task lifecycle, assignments, review approvals, evidence uploads, policy links, and activity history.
GET
/
v1
/
tasks
/
{taskId}
/
attachments
Get task attachments
curl --request GET \
--url https://api.trycomp.ai/v1/tasks/{taskId}/attachments \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/attachments', 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"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "att_abc123def456",
"name": "evidence.pdf",
"type": "application/pdf",
"size": 123456,
"downloadUrl": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=...",
"createdAt": "2024-01-15T10:30:00Z"
}
]{
"message": "Unauthorized"
}{
"message": "Task with ID tsk_abc123def456 not found"
}Authorizations
API key for authentication
Path Parameters
Unique task identifier
Example:
"tsk_abc123def456"
Response
Attachments retrieved successfully
Unique identifier for the attachment
Example:
"att_abc123def456"
Original filename
Example:
"document.pdf"
File type/MIME type
Example:
"application/pdf"
File size in bytes
Example:
1024000
Signed URL for downloading the file (temporary)
Example:
"https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=..."
Upload timestamp
Example:
"2024-01-15T10:30:00Z"
Was this page helpful?

