Google Analytics 4 Accounts API

The accounts API from Google Analytics 4 — 18 operation(s) for accounts.

Operations 25

DELETE /v1alpha/accounts/{accountsId} Marks target Account as soft-deleted (ie: "trashed") and returns it #
GET /v1alpha/accounts/{accountsId} Lookup for a single Account #
PATCH /v1alpha/accounts/{accountsId} Updates an account #
GET /v1alpha/accounts/{accountsId}/dataSharingSettings Get data sharing settings on an account #
GET /v1alpha/accounts Returns all accounts accessible by the caller #
POST /v1alpha/accounts:provisionAccountTicket Requests a ticket for creating an account #
POST /v1alpha/accounts/{accountsId}:runAccessReport Returns a customized report of data access records #
POST /v1alpha/accounts/{accountsId}:searchChangeHistoryEvents Searches through all changes to an account or its children given the specified set of filters #
POST /v1alpha/accounts/{accountsId}/accessBindings:batchCreate Creates information about multiple access bindings to an account or property #
POST /v1alpha/accounts/{accountsId}/accessBindings:batchDelete Deletes information about multiple users' links to an account or property #
GET /v1alpha/accounts/{accountsId}/accessBindings:batchGet Gets information about multiple access bindings to an account or property #
POST /v1alpha/accounts/{accountsId}/accessBindings:batchUpdate Updates information about multiple access bindings to an account or property #
POST /v1alpha/accounts/{accountsId}/accessBindings Creates an access binding on an account or property #
GET /v1alpha/accounts/{accountsId}/accessBindings Lists all access bindings on an account or property #
DELETE /v1alpha/accounts/{accountsId}/accessBindings/{accessBindingsId} Deletes an access binding on an account or property #
GET /v1alpha/accounts/{accountsId}/accessBindings/{accessBindingsId} Gets information about an access binding #
PATCH /v1alpha/accounts/{accountsId}/accessBindings/{accessBindingsId} Updates an access binding on an account or property #
DELETE /v1beta/accounts/{accountsId} Marks target Account as soft-deleted (ie: "trashed") and returns it #
GET /v1beta/accounts/{accountsId} Lookup for a single Account #
PATCH /v1beta/accounts/{accountsId} Updates an account #
GET /v1beta/accounts/{accountsId}/dataSharingSettings Get data sharing settings on an account #
GET /v1beta/accounts Returns all accounts accessible by the caller #
POST /v1beta/accounts:provisionAccountTicket Requests a ticket for creating an account #
POST /v1beta/accounts/{accountsId}:runAccessReport Returns a customized report of data access records #
POST /v1beta/accounts/{accountsId}:searchChangeHistoryEvents Searches through all changes to an account or its children given the specified set of filters #

Documentation

Specifications

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-4-accounts-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-4-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Analytics 4 Accounts API
  contact:
    name: Google
    url: http://code.google.com/apis/analytics/docs/mgmt/home.html
  x-discovery-revision: '20260810'
  version: '1.0'
  description: 'Operations tagged accounts across 2 of this provider''s published API definitions: google-analytics-4-admin-v1alpha-openapi.yml, google-analytics-4-admin-v1beta-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://analyticsadmin.googleapis.com
  description: Google Analytics Admin API
