Get comments for an entity
curl --request GET \
--url https://api.trycomp.ai/v1/comments \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/comments"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "cmt_abc123def456",
"content": "This task needs to be completed by end of week",
"author": {
"id": "usr_abc123def456",
"name": "John Doe",
"email": "john.doe@company.com",
"image": "https://example.com/avatar.jpg",
"deactivated": false
},
"attachments": [
{
"id": "att_abc123def456",
"name": "document.pdf",
"type": "application/pdf",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-15T10:30:00Z"
}
]Comments
Get comments for an entity | Comp AI API
Get comments for an entity in Comp AI. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
GET
/
v1
/
comments
Get comments for an entity
curl --request GET \
--url https://api.trycomp.ai/v1/comments \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/comments"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "cmt_abc123def456",
"content": "This task needs to be completed by end of week",
"author": {
"id": "usr_abc123def456",
"name": "John Doe",
"email": "john.doe@company.com",
"image": "https://example.com/avatar.jpg",
"deactivated": false
},
"attachments": [
{
"id": "att_abc123def456",
"name": "document.pdf",
"type": "application/pdf",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-15T10:30:00Z"
}
]Authorizations
API key for authentication
Query Parameters
ID of the entity to get comments for
Example:
"tsk_abc123def456"
Type of entity
Available options:
task, vendor, risk, policy, finding Response
200 - application/json
Comments retrieved successfully
Unique identifier for the comment
Example:
"cmt_abc123def456"
Comment content
Example:
"This task needs to be completed by end of week"
Comment author information
Show child attributes
Show child attributes
Attachment metadata (URLs generated on-demand)
Show child attributes
Show child attributes
Comment creation timestamp
Example:
"2024-01-15T10:30:00Z"
Was this page helpful?

