# REST Resource: comments

- [Resource: Comment](https://developers.google.com/workspace/drive/api/reference/rest/v2/comments#Comment)
  - [JSON representation](https://developers.google.com/workspace/drive/api/reference/rest/v2/comments#Comment.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/drive/api/reference/rest/v2/comments#METHODS_SUMMARY)

## Resource: Comment

A comment on a file in Google Drive.

| JSON representation |
|---|
| ``` { "commentId": string, "kind": string, "createdDate": string, "modifiedDate": string, "fileId": string, "fileTitle": string, "status": string, "anchor": string, "replies": [ { object (`https://developers.google.com/workspace/drive/api/reference/rest/v2/replies#CommentReply`) } ], "author": { object (`https://developers.google.com/workspace/drive/api/reference/rest/v2/User`) }, "deleted": boolean, "selfLink": string, "htmlContent": string, "content": string, "context": { "type": string, "value": string } } ``` |

| Fields ||
|---|---|
| `commentId` | `string` The ID of the comment. |
| `kind` | `string` This is always drive#comment. |
| `createdDate` | `string` The date when this comment was first created. |
| `modifiedDate` | `string` The date when this comment or any of its replies were last modified. |
| `fileId` | `string` The file which this comment is addressing. |
| `fileTitle` | `string` The title of the file which this comment is addressing. |
| `status` | `string` The status of this comment. Status can be changed by posting a reply to a comment with the desired status. Possible values are: - `open` - The comment is still open. - `resolved` - The comment has been resolved by one of its replies. |
| `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). |
| `replies[]` | ``object (`https://developers.google.com/workspace/drive/api/reference/rest/v2/replies#CommentReply`)`` Replies to this post. |
| `author` | ``object (`https://developers.google.com/workspace/drive/api/reference/rest/v2/User`)`` The user who wrote this comment. |
| `deleted` | `boolean` Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. |
| `selfLink` | `string` A link back to this comment. |
| `htmlContent` | `string` HTML formatted content for this comment. |
| `content` | `string` The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. |
| `context` | `object` The context of the file which is being commented on. |
| `context.type` | `string` The MIME type of the context snippet. |
| `context.value` | `string` Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/drive/api/reference/rest/v2/comments/delete` | Deletes a comment. |
| ### `https://developers.google.com/workspace/drive/api/reference/rest/v2/comments/get` | Gets a comment by ID. |
| ### `https://developers.google.com/workspace/drive/api/reference/rest/v2/comments/insert` | Creates a new comment on the given file. |
| ### `https://developers.google.com/workspace/drive/api/reference/rest/v2/comments/list` | Lists a file's comments. |
| ### `https://developers.google.com/workspace/drive/api/reference/rest/v2/comments/patch` | Updates an existing comment. |
| ### `https://developers.google.com/workspace/drive/api/reference/rest/v2/comments/update` | Updates an existing comment. |