openapi: 3.1.0 info: title: Google Workspace Suite (, , Slides, Gmail) Docs Sheets API description: Best-effort OpenAPI 3.1 covering the most commonly used REST endpoints across the Google Docs API (docs.googleapis.com), Google Sheets API (sheets.googleapis.com), Google Slides API (slides.googleapis.com), and the Gmail API (gmail.googleapis.com). All services use Google OAuth 2.0 user or service-account credentials. version: v1 servers: - url: https://docs.googleapis.com description: Google Docs API - url: https://sheets.googleapis.com description: Google Sheets API - url: https://slides.googleapis.com description: Google Slides API - url: https://gmail.googleapis.com description: Gmail API security: - googleOAuth: [] tags: - name: Sheets paths: /v4/spreadsheets: post: tags: - Sheets summary: Create a spreadsheet operationId: sheets.spreadsheets.create servers: - url: https://sheets.googleapis.com requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Spreadsheet' responses: '200': description: Spreadsheet /v4/spreadsheets/{spreadsheetId}: get: tags: - Sheets summary: Get a spreadsheet operationId: sheets.spreadsheets.get servers: - url: https://sheets.googleapis.com parameters: - in: path name: spreadsheetId required: true schema: type: string - in: query name: ranges schema: type: array items: type: string responses: '200': description: Spreadsheet /v4/spreadsheets/{spreadsheetId}/values/{range}: get: tags: - Sheets summary: Get values in a range operationId: sheets.spreadsheets.values.get servers: - url: https://sheets.googleapis.com parameters: - in: path name: spreadsheetId required: true schema: type: string - in: path name: range required: true schema: type: string responses: '200': description: Value range put: tags: - Sheets summary: Update values in a range operationId: sheets.spreadsheets.values.update servers: - url: https://sheets.googleapis.com parameters: - in: path name: spreadsheetId required: true schema: type: string - in: path name: range required: true schema: type: string - in: query name: valueInputOption required: true schema: type: string enum: - RAW - USER_ENTERED requestBody: required: true content: application/json: schema: type: object properties: range: type: string majorDimension: type: string values: type: array items: type: array items: {} responses: '200': description: Updated value range /v4/spreadsheets/{spreadsheetId}:batchUpdate: post: tags: - Sheets summary: Batch update a spreadsheet operationId: sheets.spreadsheets.batchUpdate servers: - url: https://sheets.googleapis.com parameters: - in: path name: spreadsheetId required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: requests: type: array items: type: object responses: '200': description: Batch update result components: schemas: Spreadsheet: type: object properties: spreadsheetId: type: string properties: type: object sheets: type: array items: type: object spreadsheetUrl: type: string securitySchemes: googleOAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth tokenUrl: https://oauth2.googleapis.com/token scopes: https://www.googleapis.com/auth/documents: Read/write Google Docs https://www.googleapis.com/auth/spreadsheets: Read/write Google Sheets https://www.googleapis.com/auth/presentations: Read/write Google Slides https://www.googleapis.com/auth/gmail.modify: Read/write Gmail (no permanent delete) https://www.googleapis.com/auth/gmail.send: Send mail on behalf of user https://www.googleapis.com/auth/gmail.readonly: Read-only access to Gmail