Comments: create

Creates a new comment on a file. Try it now.

Request

HTTP request

POST https://www.googleapis.com/drive/v3/files/fileId/comments

Parameters

Parameter name Value Description
Path parameters
fileId string The ID of the file.

Request body

In the request body, supply a Comments resource with the following properties:

Property name Value Description Notes
Required Properties
content string The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed. writable
Optional Properties
anchor string A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. writable
quotedFileContent.value string The quoted content itself. This is interpreted as plain text if set through the API. writable

Response

If successful, this method returns a Comments resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Drive REST API
Drive REST API
Need help? Visit our support page.