Google Deletes API

Operations related to Deletes

GitHub OpenAPI

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /gmail/v1/users/{userId}/drafts/{id} Permanently delete a draft · Google Delete Drafts #
Ask an LLM
“How do I permanently delete a draft without trashing it?”
“Can I remove a draft I never sent?”
Tell an agent destructive · confirm first
Permanently delete draft {id} for user {userId}.
Delete the unsent draft {id} from {userId}'s mailbox.
DELETE /gmail/v1/users/{userId}/messages/{id} Permanently delete a message · Google Delete Messages #
Ask an LLM
“How do I permanently delete a message from a user's mailbox?”
“Is there a way to delete a single email that can't be undone?”
Tell an agent destructive · confirm first
Permanently delete message {id} for user {userId}.
Delete the single email {id} from {userId}'s inbox.
DELETE /gmail/v1/users/{userId}/labels/{id} Permanently delete a label · Google Delete Labels #
Ask an LLM
“How do I permanently delete a label and remove it from every message?”
“Can I delete a label that was applied to threads?”
Tell an agent destructive · confirm first
Permanently delete label {id} for user {userId}.
Remove label {id} from {userId}'s mailbox and delete it.
DELETE /gmail/v1/users/{userId}/threads/{id} Permanently delete a thread · Google Delete Threads #
Ask an LLM
“How do I permanently delete an entire email thread?”
“What happens to messages in a thread when I delete the thread?”
Tell an agent destructive · confirm first
Permanently delete thread {id} for user {userId}.
Delete the whole thread {id} from {userId}'s mailbox.
DELETE /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id} Delete an S/MIME config for a send-as alias · Google Delete Send As SMIME INfo #
Ask an LLM
“How do I delete the S/MIME certificate for a send-as alias?”
“Can I remove an encrypted signature config from a send-as address?”
Tell an agent destructive · confirm first
Delete S/MIME config {id} for send-as alias {sendAsEmail} on user {userId}.
Remove the encrypted signature {id} from {sendAsEmail} in {userId}'s settings.
DELETE /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail} Delete a send-as alias · Google Delete Send As #
Ask an LLM
“How do I delete a send-as alias I no longer use?”
“Does deleting a send-as alias revoke its verification?”
Tell an agent destructive · confirm first
Delete send-as alias {sendAsEmail} for user {userId}.
Remove the {sendAsEmail} alias from {userId}'s settings.
DELETE /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress} Delete a client-side encryption identity · Google Delete CSE Idenities #
Ask an LLM
“How do I delete a CSE identity so it can't be used to send encrypted mail?”
“Can I restore a CSE identity after deleting it?”
Tell an agent destructive · confirm first
Delete CSE identity {cseEmailAddress} for user {userId}.
Remove the encrypted mail identity {cseEmailAddress} from {userId}'s settings.
DELETE /gmail/v1/users/{userId}/settings/filters/{id} Permanently delete a filter · Google Delete Filters #
Ask an LLM
“How do I permanently delete a filter I no longer need?”
“Can I remove a filter that was applied to messages?”
Tell an agent destructive · confirm first
Permanently delete filter {id} for user {userId}.
Remove the {id} filter from {userId}'s settings.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google:google-deletes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-deletes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Gmail Deletes 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: Deletes
  description: Operations related to Deletes
paths:
  /gmail/v1/users/{userId}/drafts/{id}:
    delete:
      tags:
      - Deletes
      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
      operationId: deleteGmailV1UsersByUserIdDraftsById
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/messages/{id}:
    delete:
      tags:
      - Deletes
      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':
          description: No Content
          content:
            text/plain:
              schema:
                type: string
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
      operationId: deleteGmailV1UsersByUserIdMessagesById
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/labels/{id}:
    delete:
      tags:
      - Deletes
      summary: Google Delete Labels
      description: Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
      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
      operationId: deleteGmailV1UsersByUserIdLabelsById
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/threads/{id}:
    delete:
      tags:
      - Deletes
      summary: Google Delete Threads
      description: Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer `threads.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':
          description: No Content
          content:
            text/plain:
              schema:
                type: string
      x-api-evangelist-processing:
        ChooseTags: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
      operationId: deleteGmailV1UsersByUserIdThreadsById
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}:
    delete:
      tags:
      - Deletes
      summary: Google Delete Send As SMIME INfo
      description: Deletes the specified S/MIME config for the specified send-as alias.
      parameters:
      - name: userId
        in: path
        schema:
          type: string
        required: true
        description: '(Required) '
        example: incididunt labore i
      - name: sendAsEmail
        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
      operationId: deleteGmailV1UsersByUserIdSettingsSendAsBySendAsEmailSmimeInfoById
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}:
    delete:
      tags:
      - Deletes
      summary: Google Delete Send As
      description: Deletes the specified send-as alias. Revokes any verification that may have been required for using it. This method is only available to service account clients that have been delegated domain-wide authority.
      parameters:
      - name: userId
        in: path
        schema:
          type: string
        required: true
        description: '(Required) '
        example: incididunt labore i
      - name: sendAsEmail
        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
      operationId: deleteGmailV1UsersByUserIdSettingsSendAsBySendAsEmail
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}:
    delete:
      tags:
      - Deletes
      summary: Google Delete CSE Idenities
      description: Deletes a client-side encryption identity. The authenticated user can no longer use the identity to send encrypted messages. You cannot restore the identity after you delete it. Instead, use the CreateCseIdentity method to create another identity with the same configuration.
      parameters:
      - name: userId
        in: path
        schema:
          type: string
        required: true
        description: '(Required) '
        example: incididunt labore i
      - name: cseEmailAddress
        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
      operationId: deleteGmailV1UsersByUserIdSettingsCseIdentitiesByCseEmailAddress
      x-operation-id-source: derived
  /gmail/v1/users/{userId}/settings/filters/{id}:
    delete:
      tags:
      - Deletes
      summary: Google Delete Filters
      description: Immediately and permanently deletes the specified filter.
      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
      operationId: deleteGmailV1UsersByUserIdSettingsFiltersById
      x-operation-id-source: derived
components:
  securitySchemes:
    oauth2Auth:
      type: http
      scheme: oauth2