Google Analytics User Deletion API

The User Deletion API from Google Analytics — 1 operation(s) for user deletion.

Operations 1

POST /userDeletion/userDeletionRequests:upsert Google Analytics Insert or Update a User Deletion Request #

Documentation

📖
Documentation
https://developers.google.com/analytics/devguides/reporting/data/v1
📖
APIReference
https://developers.google.com/analytics/devguides/reporting/data/v1/rest
📖
GettingStarted
https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart
📖
Authentication
https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries
📖
RateLimits
https://developers.google.com/analytics/devguides/reporting/data/v1/quotas
📖
Documentation
https://developers.google.com/analytics/devguides/config/admin/v1
📖
APIReference
https://developers.google.com/analytics/devguides/config/admin/v1/rest
📖
GettingStarted
https://developers.google.com/analytics/devguides/config/admin/v1/quickstart
📖
Documentation
https://developers.google.com/analytics/devguides/collection/protocol/ga4
📖
APIReference
https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference
📖
GettingStarted
https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events
📖
Troubleshooting
https://developers.google.com/analytics/devguides/collection/protocol/ga4/troubleshooting
📖
Documentation
https://developers.google.com/analytics/devguides/config/userdeletion/v3
📖
APIReference
https://developers.google.com/analytics/devguides/config/userdeletion/v3/reference
📖
Authentication
https://developers.google.com/analytics/devguides/config/userdeletion/v3/authorization
📖
Documentation
https://developers.google.com/analytics/devguides/reporting/core/v4
📖
GettingStarted
https://developers.google.com/analytics/devguides/migration/api/reporting-ua-to-ga4
📖
Documentation
https://developers.google.com/analytics/devguides/config/mgmt/v3
📖
APIReference
https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference

Specifications

Code Examples

Other Resources

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-analytics-user-deletion-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

google-analytics-user-deletion-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Analytics User Deletion API
  description: The Google Analytics User Deletion API enables removal of data linked to specific user identifiers, supporting compliance with data protection and privacy requirements such as GDPR. Supports deletion by CLIENT_ID, USER_ID, and APP_INSTANCE_ID. Data appears in Individual User Reports within 72 hours and complete deletion occurs during bimonthly processes.
  version: v3
  contact:
    name: Google Analytics
    url: https://developers.google.com/analytics
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/analytics/terms
  x-logo:
    url: https://www.google.com/analytics/images/google-analytics-logo.png
servers:
- url: https://www.googleapis.com/analytics/v3
  description: Google Analytics API v3
tags:
- name: User Deletion
paths:
  /userDeletion/userDeletionRequests:upsert:
    post:
      operationId: upsertUserDeletionRequest
      summary: Google Analytics Insert or Update a User Deletion Request
      description: Inserts or updates a user deletion request. Submitting a deletion request for a user that already has a pending request will update the existing request. The User Deletion API does not remove data from reports based on previously aggregated data or exported datasets like BigQuery.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDeletionRequest'
      responses:
        '200':
          description: Successful user deletion request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDeletionRequest'
        '400':
          description: Invalid request - malformed body or invalid ID type
        '401':
          description: Authentication required
        '403':
          description: Insufficient permissions - missing required OAuth scope
      security:
      - oauth2:
        - https://www.googleapis.com/auth/analytics.user.deletion
      tags:
      - User Deletion
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    UserDeletionId:
      type: object
      required:
      - type
      - userId
      properties:
        type:
          type: string
          description: The type of user identifier.
          enum:
          - CLIENT_ID
          - USER_ID
          - APP_INSTANCE_ID
          example: CLIENT_ID
        userId:
          type: string
          description: The actual user identifier value corresponding to the specified type.
          example: '123456'
    UserDeletionRequest:
      type: object
      required:
      - id
      properties:
        kind:
          type: string
          description: Resource type identifier.
          default: analytics#userDeletionRequest
          readOnly: true
          example: example_value
        id:
          $ref: '#/components/schemas/UserDeletionId'
        webPropertyId:
          type: string
          description: The Web Property ID for a Universal Analytics property. Required for Universal Analytics properties.
          example: '123456'
        firebaseProjectId:
          type: string
          description: The Firebase Project ID. Required for app streams using APP_INSTANCE_ID.
          example: '123456'
        propertyId:
          type: string
          description: The GA4 property ID.
          example: '123456'
        deletionRequestTime:
          type: string
          format: date-time
          description: The time when the deletion request was submitted. Set by the server.
          readOnly: true
          example: '2026-04-17T12:00:00Z'
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/analytics.user.deletion: Delete user data from Google Analytics
externalDocs:
  description: User Deletion API documentation
  url: https://developers.google.com/analytics/devguides/config/userdeletion/v3