# REST Resource: forms

- [Resource: Form](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Form)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Form.SCHEMA_REPRESENTATION)
- [Info](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Info)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Info.SCHEMA_REPRESENTATION)
- [FormSettings](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FormSettings)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FormSettings.SCHEMA_REPRESENTATION)
- [QuizSettings](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuizSettings)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuizSettings.SCHEMA_REPRESENTATION)
- [EmailCollectionType](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#EmailCollectionType)
- [Item](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Item)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Item.SCHEMA_REPRESENTATION)
- [QuestionItem](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionItem)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionItem.SCHEMA_REPRESENTATION)
- [Question](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Question)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Question.SCHEMA_REPRESENTATION)
- [ChoiceQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceQuestion.SCHEMA_REPRESENTATION)
- [ChoiceType](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceType)
- [Option](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Option)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Option.SCHEMA_REPRESENTATION)
- [GoToAction](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#GoToAction)
- [Image](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image.SCHEMA_REPRESENTATION)
- [MediaProperties](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#MediaProperties)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#MediaProperties.SCHEMA_REPRESENTATION)
- [Alignment](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Alignment)
- [TextQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextQuestion.SCHEMA_REPRESENTATION)
- [ScaleQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ScaleQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ScaleQuestion.SCHEMA_REPRESENTATION)
- [DateQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#DateQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#DateQuestion.SCHEMA_REPRESENTATION)
- [TimeQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TimeQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TimeQuestion.SCHEMA_REPRESENTATION)
- [FileUploadQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileUploadQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileUploadQuestion.SCHEMA_REPRESENTATION)
- [FileType](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileType)
- [RowQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RowQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RowQuestion.SCHEMA_REPRESENTATION)
- [RatingQuestion](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingQuestion)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingQuestion.SCHEMA_REPRESENTATION)
- [RatingIconType](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingIconType)
- [Grading](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grading)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grading.SCHEMA_REPRESENTATION)
- [CorrectAnswers](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswers)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswers.SCHEMA_REPRESENTATION)
- [CorrectAnswer](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswer)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswer.SCHEMA_REPRESENTATION)
- [QuestionGroupItem](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem.SCHEMA_REPRESENTATION)
- [Grid](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grid)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grid.SCHEMA_REPRESENTATION)
- [PageBreakItem](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PageBreakItem)
- [TextItem](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextItem)
- [ImageItem](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ImageItem)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ImageItem.SCHEMA_REPRESENTATION)
- [VideoItem](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#VideoItem)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#VideoItem.SCHEMA_REPRESENTATION)
- [Video](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Video)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Video.SCHEMA_REPRESENTATION)
- [PublishSettings](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishSettings)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishSettings.SCHEMA_REPRESENTATION)
- [PublishState](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishState)
  - [JSON representation](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishState.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#METHODS_SUMMARY)

## Resource: Form

A Google Forms document. A form is created in Drive, and deleting a form or changing its access protections is done via the [Drive API](https://developers.google.com/drive/api/v3/about-sdk).

| JSON representation |
|---|
| ``` { "formId": string, "info": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Info`) }, "settings": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FormSettings`) }, "items": [ { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Item`) } ], "revisionId": string, "responderUri": string, "linkedSheetId": string, "publishSettings": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishSettings`) } } ``` |

| Fields ||
|---|---|
| `formId` | `string` Output only. The form ID. |
| `info` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Info`)`` Required. The title and description of the form. |
| `settings` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FormSettings`)`` The form's settings. This must be updated with `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate#UpdateSettingsRequest`; it is ignored during `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/create#google.apps.forms.v1.FormsService.CreateForm` and `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate#UpdateFormInfoRequest`. |
| `items[]` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Item`)`` Required. A list of the form's items, which can include section headers, questions, embedded media, etc. |
| `revisionId` | `string` Output only. The revision ID of the form. Used in the `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate#WriteControl` in update requests to identify the revision on which the changes are based. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the form *content* has not changed. Conversely, a changed ID (for the same form and user) usually means the form *content* has been updated; however, a changed ID can also be due to internal factors such as ID format changes. Form content excludes form metadata, including: - sharing settings (who has access to the form) - `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Form.FIELDS.publish_settings` (if the form supports publishing and if it is published) |
| `responderUri` | `string` Output only. The form URI to share with responders. This opens a page that allows the user to submit responses but not edit the questions. For forms that have `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Form.FIELDS.publish_settings` value set, this is the published form URI. |
| `linkedSheetId` | `string` Output only. The ID of the linked Google Sheet which is accumulating responses from this Form (if such a Sheet exists). |
| `publishSettings` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishSettings`)`` Output only. The publishing settings for a form. This field isn't set for legacy forms because they don't have the `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Form.FIELDS.publish_settings` field. All newly created forms support publish settings. Forms with `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Form.FIELDS.publish_settings` value set can call `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/setPublishSettings#google.apps.forms.v1.FormsService.SetPublishSettings` API to publish or unpublish the form. |

