Comments
Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Get comments for an entity
/v1/commentsGet comments for an entity in Complianz. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Query parameters
entityIdstringrequiredID of the entity to get comments for
entityTypeenumrequiredType of entity
Responses
200Comments retrieved successfully
idstringrequiredUnique identifier for the comment
contentstringrequiredComment content
authorobjectrequiredComment author information
attachmentsobject[]requiredAttachment metadata (URLs generated on-demand)
Show child attributes
idstringrequiredUnique identifier for the attachment
namestringrequiredOriginal filename
typestringrequiredFile type/MIME type
createdAtstringrequiredUpload timestamp
createdAtstringrequiredComment creation timestamp
[
{
"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"
}
]curl --request GET \
--url https://api.complianz.ai/v1/comments?entityId=<entityId>&entityType=<entityType> \
--header 'X-API-Key: <api-key>'Create a new comment
/v1/commentsCreate a new comment in Complianz. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Request body
contentstringrequiredContent 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.
entityIdstringrequiredID of the entity to comment on
entityTypeenumrequiredType of entity being commented on
One of: task vendor risk policy finding
contextUrlstringOptional URL of the page where the comment was created, used for deep-linking in notifications
attachmentsobject[]Optional attachments to include with the comment
Show child attributes
fileNamestringrequiredName of the file
fileTypestringrequiredMIME type of the file
fileDatastringBase64-encoded file contents. For the web UI / direct callers. AI/MCP clients should instead upload via /v1/uploads/presign (purpose=attachment) and pass `s3Key` — base64 through an LLM is impractically slow and times out. Provide exactly one of fileData or s3Key.
s3KeystringKey of a file already uploaded via /v1/uploads/presign (purpose=attachment). The server fetches the bytes from storage — no base64 needed. Provide exactly one of fileData or s3Key.
descriptionstringDescription of the attachment
userIdstringUser ID of the user uploading the attachment (required for API key auth, ignored for JWT auth)
userIdstringUser ID of the comment author (required for API key auth, ignored for JWT auth)
Responses
201Comment created successfully
idstringrequiredUnique identifier for the comment
contentstringrequiredComment content
authorobjectrequiredComment author information
attachmentsobject[]requiredAttachment metadata (URLs generated on-demand)
Show child attributes
idstringrequiredUnique identifier for the attachment
namestringrequiredOriginal filename
typestringrequiredFile type/MIME type
createdAtstringrequiredUpload timestamp
createdAtstringrequiredComment creation timestamp
{
"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"
}curl --request POST \
--url https://api.complianz.ai/v1/comments \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"content": "This task needs to be completed by end of week",
"entityId": "tsk_abc123def456",
"entityType": "task",
"contextUrl": "https://app.complianz.ai/org_abc123/vendors/vnd_abc123?taskItemId=tki_abc123#task-items",
"attachments": [
{
"fileName": "document.pdf",
"fileType": "application/pdf",
"fileData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
"s3Key": "org_abc123/uploads/attachment/1700000000000-rbac-matrix.xlsx",
"description": "Meeting notes from Q4 planning session",
"userId": "usr_abc123def456"
}
],
"userId": "usr_abc123def456"
}'Update a comment
/v1/comments/{commentId}Update a comment in Complianz. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Path parameters
commentIdstringrequiredUnique comment identifier
Request body
contentstringrequiredUpdated 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.
contextUrlstringOptional URL of the page where the comment was updated, used for deep-linking in notifications
userIdstringUser ID of the comment author (required for API key auth, ignored for JWT auth)
Responses
200Comment updated successfully
idstringrequiredUnique identifier for the comment
contentstringrequiredComment content
authorobjectrequiredComment author information
attachmentsobject[]requiredAttachment metadata (URLs generated on-demand)
Show child attributes
idstringrequiredUnique identifier for the attachment
namestringrequiredOriginal filename
typestringrequiredFile type/MIME type
createdAtstringrequiredUpload timestamp
createdAtstringrequiredComment creation timestamp
{
"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"
}curl --request PUT \
--url https://api.complianz.ai/v1/comments/<commentId> \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"content": "This task needs to be completed by end of week (updated)",
"contextUrl": "https://app.complianz.ai/org_abc123/risk/rsk_abc123?taskItemId=tki_abc123#task-items",
"userId": "usr_abc123def456"
}'Delete a comment
/v1/comments/{commentId}Delete a comment in Complianz. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Path parameters
commentIdstringrequiredUnique comment identifier
Request body
userIdstringUser ID of the comment author (required for API key auth, ignored for JWT auth)
Responses
200Comment deleted successfully
successbooleandeletedCommentIdstringmessagestring{
"success": true,
"deletedCommentId": "cmt_abc123def456",
"message": "Comment deleted successfully"
}401Unauthorized - Invalid authentication
messagestring{
"message": "Unauthorized"
}404Comment not found
messagestring{
"message": "Comment with ID cmt_abc123def456 not found"
}curl --request DELETE \
--url https://api.complianz.ai/v1/comments/<commentId> \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"userId": "usr_abc123def456"
}'