Google Workspace APIs Calendar API

The Calendar API from Google Workspace APIs — 3 operation(s) for calendar.

OpenAPI Specification

google-suites-calendar-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Workspace APIs (Gmail, , Drive) Calendar API
  description: Best-effort OpenAPI 3.1 covering the most commonly used REST endpoints for the Gmail API (gmail.googleapis.com), Google Calendar API (calendar.googleapis.com / www.googleapis.com/calendar), and Google Drive API (www.googleapis.com/drive). All services use Google OAuth 2.0.
  version: v1
servers:
- url: https://gmail.googleapis.com
  description: Gmail API
- url: https://www.googleapis.com
  description: Calendar / Drive API host
security:
- googleOAuth: []
tags:
- name: Calendar
paths:
  /calendar/v3/users/me/calendarList:
    get:
      tags:
      - Calendar
      summary: List the user's calendars
      operationId: calendar.calendarList.list
      servers:
      - url: https://www.googleapis.com
      parameters:
      - in: query
        name: maxResults
        schema:
          type: integer
      - in: query
        name: pageToken
        schema:
          type: string
      responses:
        '200':
          description: CalendarList
  /calendar/v3/calendars/{calendarId}/events:
    get:
      tags:
      - Calendar
      summary: List events in a calendar
      operationId: calendar.events.list
      servers:
      - url: https://www.googleapis.com
      parameters:
      - in: path
        name: calendarId
        required: true
        schema:
          type: string
      - in: query
        name: timeMin
        schema:
          type: string
          format: date-time
      - in: query
        name: timeMax
        schema:
          type: string
          format: date-time
      - in: query
        name: singleEvents
        schema:
          type: boolean
      - in: query
        name: orderBy
        schema:
          type: string
          enum:
          - startTime
          - updated
      responses:
        '200':
          description: Events
    post:
      tags:
      - Calendar
      summary: Create an event
      operationId: calendar.events.insert
      servers:
      - url: https://www.googleapis.com
      parameters:
      - in: path
        name: calendarId
        required: true
        schema:
          type: string
      - in: query
        name: sendUpdates
        schema:
          type: string
          enum:
          - all
          - externalOnly
          - none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Event'
      responses:
        '200':
          description: Event
  /calendar/v3/calendars/{calendarId}/events/{eventId}:
    get:
      tags:
      - Calendar
      summary: Get an event
      operationId: calendar.events.get
      servers:
      - url: https://www.googleapis.com
      parameters:
      - in: path
        name: calendarId
        required: true
        schema:
          type: string
      - in: path
        name: eventId
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Event
    patch:
      tags:
      - Calendar
      summary: Patch an event
      operationId: calendar.events.patch
      servers:
      - url: https://www.googleapis.com
      parameters:
      - in: path
        name: calendarId
        required: true
        schema:
          type: string
      - in: path
        name: eventId
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Event'
      responses:
        '200':
          description: Event
    delete:
      tags:
      - Calendar
      summary: Delete an event
      operationId: calendar.events.delete
      servers:
      - url: https://www.googleapis.com
      parameters:
      - in: path
        name: calendarId
        required: true
        schema:
          type: string
      - in: path
        name: eventId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted
components:
  schemas:
    Event:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        summary:
          type: string
        description:
          type: string
        location:
          type: string
        start:
          type: object
          properties:
            dateTime:
              type: string
              format: date-time
            timeZone:
              type: string
        end:
          type: object
          properties:
            dateTime:
              type: string
              format: date-time
            timeZone:
              type: string
        attendees:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
              responseStatus:
                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/gmail.modify: Gmail read/write
            https://www.googleapis.com/auth/gmail.send: Gmail send
            https://www.googleapis.com/auth/calendar: Calendar full access
            https://www.googleapis.com/auth/calendar.events: Calendar events
            https://www.googleapis.com/auth/drive: Drive full access
            https://www.googleapis.com/auth/drive.file: Drive per-file access