security:
- BearerAuth: []
tags:
- name: accounts
paths:
  /v1alpha/accounts/{accountsId}:
    delete:
      operationId: accounts_delete
      summary: 'Marks target Account as soft-deleted (ie: "trashed") and returns it'
      tags:
      - accounts
      description: 'Marks target Account as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.'
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProtobufEmpty'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
      - BearerAuth: []
    get:
      operationId: accounts_get
      summary: Lookup for a single Account
      tags:
      - accounts
      description: Lookup for a single Account.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccount'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
        - analytics.readonly
      - BearerAuth: []
    patch:
      operationId: accounts_patch
      summary: Updates an account
      tags:
      - accounts
      description: Updates an account.
      parameters:
      - name: updateMask
        in: query
        required: false
        schema:
          type: string
          format: google-fieldmask
        description: Required. The list of fields to be updated. Field names must be in snake case (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Identifier. Resource name of this account. Format: accounts/{account} Example: "accounts/100"'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccount'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccount'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/dataSharingSettings:
    get:
      operationId: accounts_getDataSharingSettings
      summary: Get data sharing settings on an account
      tags:
      - accounts
      description: Get data sharing settings on an account. Data sharing settings are singletons.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+/dataSharingSettings$
        description: 'Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: `accounts/1000/dataSharingSettings`'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaDataSharingSettings'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
        - analytics.readonly
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts:
    get:
      operationId: accounts_list
      summary: Returns all accounts accessible by the caller
      tags:
      - accounts
      description: 'Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found. Note: The easiest way to retrieve a list of all properties you have access to is by using `ListAccountSummaries`.'
      parameters:
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          format: int32
        description: Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)
      - name: showDeleted
        in: query
        required: false
        schema:
          type: boolean
        description: 'Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.'
      - name: pageToken
        in: query
        required: false
        schema:
          type: string
        description: Optional. A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaListAccountsResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
        - analytics.readonly
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts:provisionAccountTicket:
    post:
      operationId: accounts_provisionAccountTicket
      summary: Requests a ticket for creating an account
      tags:
      - accounts
      description: Requests a ticket for creating an account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}:runAccessReport:
    post:
      operationId: accounts_runAccessReport
      summary: Returns a customized report of data access records
      tags:
      - accounts
      description: Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.
      parameters:
      - name: entity
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if "123" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if "1234" is your Google Analytics Account ID.
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaRunAccessReportRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaRunAccessReportResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
        - analytics.readonly
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}:searchChangeHistoryEvents:
    post:
      operationId: accounts_searchChangeHistoryEvents
      summary: Searches through all changes to an account or its children given the specified set of filters
      tags:
      - accounts
      description: Searches through all changes to an account or its children given the specified set of filters. Only returns the subset of changes supported by the API. The UI may return additional changes.
      parameters:
      - name: account
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The account resource for which to return change history resources. Format: accounts/{account} Example: `accounts/100`'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/accessBindings:batchCreate:
    post:
      operationId: accounts_accessBindings_batchCreate
      summary: Creates information about multiple access bindings to an account or property
      tags:
      - accounts
      description: Creates information about multiple access bindings to an account or property. This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will be created.
      parameters:
      - name: parent
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The account or property that owns the access bindings. The parent field in the CreateAccessBindingRequest messages must either be empty or match this field. Formats: - accounts/{account} - properties/{property}'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/accessBindings:batchDelete:
    post:
      operationId: accounts_accessBindings_batchDelete
      summary: Deletes information about multiple users' links to an account or property
      tags:
      - accounts
      description: Deletes information about multiple users' links to an account or property.
      parameters:
      - name: parent
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The account or property that owns the access bindings. The parent of all provided values for the ''names'' field in DeleteAccessBindingRequest messages must match this field. Formats: - accounts/{account} - properties/{property}'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProtobufEmpty'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/accessBindings:batchGet:
    get:
      operationId: accounts_accessBindings_batchGet
      summary: Gets information about multiple access bindings to an account or property
      tags:
      - accounts
      description: Gets information about multiple access bindings to an account or property.
      parameters:
      - name: names
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
        description: 'Required. The names of the access bindings to retrieve. A maximum of 1000 access bindings can be retrieved in a batch. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}'
      - name: parent
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The account or property that owns the access bindings. The parent of all provided values for the ''names'' field must match this field. Formats: - accounts/{account} - properties/{property}'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
        - analytics.manage.users.readonly
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/accessBindings:batchUpdate:
    post:
      operationId: accounts_accessBindings_batchUpdate
      summary: Updates information about multiple access bindings to an account or property
      tags:
      - accounts
      description: Updates information about multiple access bindings to an account or property.
      parameters:
      - name: parent
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The account or property that owns the access bindings. The parent of all provided AccessBinding in UpdateAccessBindingRequest messages must match this field. Formats: - accounts/{account} - properties/{property}'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/accessBindings:
    post:
      operationId: accounts_accessBindings_create
      summary: Creates an access binding on an account or property
      tags:
      - accounts
      description: Creates an access binding on an account or property.
      parameters:
      - name: parent
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. Formats: - accounts/{account} - properties/{property}'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccessBinding'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccessBinding'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
      - BearerAuth: []
    get:
      operationId: accounts_accessBindings_list
      summary: Lists all access bindings on an account or property
      tags:
      - accounts
      description: Lists all access bindings on an account or property.
      parameters:
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          format: int32
        description: The maximum number of access bindings to return. The service may return fewer than this value. If unspecified, at most 200 access bindings will be returned. The maximum value is 500; values above 500 will be coerced to 500.
      - name: parent
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. Formats: - accounts/{account} - properties/{property}'
      - name: pageToken
        in: query
        required: false
        schema:
          type: string
        description: A page token, received from a previous `ListAccessBindings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccessBindings` must match the call that provided the page token.
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaListAccessBindingsResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
        - analytics.manage.users.readonly
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1alpha/accounts/{accountsId}/accessBindings/{accessBindingsId}:
    delete:
      operationId: accounts_accessBindings_delete
      summary: Deletes an access binding on an account or property
      tags:
      - accounts
      description: Deletes an access binding on an account or property.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+/accessBindings/[^/]+$
        description: 'Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}'
      - name: accessBindingsId
        in: path
        required: true
        schema:
          type: string
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProtobufEmpty'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
      - BearerAuth: []
    get:
      operationId: accounts_accessBindings_get
      summary: Gets information about an access binding
      tags:
      - accounts
      description: Gets information about an access binding.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+/accessBindings/[^/]+$
        description: 'Required. The name of the access binding to retrieve. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}'
      - name: accessBindingsId
        in: path
        required: true
        schema:
          type: string
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccessBinding'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
        - analytics.manage.users.readonly
      - BearerAuth: []
    patch:
      operationId: accounts_accessBindings_patch
      summary: Updates an access binding on an account or property
      tags:
      - accounts
      description: Updates an access binding on an account or property.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+/accessBindings/[^/]+$
        description: 'Output only. Resource name of this binding. Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding} Example: "accounts/100/accessBindings/200"'
      - name: accessBindingsId
        in: path
        required: true
        schema:
          type: string
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccessBinding'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1alphaAccessBinding'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.manage.users
      - BearerAuth: []
    servers:
    - url: https://analyticsadmin.googleapis.com
      description: Google Analytics Admin API
  /v1beta/accounts/{accountsId}:
    delete:
      operationId: accounts_delete
      summary: 'Marks target Account as soft-deleted (ie: "trashed") and returns it'
      tags:
      - accounts
      description: 'Marks target Account as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.'
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProtobufEmpty'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
      - BearerAuth: []
    get:
      operationId: accounts_get
      summary: Lookup for a single Account
      tags:
      - accounts
      description: Lookup for a single Account.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"'
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAnalyticsAdminV1betaAccount'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - OAuth2:
        - analytics.edit
        - analytics.readonly
      - BearerAuth: []
    patch:
      operationId: accounts_patch
      summary: Updates an account
      tags:
      - accounts
      description: Updates an account.
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          pattern: ^accounts/[^/]+$
        description: 'Identifier. Resource name of this account. Format: accounts/{account} Example: "accounts/100"'
      - name: updateMask
        in: query
        required: false
        schema:
          type: string
          format: google-fieldmask
        description: Required. The list of fields to be updated. Field names must be in snake case (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAnalyticsAdminV1betaAccount'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components

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