4.1 KiB
4.1 KiB
Google Forms Routing Reference
App name: google-forms
Base URL proxied: forms.googleapis.com
API Path Pattern
/google-forms/v1/forms/{formId}
Common Endpoints
Get Form
GET /google-forms/v1/forms/{formId}
Create Form
POST /google-forms/v1/forms
Content-Type: application/json
{
"info": {
"title": "Customer Feedback Survey"
}
}
Batch Update Form
POST /google-forms/v1/forms/{formId}:batchUpdate
Content-Type: application/json
{
"requests": [
{
"createItem": {
"item": {
"title": "What is your name?",
"questionItem": {
"question": {
"required": true,
"textQuestion": {
"paragraph": false
}
}
}
},
"location": {"index": 0}
}
}
]
}
List Responses
GET /google-forms/v1/forms/{formId}/responses
Get Response
GET /google-forms/v1/forms/{formId}/responses/{responseId}
Common Requests for batchUpdate
Create Text Question
{
"createItem": {
"item": {
"title": "Question text",
"questionItem": {
"question": {
"required": true,
"textQuestion": {"paragraph": false}
}
}
},
"location": {"index": 0}
}
}
Create Multiple Choice Question
{
"createItem": {
"item": {
"title": "Select an option",
"questionItem": {
"question": {
"required": true,
"choiceQuestion": {
"type": "RADIO",
"options": [
{"value": "Option A"},
{"value": "Option B"},
{"value": "Option C"}
]
}
}
}
},
"location": {"index": 0}
}
}
Create Checkbox Question
{
"createItem": {
"item": {
"title": "Select all that apply",
"questionItem": {
"question": {
"choiceQuestion": {
"type": "CHECKBOX",
"options": [
{"value": "Option 1"},
{"value": "Option 2"}
]
}
}
}
},
"location": {"index": 0}
}
}
Create Scale Question
{
"createItem": {
"item": {
"title": "Rate your experience",
"questionItem": {
"question": {
"scaleQuestion": {
"low": 1,
"high": 5,
"lowLabel": "Poor",
"highLabel": "Excellent"
}
}
}
},
"location": {"index": 0}
}
}
Update Form Info
{
"updateFormInfo": {
"info": {
"title": "New Form Title",
"description": "Form description"
},
"updateMask": "title,description"
}
}
Delete Item
{
"deleteItem": {
"location": {"index": 0}
}
}
Question Types
textQuestion- Short or paragraph textchoiceQuestion- Radio, checkbox, or dropdownscaleQuestion- Linear scaledateQuestion- Date pickertimeQuestion- Time pickerfileUploadQuestion- File upload
Notes
- Authentication is automatic - the router injects the OAuth token
- Form IDs can be found in the form URL
- Responses include
answerskeyed by question ID - Use
updateMaskto specify which fields to update - Location index is 0-based for item positioning