---
title: "PATCH /files/{fileId}/comments/{commentId}"
method: PATCH
path: "/files/{fileId}/comments/{commentId}"
tags: ["comments"]
---

# PATCH /files/{fileId}/comments/{commentId}

`PATCH /files/{fileId}/comments/{commentId}`

Updates a comment with patch semantics. For more information, see [Manage comments and replies](https://developers.google.com/workspace/drive/api/guides/manage-comments). Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/workspace/drive/api/guides/fields-parameter).

## Path parameters

- `fileId` string, required
- `commentId` string, required

## Request body

- Comment — A comment on a file. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.
  - `htmlContent` string — Output only. The content of the comment with HTML formatting.
  - `replies` Reply[] — Output only. The full list of replies to the comment in chronological order.
    - `content` string — The plain text content of the reply. This field is used for setting the content, while `htmlContent` should be displayed. This field is required by the `create` method if no `action` value is specified.
    - `mentionedEmailAddresses` string[] — Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty.
    - `deleted` boolean — Output only. Whether the reply has been deleted. A deleted reply has no content.
    - `assigneeEmailAddress` string — Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset.
    - `action` string — The action the reply performed to the parent comment. The supported values are: * `resolve` * `reopen`
    - `createdTime` string, date-time — The time at which the reply was created (RFC 3339 date-time).
    - `kind` string — Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#reply"`.
    - `htmlContent` string — Output only. The content of the reply with HTML formatting.
    - `id` string — Output only. The ID of the reply.
    - `author` User — Information about a Drive user.
      - `emailAddress` string — Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
      - `displayName` string — Output only. A plain text displayable name for this user.
      - `photoLink` string — Output only. A link to the user's profile photo, if available.
      - `me` boolean — Output only. Whether this user is the requesting user.
      - `kind` string — Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
      - `permissionId` string — Output only. The user's ID as visible in Permission resources.
    - `modifiedTime` string, date-time — The last time the reply was modified (RFC 3339 date-time).
  - `assigneeEmailAddress` string — Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset.
  - `mentionedEmailAddresses` string[] — Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty.
  - `quotedFileContent` object — The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
    - `mimeType` string — The MIME type of the quoted content.
    - `value` string — The quoted content itself. This is interpreted as plain text if set through the API.
  - `id` string — Output only. The ID of the comment.
  - `author` User — Information about a Drive user.
    - `emailAddress` string — Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
    - `displayName` string — Output only. A plain text displayable name for this user.
    - `photoLink` string — Output only. A link to the user's profile photo, if available.
    - `me` boolean — Output only. Whether this user is the requesting user.
    - `kind` string — Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
    - `permissionId` string — Output only. The user's ID as visible in Permission resources.
  - `modifiedTime` string, date-time — The last time the comment or any of its replies was modified (RFC 3339 date-time).
  - `anchor` string — A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/workspace/drive/api/v3/manage-comments).
  - `deleted` boolean — Output only. Whether the comment has been deleted. A deleted comment has no content.
  - `content` string — The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed.
  - `createdTime` string, date-time — The time at which the comment was created (RFC 3339 date-time).
  - `resolved` boolean — Output only. Whether the comment has been resolved by one of its replies.
  - `kind` string — Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#comment"`.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/drive.md) · [All operations](https://skmtc.dev/google/apis/drive/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/drive/revisions/f3444ff3fae2/schema)