## Info

The general information for a form.

| JSON representation |
|---|
| ``` { "title": string, "documentTitle": string, "description": string } ``` |

| Fields ||
|---|---|
| `title` | `string` Required. The title of the form which is visible to responders. |
| `documentTitle` | `string` Output only. The title of the document which is visible in Drive. If `Info.title` is empty, `documentTitle` may appear in its place in the Google Forms UI and be visible to responders. `documentTitle` can be set on create, but cannot be modified by a batchUpdate request. Please use the [Google Drive API](https://developers.google.com/drive/api/v3/reference/files/update) if you need to programmatically update `documentTitle`. |
| `description` | `string` The description of the form. |

## FormSettings

A form's settings.

| JSON representation |
|---|
| ``` { "quizSettings": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuizSettings`) }, "emailCollectionType": enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#EmailCollectionType`) } ``` |

| Fields ||
|---|---|
| `quizSettings` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuizSettings`)`` Settings related to quiz forms and grading. |
| `emailCollectionType` | ``enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#EmailCollectionType`)`` Optional. The setting that determines whether the form collects email addresses from respondents. |

## QuizSettings

Settings related to quiz forms and grading. These must be updated with the UpdateSettingsRequest.

| JSON representation |
|---|
| ``` { "isQuiz": boolean } ``` |

| Fields ||
|---|---|
| `isQuiz` | `boolean` Whether this form is a quiz or not. When true, responses are graded based on question `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grading`. Upon setting to false, all question `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grading` is deleted. |

## EmailCollectionType

Optional. The setting that determines whether the form collects email addresses from respondents and how the email addresses are collected. If the form collects email addresses, the values are populated in the `formResponse.respondentEmail` field.

| Enums ||
|---|---|
| `EMAIL_COLLECTION_TYPE_UNSPECIFIED` | Unspecified. This value is unused. |
| `DO_NOT_COLLECT` | The form doesn't collect email addresses. Default value if the form owner uses a Google account. |
| `VERIFIED` | The form collects email addresses automatically based on the account of the signed-in user. Default value if the form owner uses a Google Workspace account. |
| `RESPONDER_INPUT` | The form collects email addresses using a field that the respondent completes on the form. |

## Item

A single item of the form. `kind` defines which kind of item it is.

| JSON representation |
|---|
| ``` { "itemId": string, "title": string, "description": string, "questionItem": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionItem`) }, "questionGroupItem": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem`) }, "pageBreakItem": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PageBreakItem`) }, "textItem": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextItem`) }, "imageItem": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ImageItem`) }, "videoItem": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#VideoItem`) } } ``` |

| Fields ||
|---|---|
| `itemId` | `string` The item ID. On creation, it can be provided but the ID must not be already used in the form. If not provided, a new ID is assigned. |
| `title` | `string` The title of the item. |
| `description` | `string` The description of the item. |
| Union field `kind`. Required. The kind of item this is. `kind` can be only one of the following: ||
| `questionItem` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionItem`)`` Poses a question to the user. |
| `questionGroupItem` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem`)`` Poses one or more questions to the user with a single major prompt. |
| `pageBreakItem` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PageBreakItem`)`` Starts a new page with a title. |
| `textItem` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextItem`)`` Displays a title and description on the page. |
| `imageItem` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ImageItem`)`` Displays an image on the page. |
| `videoItem` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#VideoItem`)`` Displays a video on the page. |

## QuestionItem

A form item containing a single question.

| JSON representation |
|---|
| ``` { "question": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Question`) }, "image": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`) } } ``` |

| Fields ||
|---|---|
| `question` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Question`)`` Required. The displayed question. |
| `image` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`)`` The image displayed within the question. |

## Question

Any question. The specific type of question is known by its `kind`.

| JSON representation |
|---|
| ``` { "questionId": string, "required": boolean, "grading": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grading`) }, "choiceQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceQuestion`) }, "textQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextQuestion`) }, "scaleQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ScaleQuestion`) }, "dateQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#DateQuestion`) }, "timeQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TimeQuestion`) }, "fileUploadQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileUploadQuestion`) }, "rowQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RowQuestion`) }, "ratingQuestion": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingQuestion`) } } ``` |

