Skip to main content
POST
Create a new comment

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
content
string
required

Content of the comment

Maximum string length: 2000
Example:

"This task needs to be completed by end of week"

entityId
string
required

ID of the entity to comment on

Example:

"tsk_abc123def456"

entityType
enum<string>
required

Type of entity being commented on

Available options:
task,
vendor,
risk,
policy,
finding
Example:

"task"

contextUrl
string

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

Maximum string length: 2048
Example:

"https://app.trycomp.ai/org_abc123/vendors/vnd_abc123?taskItemId=tki_abc123#task-items"

attachments
object[]

Optional attachments to include with the comment

userId
string

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

Example:

"usr_abc123def456"

Response

201 - application/json

Comment created successfully

id
string
required

Unique identifier for the comment

Example:

"cmt_abc123def456"

content
string
required

Comment content

Example:

"This task needs to be completed by end of week"

author
object
required

Comment author information

attachments
object[]
required

Attachment metadata (URLs generated on-demand)

createdAt
string<date-time>
required

Comment creation timestamp

Example:

"2024-01-15T10:30:00Z"