---
title: "Update a comment"
method: PUT
path: "/v1/comments/{commentId}"
tags: ["Comments"]
---

# Update a comment

`PUT /v1/comments/{commentId}`

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

## Path parameters

- `commentId` string, required

## Request body

- UpdateCommentDto
  - `content` string, required — Updated content of the comment
  - `contextUrl` string — Optional URL of the page where the comment was updated, used for deep-linking in notifications
  - `userId` string — User ID of the comment author (required for API key auth, ignored for JWT auth)

## Response `200`

Comment updated successfully

- CommentResponseDto
  - `id` string, required — Unique identifier for the comment
  - `content` string, required — Comment content
  - `author` AuthorResponseDto, required
    - `id` string, required — User ID
    - `name` string, required — User name
    - `email` string, required — User email
    - `image` object, nullable, required — User profile image URL
    - `deactivated` boolean, nullable, required — Whether the user is deactivated
  - `attachments` AttachmentMetadataDto[], required — Attachment metadata (URLs generated on-demand)
    - `id` string, required — Unique identifier for the attachment
    - `name` string, required — Original filename
    - `type` string, required — File type/MIME type
    - `createdAt` string, date-time, required — Upload timestamp
  - `createdAt` string, date-time, required — Comment creation timestamp

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/726b9523fb22/schema)
