Google: Drive comments schemas
3 Google schemas with complete fields and constraints.
← Drive comments operations · All schemas
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
Gets a comment by ID. 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) — response 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 | Optional | 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
Lists a file's comments. 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) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A list of comments on a file. |
comments | array | Optional | The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. |
comments[] | Model | Each item | Expand Gets a comment by ID. 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) — response body |
kind | string | Optional | Identifies what kind of resource this is. Value: the fixed string `"drive#commentList"`. Default: drive#commentList |
nextPageToken | string | Optional | The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ. |