| Fields ||
|---|---|
| `questionId` | `string` Read only. The question ID. On creation, it can be provided but the ID must not be already used in the form. If not provided, a new ID is assigned. |
| `required` | `boolean` Whether the question must be answered in order for a respondent to submit their response. |
| `grading` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grading`)`` Grading setup for the question. |
| Union field `kind`. Required. The type of question offered to a respondent. `kind` can be only one of the following: ||
| `choiceQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceQuestion`)`` A respondent can choose from a pre-defined set of options. |
| `textQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TextQuestion`)`` A respondent can enter a free text response. |
| `scaleQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ScaleQuestion`)`` A respondent can choose a number from a range. |
| `dateQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#DateQuestion`)`` A respondent can enter a date. |
| `timeQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#TimeQuestion`)`` A respondent can enter a time. |
| `fileUploadQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileUploadQuestion`)`` A respondent can upload one or more files. |
| `rowQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RowQuestion`)`` A row of a `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem`. |
| `ratingQuestion` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingQuestion`)`` A respondent can choose a rating from a pre-defined set of icons. |

## ChoiceQuestion

A radio/checkbox/dropdown question.

| JSON representation |
|---|
| ``` { "type": enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceType`), "options": [ { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Option`) } ], "shuffle": boolean } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceType`)`` Required. The type of choice question. |
| `options[]` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Option`)`` Required. List of options that a respondent must choose from. |
| `shuffle` | `boolean` Whether the options should be displayed in random order for different instances of the quiz. This is often used to prevent cheating by respondents who might be looking at another respondent's screen, or to address bias in a survey that might be introduced by always putting the same options first or last. |

## ChoiceType

The type of choice.

| Enums ||
|---|---|
| `CHOICE_TYPE_UNSPECIFIED` | Default value. Unused. |
| `RADIO` | Radio buttons: All choices are shown to the user, who can only pick one of them. |
| `CHECKBOX` | Checkboxes: All choices are shown to the user, who can pick any number of them. |
| `DROP_DOWN` | Drop-down menu: The choices are only shown to the user on demand, otherwise only the current choice is shown. Only one option can be chosen. |

## Option

An option for a Choice question.

| JSON representation |
|---|
| ``` { "value": string, "image": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`) }, "isOther": boolean, "goToAction": enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#GoToAction`), "goToSectionId": string } ``` |

| Fields ||
|---|---|
| `value` | `string` Required. The choice as presented to the user. |
| `image` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`)`` Display image as an option. |
| `isOther` | `boolean` Whether the option is "other". Currently only applies to `RADIO` and `CHECKBOX` choice types, but is not allowed in a `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem`. |
| Union field `go_to_section`. Which section to go to if this option is selected. Currently only applies to `RADIO` and `SELECT` choice type, but is not allowed in a `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem`. `go_to_section` can be only one of the following: ||
| `goToAction` | ``enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#GoToAction`)`` Section navigation type. |
| `goToSectionId` | `string` Item ID of section header to go to. |

## GoToAction

Constants for section navigation.

| Enums ||
|---|---|
| `GO_TO_ACTION_UNSPECIFIED` | Default value. Unused. |
| `NEXT_SECTION` | Go to the next section. |
| `RESTART_FORM` | Go back to the beginning of the form. |
| `SUBMIT_FORM` | Submit form immediately. |

## Image

Data representing an image.

| JSON representation |
|---|
| ``` { "contentUri": string, "altText": string, "properties": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#MediaProperties`) }, "sourceUri": string } ``` |

| Fields ||
|---|---|
| `contentUri` | `string` Output only. A URI from which you can download the image; this is valid only for a limited time. |
| `altText` | `string` A description of the image that is shown on hover and read by screenreaders. |
| `properties` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#MediaProperties`)`` Properties of an image. |
| Union field `image_source`. The kind of image source. Exactly one image source field must be set when creating new images. `image_source` can be only one of the following: ||
| `sourceUri` | `string` Input only. The source URI is the URI used to insert the image. The source URI can be empty when fetched. |

## MediaProperties

Properties of the media.

| JSON representation |
|---|
| ``` { "alignment": enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Alignment`), "width": integer } ``` |

| Fields ||
|---|---|
| `alignment` | ``enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Alignment`)`` Position of the media. |
| `width` | `integer` The width of the media in pixels. When the media is displayed, it is scaled to the smaller of this value or the width of the displayed form. The original aspect ratio of the media is preserved. If a width is not specified when the media is added to the form, it is set to the width of the media source. Width must be between 0 and 740, inclusive. Setting width to 0 or unspecified is only permitted when updating the media source. |

## Alignment

Alignment on the page.

