The Google Forms API is currently in Restricted Beta. To use the API, apply for access at the Early Adopter Program page.

Method: forms.watches.create

Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is created (see Watch.expire_time).

HTTP request

POST https://forms.googleapis.com/v1alpha/forms/{formId}/watches

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
formId

string

Required. ID of the Form to watch.

Request body

The request body contains data with the following structure:

JSON representation
{
  "watch": {
    object (Watch)
  },
  "watchId": string
}
Fields
watch

object (Watch)

Required. The watch object. No ID should be set on this object; use watchId instead.

watchId

string

The ID to use for the watch. If specified, the ID must not already be in use. If not specified, an ID is generated. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Response body

If successful, the response body contains a newly created instance of Watch.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/forms.body
  • https://www.googleapis.com/auth/forms.body.readonly
  • https://www.googleapis.com/auth/forms.responses.readonly

For more information, see the OAuth 2.0 Overview.