Skip to content

Update a comment

PUT
/v1/comments/{commentId}
curl --request PUT \
--url https://api.varman.io/v1/comments/cmt_abc123def456 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "content": "This task needs to be completed by end of week (updated)", "contextUrl": "https://app.example.com/org_abc123/risk/rsk_abc123?taskItemId=tki_abc123#task-items", "userId": "usr_abc123def456" }'

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

commentId
required
string

Example

cmt_abc123def456

Unique comment identifier

Media typeapplication/json
object
content
required

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.

string
<= 50000 characters

Example

This task needs to be completed by end of week (updated)
contextUrl

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

string
<= 2048 characters

Example

https://app.example.com/org_abc123/risk/rsk_abc123?taskItemId=tki_abc123#task-items
userId

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

string

Example

usr_abc123def456

Comment updated successfully

Media typeapplication/json
object
id
required

Unique identifier for the comment

string
content
required

Comment content

string
author
required

Comment author information

object
id
required

User ID

string
name
required

User name

string
email
required

User email

string
image
required

User profile image URL

object
deactivated
required

Whether the user is deactivated

boolean
nullable
attachments
required

Attachment metadata (URLs generated on-demand)

Array<object>
object
id
required

Unique identifier for the attachment

string
name
required

Original filename

string
type
required

File type/MIME type

string
createdAt
required

Upload timestamp

string format: date-time
createdAt
required

Comment creation timestamp

string format: date-time

Example

{
"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"
}