Google: Creates a comment on a file 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) — request body — body
Creates a comment on a file. 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).: request body, field body. Complete fields and constraints for contract 2026-10-27.
API reference · Contract 2026-10-27
SDK schema: Creates a comment on a file. 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) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | 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. |
anchor | string | Optional | 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). |
assigneeEmailAddress | string | Optional | Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset. Read only: true |
author | Model | Optional | Expand Gets information about the user, the user’s Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). 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) — response body — user Output only. The author of the comment. The author’s email address and permission ID will not be populated. |
content | string | Required within parent | The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed. |
createdTime | string | Optional | The time at which the comment was created (RFC 3339 date-time). Format: date-time |
deleted | boolean | Optional | Output only. Whether the comment has been deleted. A deleted comment has no content. |
htmlContent | string | Optional | Output only. The content of the comment with HTML formatting. |
id | string | Optional | Output only. The ID of the comment. |
kind | string | Optional | Output only. Identifies what kind of resource this is. Value: the fixed string `“drive#comment”`. Default: drive#comment |
mentionedEmailAddresses | array | Optional | Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty. Read only: true |
mentionedEmailAddresses[] | string | Each item | |
modifiedTime | string | Optional | The last time the comment or any of its replies was modified (RFC 3339 date-time). Format: date-time |
quotedFileContent | object | Optional | 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. |
quotedFileContent.mimeType | string | Optional | The MIME type of the quoted content. |
quotedFileContent.value | string | Optional | The quoted content itself. This is interpreted as plain text if set through the API. |
replies | array | Optional | Output only. The full list of replies to the comment in chronological order. |
replies[] | Model | Each item | Expand Gets a reply by ID For more information, see Manage comments and replies (https: developers google com workspace drive api guides manage-comments) — response body |
resolved | boolean | Optional | Output only. Whether the comment has been resolved by one of its replies. |
Referenced models: Gets a reply by ID For more information, see Manage comments and replies (https: developers google com workspace drive api guides manage-comments) — response body, Gets information about the user, the user’s Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). 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) — response body — user