| Enums ||
|---|---|
| `ALIGNMENT_UNSPECIFIED` | Default value. Unused. |
| `LEFT` | Left align. |
| `RIGHT` | Right align. |
| `CENTER` | Center. |

## TextQuestion

A text-based question.

| JSON representation |
|---|
| ``` { "paragraph": boolean } ``` |

| Fields ||
|---|---|
| `paragraph` | `boolean` Whether the question is a paragraph question or not. If not, the question is a short text question. |

## ScaleQuestion

A scale question. The user has a range of numeric values to choose from.

| JSON representation |
|---|
| ``` { "low": integer, "high": integer, "lowLabel": string, "highLabel": string } ``` |

| Fields ||
|---|---|
| `low` | `integer` Required. The lowest possible value for the scale. |
| `high` | `integer` Required. The highest possible value for the scale. |
| `lowLabel` | `string` The label to display describing the lowest point on the scale. |
| `highLabel` | `string` The label to display describing the highest point on the scale. |

## DateQuestion

A date question. Date questions default to just month + day.

| JSON representation |
|---|
| ``` { "includeTime": boolean, "includeYear": boolean } ``` |

| Fields ||
|---|---|
| `includeTime` | `boolean` Whether to include the time as part of the question. |
| `includeYear` | `boolean` Whether to include the year as part of the question. |

## TimeQuestion

A time question.

| JSON representation |
|---|
| ``` { "duration": boolean } ``` |

| Fields ||
|---|---|
| `duration` | `boolean` `true` if the question is about an elapsed time. Otherwise it is about a time of day. |

## FileUploadQuestion

A file upload question. The API currently does not support creating file upload questions.

| JSON representation |
|---|
| ``` { "folderId": string, "types": [ enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileType`) ], "maxFiles": integer, "maxFileSize": string } ``` |

| Fields ||
|---|---|
| `folderId` | `string` Required. The ID of the Drive folder where uploaded files are stored. |
| `types[]` | ``enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#FileType`)`` File types accepted by this question. |
| `maxFiles` | `integer` Maximum number of files that can be uploaded for this question in a single response. |
| `maxFileSize` | `string (https://developers.google.com/discovery/v1/type-format format)` Maximum number of bytes allowed for any single file uploaded to this question. |

## FileType

File types that can be uploaded to a file upload question.

| Enums ||
|---|---|
| `FILE_TYPE_UNSPECIFIED` | Default value. Unused. |
| `ANY` | No restrictions on type. |
| `DOCUMENT` | A Google Docs document. |
| `PRESENTATION` | A Google Slides presentation. |
| `SPREADSHEET` | A Google Sheets spreadsheet. |
| `DRAWING` | A drawing. |
| `PDF` | A PDF. |
| `IMAGE` | An image. |
| `VIDEO` | A video. |
| `AUDIO` | An audio file. |

## RowQuestion

Configuration for a question that is part of a question group.

| JSON representation |
|---|
| ``` { "title": string } ``` |

| Fields ||
|---|---|
| `title` | `string` Required. The title for the single row in the `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#QuestionGroupItem`. |

## RatingQuestion

A rating question. The user has a range of icons to choose from.

| JSON representation |
|---|
| ``` { "ratingScaleLevel": integer, "iconType": enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingIconType`) } ``` |

| Fields ||
|---|---|
| `ratingScaleLevel` | `integer` Required. The rating scale level of the rating question. |
| `iconType` | ``enum (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#RatingIconType`)`` Required. The icon type to use for the rating. |

## RatingIconType

The type of icon to use for the rating.

| Enums ||
|---|---|
| `RATING_ICON_TYPE_UNSPECIFIED` | Default value. Unused. |
| `STAR` | A star icon. |
| `HEART` | A heart icon. |
| `THUMB_UP` | A thumbs down icon. |

## Grading

Grading for a single question

| JSON representation |
|---|
| ``` { "pointValue": integer, "correctAnswers": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswers`) }, "whenRight": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/Feedback`) }, "whenWrong": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/Feedback`) }, "generalFeedback": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/Feedback`) } } ``` |

| Fields ||
|---|---|
| `pointValue` | `integer` Required. The maximum number of points a respondent can automatically get for a correct answer. This must not be negative. |
| `correctAnswers` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswers`)`` Required. The answer key for the question. Responses are automatically graded based on this field. |
| `whenRight` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/Feedback`)`` The feedback displayed for correct responses. This feedback can only be set for multiple choice questions that have correct answers provided. |
| `whenWrong` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/Feedback`)`` The feedback displayed for incorrect responses. This feedback can only be set for multiple choice questions that have correct answers provided. |
| `generalFeedback` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/Feedback`)`` The feedback displayed for all answers. This is commonly used for short answer questions when a quiz owner wants to quickly give respondents some sense of whether they answered the question correctly before they've had a chance to officially grade the response. General feedback cannot be set for automatically graded multiple choice questions. |

