Google Gmail API

The Gmail API is a RESTful API that can be used to access Gmail mailboxes and send mail. For most web applications the Gmail API is the best choice for authorized access to a user's Gmail data and is suitable for various applications.

OpenAPI Specification

google-gmail-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Gmail API
  description: The Gmail API is a RESTful API that can be used to access Gmail mailboxes and send mail. For most web applications the Gmail API is the best choice for authorized access to a user's Gmail data and is suitable for various applications.
  version: 1.0.0
servers:
  - url: https://gmail.googleapis.com
    description: Google Gmail API Server
security:
  - oauth2Auth: []
tags:
  - name: Address
    description: Operations related to Address
  - name: Addresses
    description: Operations related to Addresses
  - name: Attachments
    description: Operations related to Attachments
  - name: Auto
    description: Operations related to Auto
  - name: Batch
    description: Operations related to Batch
  - name: Create
    description: Operations related to Create
  - name: Delegates
    description: Operations related to Delegates
  - name: Deletes
    description: Operations related to Deletes
  - name: Disables
    description: Operations related to Disables
  - name: Drafts
    description: Operations related to Drafts
  - name: Enables
    description: Operations related to Enables
  - name: Get
    description: Operations related to Get
  - name: History
    description: Operations related to History
  - name: Import
    description: Operations related to Import
  - name: Info
    description: Operations related to Info
  - name: Insert
    description: Operations related to Insert
  - name: Labels
    description: Operations related to Labels
  - name: Language
    description: Operations related to Language
  - name: Lists
    description: Operations related to Lists
  - name: Messages
    description: Operations related to Messages
  - name: Modify
    description: Operations related to Modify
  - name: Notifications
    description: Operations related to Notifications
  - name: Obliterate
    description: Operations related to Obliterate
  - name: Patch
    description: Operations related to Patch
  - name: Pop
    description: Operations related to Pop
  - name: Profile
    description: Operations related to Profile
  - name: Send
    description: Operations related to Send
  - name: Sets
    description: Operations related to Sets
  - name: Setting
    description: Operations related to Setting
  - name: Settings
    description: Operations related to Settings
  - name: Stop
    description: Operations related to Stop
  - name: Threads
    description: Operations related to Threads
  - name: Trash
    description: Operations related to Trash
  - name: Update
    description: Operations related to Update
  - name: Users
    description: Operations related to Users
  - name: Vacation
    description: Operations related to Vacation
  - name: Verify
    description: Operations related to Verify
  - name: Watch
    description: Operations related to Watch
