Comments

Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.

Get comments for an entity

GET/v1/comments

Get comments for an entity in Complianz. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.

Query parameters

entityIdstringrequired

ID of the entity to get comments for

entityTypeenumrequired

Type of entity

Responses

200Comments retrieved successfully
idstringrequired

Unique identifier for the comment

contentstringrequired

Comment content

authorobjectrequired

Comment author information

attachmentsobject[]required

Attachment metadata (URLs generated on-demand)

Show child attributes
idstringrequired

Unique identifier for the attachment

namestringrequired

Original filename

typestringrequired

File type/MIME type

createdAtstringrequired

Upload timestamp

createdAtstringrequired

Comment 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

POST/v1/comments

Create a new comment in Complianz. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.

Request body

contentstringrequired

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.

entityIdstringrequired

ID of the entity to comment on

entityTypeenumrequired

Type of entity being commented on

One of: task vendor risk policy finding

contextUrlstring

Optional 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
fileNamestringrequired

Name of the file

fileTypestringrequired

MIME type of the file

fileDatastring

Base64-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.

s3Keystring

Key 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.

descriptionstring

Description of the attachment

userIdstring

User ID of the user uploading the attachment (required for API key auth, ignored for JWT auth)

userIdstring

User ID of the comment author (required for API key auth, ignored for JWT auth)

Responses

201Comment created successfully
idstringrequired

Unique identifier for the comment

contentstringrequired

Comment content

authorobjectrequired

Comment author information

attachmentsobject[]required

Attachment metadata (URLs generated on-demand)

Show child attributes
idstringrequired

Unique identifier for the attachment

namestringrequired

Original filename

typestringrequired

File type/MIME type

createdAtstringrequired

Upload timestamp

createdAtstringrequired

Comment 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

PUT/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

commentIdstringrequired

Unique comment identifier

Request body

contentstringrequired

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.

contextUrlstring

Optional URL of the page where the comment was updated, used for deep-linking in notifications

userIdstring

User ID of the comment author (required for API key auth, ignored for JWT auth)

Responses

200Comment updated successfully
idstringrequired

Unique identifier for the comment

contentstringrequired

Comment content

authorobjectrequired

Comment author information

attachmentsobject[]required

Attachment metadata (URLs generated on-demand)

Show child attributes
idstringrequired

Unique identifier for the attachment

namestringrequired

Original filename

typestringrequired

File type/MIME type

createdAtstringrequired

Upload timestamp

createdAtstringrequired

Comment 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

DELETE/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

commentIdstringrequired

Unique comment identifier

Request body

userIdstring

User ID of the comment author (required for API key auth, ignored for JWT auth)

Responses

200Comment deleted successfully
successboolean
deletedCommentIdstring
messagestring
{
  "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"
  }'