## CorrectAnswers

The answer key for a question.

| JSON representation |
|---|
| ``` { "answers": [ { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswer`) } ] } ``` |

| Fields ||
|---|---|
| `answers[]` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#CorrectAnswer`)`` A list of correct answers. A quiz response can be automatically graded based on these answers. For single-valued questions, a response is marked correct if it matches any value in this list (in other words, multiple correct answers are possible). For multiple-valued (`CHECKBOX`) questions, a response is marked correct if it contains exactly the values in this list. |

## CorrectAnswer

A single correct answer for a question. For multiple-valued (`CHECKBOX`) questions, several `CorrectAnswer`s may be needed to represent a single correct response option.

| JSON representation |
|---|
| ``` { "value": string } ``` |

| Fields ||
|---|---|
| `value` | `string` Required. The correct answer value. See the documentation for `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms.responses#TextAnswer.FIELDS.value` for details on how various value types are formatted. |

## QuestionGroupItem

Defines a question that comprises multiple questions grouped together.

| JSON representation |
|---|
| ``` { "questions": [ { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Question`) } ], "image": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`) }, "grid": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grid`) } } ``` |

| Fields ||
|---|---|
| `questions[]` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Question`)`` Required. A list of questions that belong in this question group. A question must only belong to one group. The `kind` of the group may affect what types of questions are allowed. |
| `image` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`)`` The image displayed within the question group above the specific questions. |
| Union field `kind`. Required. The type of question group, which determines what types of questions are allowed and how they are displayed. `kind` can be only one of the following: ||
| `grid` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Grid`)`` The question group is a grid with rows of multiple choice questions that share the same options. When `grid` is set, all questions in the group must be of kind `row`. |

## Grid

A grid of choices (radio or check boxes) with each row constituting a separate question. Each row has the same choices, which are shown as the columns.

| JSON representation |
|---|
| ``` { "columns": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceQuestion`) }, "shuffleQuestions": boolean } ``` |

| Fields ||
|---|---|
| `columns` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#ChoiceQuestion`)`` Required. The choices shared by each question in the grid. In other words, the values of the columns. Only `CHECK_BOX` and `RADIO` choices are allowed. |
| `shuffleQuestions` | `boolean` If `true`, the questions are randomly ordered. In other words, the rows appear in a different order for every respondent. |

## PageBreakItem

This type has no fields.
A page break. The title and description of this item are shown at the top of the new page.

## TextItem

This type has no fields.
A text item.

## ImageItem

An item containing an image.

| JSON representation |
|---|
| ``` { "image": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`) } } ``` |

| Fields ||
|---|---|
| `image` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Image`)`` Required. The image displayed in the item. |

## VideoItem

An item containing a video.

| JSON representation |
|---|
| ``` { "video": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Video`) }, "caption": string } ``` |

| Fields ||
|---|---|
| `video` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#Video`)`` Required. The video displayed in the item. |
| `caption` | `string` The text displayed below the video. |

## Video

Data representing a video.

| JSON representation |
|---|
| ``` { "youtubeUri": string, "properties": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#MediaProperties`) } } ``` |

| Fields ||
|---|---|
| `youtubeUri` | `string` Required. A YouTube URI. |
| `properties` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#MediaProperties`)`` Properties of a video. |

## PublishSettings

The publishing settings of a form.

| JSON representation |
|---|
| ``` { "publishState": { object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishState`) } } ``` |

| Fields ||
|---|---|
| `publishState` | ``object (`https://developers.google.com/workspace/forms/api/reference/rest/v1/forms#PublishState`)`` Optional. The publishing state of a form. When updating `publishState`, both `isPublished` and `isAcceptingResponses` must be set. However, setting `isAcceptingResponses` to `true` and `isPublished` to `false` isn't supported and returns an error. |

## PublishState

The publishing state of a form.

| JSON representation |
|---|
| ``` { "isPublished": boolean, "isAcceptingResponses": boolean } ``` |

| Fields ||
|---|---|
| `isPublished` | `boolean` Required. Whether the form is published and visible to others. |
| `isAcceptingResponses` | `boolean` Required. Whether the form accepts responses. If `isPublished` is set to `false`, this field is forced to `false`. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/batchUpdate` | Change the form with a batch of updates. |
| ### `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/create` | Create a new form using the title given in the provided form message in the request. |
| ### `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/get` | Get a form. |
| ### `https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/setPublishSettings` | Updates the publish settings of a form. |