Method: approvals.start

Starts an Approval on a file.

HTTP request

POST https://www.googleapis.com/drive/v3/files/{fileId}/approvals:start

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
fileId

string

Required. The ID of the file the Approval will be created on.

Request body

The request body contains data with the following structure:

JSON representation
{
  "reviewerEmails": [
    string
  ],
  "dueTime": string,
  "lockFile": boolean,
  "message": string
}
Fields
reviewerEmails[]

string

Required. The emails of the users who are set to review the approval.

dueTime

string (Timestamp format)

Optional. The time that the Approval is due.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

lockFile

boolean

Optional. Whether to lock the file when starting the Approval.

message

string

Optional. A message to send to reviewers when notifying them of the Approval request.

Response body

If successful, the response body contains an instance of Approval.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

Some scopes are restricted and require a security assessment for your app to use them. For more information, see the Authorization guide.