PUT
/
v1
/
comments
/
{commentId}
Update a comment
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)"
}'
{
  "id": "cmt_abc123def456",
  "content": "This task needs to be completed by end of week",
  "author": {
    "id": "usr_abc123def456",
    "name": "John Doe",
    "email": "[email protected]"
  },
  "attachments": [
    {
      "id": "att_abc123def456",
      "name": "document.pdf",
      "type": "application/pdf",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "createdAt": "2024-01-15T10:30:00Z"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

Path Parameters

commentId
string
required

Unique comment identifier

Example:

"cmt_abc123def456"

Body

application/json
content
string
required

Updated content of the comment

Maximum length: 2000
Example:

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

Response

200 - application/json

Comment updated 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"