---
title: "Updates the comment with the specified id on the project with the specified id."
method: PUT
path: "/projects/{projectId}/comments/{commentId}"
tags: ["projectComments"]
---

# Updates the comment with the specified id on the project with the specified id.

`PUT /projects/{projectId}/comments/{commentId}`

<Check title="Required Permissions" icon="key">To update a comment the user must either have at least `read` permissions on the specified project, be the creator of the comment or be admin.</Check>

## Path parameters

- `projectId` string, uuid, required
- `commentId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- CommentPutForm
  - `message` string, required — The message of the comment.
  - `userId` string, uuid, nullable — The id of the user who created the comment. Optional. If not set, defaults to the current user.
  - `previews` string[], nullable — The preview URLs to show a preview for.
  - `isHiddenForConnectUsers` boolean, nullable — (optional) Whether the comment is hidden for connect users. Providing a null value will not change the current state. By default, comments are not hidden for connect users.
  - `isResolved` boolean, nullable — Whether the comment has been resolved. Only available for comments on documents.

## Response `200`

OK

- Comment — The comment model.
  - `id` string, uuid — The id of the comment.
  - `entityId` string, uuid — The id of the entity of the comment. Required.
  - `entityType` string, nullable — The type of the entity of the comment. Can be "projects", "tasks". Required.
  - `entity` IDefaultNameModel
    - `id` string, uuid — The id of the entity.
    - `name` string, nullable — The name of the entity.
  - `project` IDefaultNameModel
    - `id` string, uuid — The id of the entity.
    - `name` string, nullable — The name of the entity.
  - `task` IDefaultNameModel
    - `id` string, uuid — The id of the entity.
    - `name` string, nullable — The name of the entity.
  - `document` IDefaultNameModel
    - `id` string, uuid — The id of the entity.
    - `name` string, nullable — The name of the entity.
  - `createdOn` string, date-time — The date this object was created.
  - `createdBy` string, uuid — The id of the user who created this object.
  - `user` ConnectedUserModel
    - `id` string, uuid — Gets or sets the id of the nested model.
    - `firstName` string, nullable — The first name of the user.
    - `lastName` string, nullable — The last name of the user.
    - `hasImage` boolean, nullable — Whether this user has a profile image.
    - `isExternal` boolean — True if the model is coming from an external workspace (awork Connect). False otherwise.
  - `agentId` string, uuid, nullable — The agent that visibly authored this comment, when it was created by an agent run.
  - `agentNameSnapshot` string, nullable — The agent name captured when the comment was created.
  - `updatedOn` string, date-time — The date this object was last modified.
  - `updatedBy` string, uuid — The id of the user who last modified this object.
  - `mentions` Mentions — A mention is the tag of a user on a specific comment, so the user is notified.
    - `users` ConnectedUserModel[], nullable — All users which have been mentioned in the comment.
      - `id` string, uuid — Gets or sets the id of the nested model.
      - `firstName` string, nullable — The first name of the user.
      - `lastName` string, nullable — The last name of the user.
      - `hasImage` boolean, nullable — Whether this user has a profile image.
      - `isExternal` boolean — True if the model is coming from an external workspace (awork Connect). False otherwise.
    - `agentIds` string[], nullable — Stable ids of agents mentioned directly in the comment.
    - `everyUserHadPermissions` boolean — If every user was able to receive the mention notification. If not, one of the users had no permissions to.
  - `reactions` Reaction[], nullable — The reactions on a comment.
    - `userId` string, uuid — All users ids that reacted with the emoji.
    - `emoji` string, nullable — The emoji used as a reaction.
  - `formattedMessage` string, nullable — The formatted and proccessed version of the comment message. E.g. mentions are in a human readable format. The formatted comment message is styled with html.
  - `plainFormattedMessage` string, nullable — The formatted and proccessed version of the comment message. E.g. mentions are in a human readable format. The formatted comment message is not styled.
  - `resourceVersion` integer — The version of the entity, updated on every modification, to the ticks in UTC. Not identical to UpdatedOn.
  - `message` string, nullable — The message of the comment.
  - `userId` string, uuid, nullable — The id of the user who created the comment. Optional. If not set, defaults to the current user.
  - `previews` string[], nullable — The preview URLs to show a preview for.
  - `isHiddenForConnectUsers` boolean — True if the comment should be hidden to connect users.
  - `isResolved` boolean, nullable — Whether the comment has been resolved. Only available for comments on documents.
  - `inReplyToCommentId` string, uuid, nullable — The parent comment this comment is a reply to.

## Other responses

- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