paths:
  /gmail/v1/users/{userId}/profile:
    get:
      tags:
        - Get
        - Profile
      summary: Google Get Profile
      description: The Google Gmail API's Get Profile operation retrieves the current user's Gmail profile information by making a GET request to the endpoint /gmail/v1/users/{userId}/profile, where {userId} can be either the user's email address or the special value "me" to indicate the authenticated user. This operation returns basic profile details including the user's email address, the total number of messages in their mailbox, the total number of threads, and their history ID, which is useful for tracking changes to the mailbox over time. The response provides essential metadata about the Gmail account without accessing the actual content of emails, making it a lightweight way to verify account details and obtain summary statistics. This endpoint requires appropriate OAuth 2.0 authorization scopes, typically gmail.readonly or gmail.metadata, to access the user's profile information securely.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersProfileGetResponse'
              examples:
                GmailUsersProfileGetResponseExample:
                  $ref: '#/components/examples/GmailUsersProfileGetResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
        WriteDescription: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersProfileGetResponseExample
  /gmail/v1/users/{userId}/watch:
    post:
      tags:
        - Users
        - Watch
      summary: Google Watch Users
      description: The Watch Users operation in the Google Gmail API allows applications to set up push notifications for a user's mailbox by establishing a watch on their Gmail account. When called via POST to /gmail/v1/users/{userId}/watch, this endpoint configures Gmail to send notifications to a specified Cloud Pub/Sub topic whenever changes occur in the user's mailbox, such as receiving new emails, messages being deleted, or labels being modified. The watch remains active for a renewable period (default 7 days), and applications must include the target Pub/Sub topic details in the request body along with optional filters to specify which types of events should trigger notifications. This enables real-time synchronization and event-driven architectures without the need for constant polling of the mailbox.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GmailUsersWatchPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersWatchPostResponse'
              examples:
                GmailUsersWatchPostResponseExample:
                  $ref: '#/components/examples/GmailUsersWatchPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
        WriteDescription: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersWatchPostResponseExample
  /gmail/v1/users/{userId}/stop:
    post:
      tags:
        - Notifications
        - Stop
        - Users
      summary: Google Stop Notifications for User
      description: Stop receiving push notifications for the given user mailbox.
      parameters:
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content: {}
      responses:
        '204':
          description: No Content
          content:
            text/plain:
              schema:
                type: string
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /gmail/v1/users/{userId}/drafts/send:
    post:
      tags:
        - Drafts
        - Send
      summary: Google Send Drafts
      description: Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userID}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersDraftsSendPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersDraftsSendPostResponse'
              examples:
                UsersDraftsSendPostResponseExample:
                  $ref: '#/components/examples/UsersDraftsSendPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: UsersDraftsSendPostResponseExample
  /gmail/v1/users/{userId}/drafts/{id}:
    get:
      tags:
        - Drafts
        - Get
      summary: Google Get Drafts
      description: Gets the specified draft.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userId}}'
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersDraftsGetResponse'
              examples:
                GmailUsersDraftsGetResponseExample:
                  $ref: '#/components/examples/GmailUsersDraftsGetResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersDraftsGetResponseExample
    put:
      tags:
        - Drafts
        - Update
      summary: Google Update Drafts
      description: Replaces a draft's content.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GmailUsersDraftsPutRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersDraftsPutResponse'
              examples:
                GmailUsersDraftsPutResponseExample:
                  $ref: '#/components/examples/GmailUsersDraftsPutResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersDraftsPutResponseExample
    delete:
      tags:
        - Deletes
        - Drafts
      summary: Google Delete Drafts
      description: Immediately and permanently deletes the specified draft. Does not simply trash it.
      parameters:
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      responses:
        '204':
          description: No Content
          content:
            text/plain:
              schema:
                type: string
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /gmail/v1/users/{userId}/drafts:
    get:
      tags:
        - Drafts
        - Lists
      summary: Google List Drafts
      description: Lists the drafts in the user's mailbox.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userID}}'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersDraftsGetResponse1'
              examples:
                GmailUsersDraftsGetResponse1Example:
                  $ref: '#/components/examples/GmailUsersDraftsGetResponse1Example'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersDraftsGetResponse1Example
    post:
      tags:
        - Create
        - Drafts
      summary: Google Create Drafts
      description: Creates a new draft with the `DRAFT` label.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GmailUsersDraftsPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersDraftsPostResponse'
              examples:
                GmailUsersDraftsPostResponseExample:
                  $ref: '#/components/examples/GmailUsersDraftsPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersDraftsPostResponseExample
  /gmail/v1/users/{userId}/history:
    get:
      tags:
        - History
        - Lists
      summary: Google List History
      description: Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing `historyId`).
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userId}}'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersHistoryGetResponse'
              examples:
                GmailUsersHistoryGetResponseExample:
                  $ref: '#/components/examples/GmailUsersHistoryGetResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersHistoryGetResponseExample
  /gmail/v1/users/{userId}/messages/{id}/trash:
    post:
      tags:
        - Trash
      summary: Google Trash Messsages
      description: Moves the specified message to the trash.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content: {}
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersMessagesTrashPostResponse'
              examples:
                UsersMessagesTrashPostResponseExample:
                  $ref: '#/components/examples/UsersMessagesTrashPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: UsersMessagesTrashPostResponseExample
  /gmail/v1/users/{userId}/messages/{id}/untrash:
    post:
      tags:
        - Messages
      summary: Google Untrash Messages
      description: Removes the specified message from the trash.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content: {}
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersMessagesUntrashPostResponse'
              examples:
                UsersMessagesUntrashPostResponseExample:
                  $ref: '#/components/examples/UsersMessagesUntrashPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: UsersMessagesUntrashPostResponseExample
  /gmail/v1/users/{userId}/messages/{id}/modify:
    post:
      tags:
        - Messages
        - Modify
      summary: Google Modify Messages
      description: Modifies the labels on the specified message.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userId}}'
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{messageId}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersMessagesModifyPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersMessagesModifyPostResponse'
              examples:
                UsersMessagesModifyPostResponseExample:
                  $ref: '#/components/examples/UsersMessagesModifyPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: UsersMessagesModifyPostResponseExample
  /gmail/v1/users/{userId}/messages/batchDelete:
    post:
      tags:
        - Batch
        - Deletes
      summary: Google Batch Delete
      description: Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userID}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersMessagesBatchDeletePostRequest'
      responses:
        '204':
          description: No Content
          content:
            text/plain:
              schema:
                type: string
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /gmail/v1/users/{userId}/messages/import:
    post:
      tags:
        - Import
        - Messages
      summary: Google Import Messages
      description: Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. This method doesn't perform SPF checks, so it might not work for some spam messages, such as those attempting to perform domain spoofing. This method does not send a message.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersMessagesImportPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersMessagesImportPostResponse'
              examples:
                UsersMessagesImportPostResponseExample:
                  $ref: '#/components/examples/UsersMessagesImportPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: UsersMessagesImportPostResponseExample
  /gmail/v1/users/{userId}/messages/send:
    post:
      tags:
        - Messages
        - Send
      summary: Google Send Messages
      description: Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For example usage, see [Sending email](https://developers.google.com/gmail/api/guides/sending).
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userId}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersMessagesSendPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersMessagesSendPostResponse'
              examples:
                UsersMessagesSendPostResponseExample:
                  $ref: '#/components/examples/UsersMessagesSendPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: UsersMessagesSendPostResponseExample
  /gmail/v1/users/{userId}/messages/batchModify:
    post:
      tags:
        - Batch
        - Modify
      summary: Google Batch Modify
      description: Modifies the labels on the specified messages.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersMessagesBatchModifyPostRequest'
      responses:
        '204':
          description: No Content
          content:
            text/plain:
              schema:
                type: string
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /gmail/v1/users/{userId}/messages:
    get:
      tags:
        - Lists
        - Messages
      summary: Google List Messages
      description: Lists the messages in the user's mailbox.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: maxResults
          in: query
          schema:
            type: string
          example: '{{maxResults}}'
        - name: pageToken
          in: query
          schema:
            type: string
          example: '{{pageToken}}'
        - name: q
          in: query
          schema:
            type: string
          example: '{{q}}'
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: '{{userId}}'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersMessagesGetResponse'
              examples:
                GmailUsersMessagesGetResponseExample:
                  $ref: '#/components/examples/GmailUsersMessagesGetResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersMessagesGetResponseExample
    post:
      tags:
        - Insert
        - Messages
      summary: Google Insert Messages
      description: Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most scanning and classification. Does not send a message.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GmailUsersMessagesPostRequest'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersMessagesPostResponse'
              examples:
                GmailUsersMessagesPostResponseExample:
                  $ref: '#/components/examples/GmailUsersMessagesPostResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersMessagesPostResponseExample
  /gmail/v1/users/{userId}/messages/{id}:
    get:
      tags:
        - Get
        - Messages
      summary: Google Get Messages
      description: Gets the specified message.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersMessagesGetResponse1'
              examples:
                GmailUsersMessagesGetResponse1Example:
                  $ref: '#/components/examples/GmailUsersMessagesGetResponse1Example'
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersMessagesGetResponse1Example
    delete:
      tags:
        - Deletes
        - Messages
      summary: Google Delete Messages
      description: Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.
      parameters:
        - name: userId
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: '(Required) '
          example: incididunt labore i
      responses:
        '204':
          de

# --- truncated at 32 KB (268 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/google/refs/heads/main/openapi/google-gmail-api-openapi.yml