curl --request PUT \
--url https://api.trycomp.ai/v1/comments/{commentId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "This task needs to be completed by end of week (updated)"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'This task needs to be completed by end of week (updated)'})
};
fetch('https://api.trycomp.ai/v1/comments/{commentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/comments/{commentId}"
payload = { "content": "This task needs to be completed by end of week (updated)" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, 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"
}Update a comment | Comp AI API
Update a comment in Comp AI. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
curl --request PUT \
--url https://api.trycomp.ai/v1/comments/{commentId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "This task needs to be completed by end of week (updated)"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'This task needs to be completed by end of week (updated)'})
};
fetch('https://api.trycomp.ai/v1/comments/{commentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/comments/{commentId}"
payload = { "content": "This task needs to be completed by end of week (updated)" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, 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
Path Parameters
Unique comment identifier
"cmt_abc123def456"
Body
Updated content of the comment (plain text or serialized Tiptap JSON). Limited to 2000 characters of visible text; maxLength bounds the serialized payload size, not the visible text.
50000"This task needs to be completed by end of week (updated)"
Optional URL of the page where the comment was updated, used for deep-linking in notifications
2048"https://app.trycomp.ai/org_abc123/risk/rsk_abc123?taskItemId=tki_abc123#task-items"
User ID of the comment author (required for API key auth, ignored for JWT auth)
"usr_abc123def456"
Response
Comment updated successfully
Unique identifier for the comment
"cmt_abc123def456"
Comment content
"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
"2024-01-15T10:30:00Z"
Was this page helpful?

