Method: forms.setPublishSettings

Updates the publish settings of a form.

Legacy forms aren't supported because they don't have the publishSettings field.

HTTP request

POST https://forms.googleapis.com/v1/forms/{formId}:setPublishSettings

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
formId

string

Required. The ID of the form. You can get the id from Form.form_id field.

Request body

The request body contains data with the following structure:

JSON representation
{
  "publishSettings": {
    object (PublishSettings)
  },
  "updateMask": string
}
Fields
publishSettings

object (PublishSettings)

Required. The desired publish settings to apply to the form.

updateMask

string (FieldMask format)

Optional. The publishSettings fields to update. This field mask accepts the following values:

  • publishState: Updates or replaces all publishState settings.
  • "*": Updates or replaces all publishSettings fields.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Response body

The response of a forms.setPublishSettings request.

If successful, the response body contains data with the following structure:

JSON representation
{
  "formId": string,
  "publishSettings": {
    object (PublishSettings)
  }
}
Fields
formId

string

Required. The ID of the Form. This is same as the Form.form_id field.

publishSettings

object (PublishSettings)

The publish settings of the form.

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/forms.body

For more information, see the Authorization guide.