{
  "kind": "discovery#restDescription",
  "description": "The Google Marketing Platform Admin API allows for programmatic access to the Google Marketing Platform configuration data. You can use the Google Marketing Platform Admin API to manage links between your Google Marketing Platform organization and Google Analytics accounts, and to set the service level of your GA4 properties.",
  "revision": "20260806",
  "name": "marketingplatformadmin",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update": {
          "description": "Manage your Google Analytics product account data in GMP home"
        },
        "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read": {
          "description": "View your Google Analytics product account data in GMP home"
        }
      }
    }
  },
  "discoveryVersion": "v1",
  "protocol": "rest",
  "ownerName": "Google",
  "rootUrl": "https://marketingplatformadmin.googleapis.com/",
  "servicePath": "",
  "documentationLink": "https://developers.google.com/analytics/devguides/config/gmp/v1",
  "baseUrl": "https://marketingplatformadmin.googleapis.com/",
  "basePath": "",
  "fullyEncodeReservedExpansion": true,
  "version": "v1alpha",
  "mtlsRootUrl": "https://marketingplatformadmin.mtls.googleapis.com/",
  "batchPath": "batch",
  "title": "Google Marketing Platform Admin API",
  "parameters": {
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query",
      "type": "string"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "quotaUser": {
      "type": "string",
      "location": "query",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "callback": {
      "location": "query",
      "description": "JSONP",
      "type": "string"
    },
    "$.xgafv": {
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "description": "V1 error format.",
      "type": "string",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "prettyPrint": {
      "default": "true",
      "location": "query",
      "description": "Returns response with indentations and line breaks.",
      "type": "boolean"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query",
      "type": "string"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "default": "json"
    },
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    }
  },
  "ownerDomain": "google.com",
  "canonicalName": "Google Marketing Platform Admin API",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "resources": {
    "organizations": {
      "methods": {
        "reportPropertyUsage": {
          "id": "marketingplatformadmin.organizations.reportPropertyUsage",
          "parameterOrder": [
            "organization"
          ],
          "request": {
            "$ref": "ReportPropertyUsageRequest"
          },
          "scopes": [
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
          ],
          "path": "v1alpha/{+organization}:reportPropertyUsage",
          "flatPath": "v1alpha/organizations/{organizationsId}:reportPropertyUsage",
          "httpMethod": "POST",
          "response": {
            "$ref": "ReportPropertyUsageResponse"
          },
          "parameters": {
            "organization": {
              "type": "string",
              "description": "Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id}",
              "location": "path",
              "pattern": "^organizations/[^/]+$",
              "required": true
            }
          },
          "description": "Gets the usage and billing data for properties within the organization for the specified month. Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data. Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only."
        },
        "list": {
          "parameters": {
            "pageToken": {
              "location": "query",
              "description": "Optional. A page token, received from a previous ListOrganizations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListOrganizations` must match the call that provided the page token.",
              "type": "string"
            },
            "pageSize": {
              "description": "Optional. The maximum number of organizations to return in one call. The service may return fewer than this value. If unspecified, at most 50 organizations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
              "location": "query",
              "format": "int32",
              "type": "integer"
            }
          },
          "description": "Returns a list of organizations that the user has access to.",
          "httpMethod": "GET",
          "response": {
            "$ref": "ListOrganizationsResponse"
          },
          "flatPath": "v1alpha/organizations",
          "path": "v1alpha/organizations",
          "scopes": [
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
          ],
          "parameterOrder": [],
          "id": "marketingplatformadmin.organizations.list"
        },
        "findSalesPartnerManagedClients": {
          "id": "marketingplatformadmin.organizations.findSalesPartnerManagedClients",
          "scopes": [
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
          ],
          "path": "v1alpha/{+organization}:findSalesPartnerManagedClients",
          "parameterOrder": [
            "organization"
          ],
          "request": {
            "$ref": "FindSalesPartnerManagedClientsRequest"
          },
          "flatPath": "v1alpha/organizations/{organizationsId}:findSalesPartnerManagedClients",
          "httpMethod": "POST",
          "response": {
            "$ref": "FindSalesPartnerManagedClientsResponse"
          },
          "parameters": {
            "organization": {
              "pattern": "^organizations/[^/]+$",
              "required": true,
              "description": "Required. The name of the sales partner organization. Format: organizations/{org_id}",
              "location": "path",
              "type": "string"
            }
          },
          "description": "Returns a list of clients managed by the sales partner organization. User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients."
        },
        "get": {
          "httpMethod": "GET",
          "response": {
            "$ref": "Organization"
          },
          "flatPath": "v1alpha/organizations/{organizationsId}",
          "parameters": {
            "name": {
              "pattern": "^organizations/[^/]+$",
              "required": true,
              "type": "string",
              "location": "path",
              "description": "Required. The name of the Organization to retrieve. Format: organizations/{org_id}"
            }
          },
          "description": "Looks up a single organization.",
          "id": "marketingplatformadmin.organizations.get",
          "path": "v1alpha/{+name}",
          "scopes": [
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
            "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
          ],
          "parameterOrder": [
            "name"
          ]
        }
      },
      "resources": {
        "analyticsAccountLinks": {
          "methods": {
            "create": {
              "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks",
              "httpMethod": "POST",
              "response": {
                "$ref": "AnalyticsAccountLink"
              },
              "parameters": {
                "parent": {
                  "pattern": "^organizations/[^/]+$",
                  "required": true,
                  "location": "path",
                  "description": "Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id}",
                  "type": "string"
                }
              },
              "description": "Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.",
              "id": "marketingplatformadmin.organizations.analyticsAccountLinks.create",
              "scopes": [
                "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
              ],
              "path": "v1alpha/{+parent}/analyticsAccountLinks",
              "parameterOrder": [
                "parent"
              ],
              "request": {
                "$ref": "AnalyticsAccountLink"
              }
            },
            "list": {
              "id": "marketingplatformadmin.organizations.analyticsAccountLinks.list",
              "parameterOrder": [
                "parent"
              ],
              "path": "v1alpha/{+parent}/analyticsAccountLinks",
              "scopes": [
                "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
                "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
              ],
              "httpMethod": "GET",
              "response": {
                "$ref": "ListAnalyticsAccountLinksResponse"
              },
              "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks",
              "parameters": {
                "pageToken": {
                  "location": "query",
                  "description": "Optional. A page token, received from a previous ListAnalyticsAccountLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAnalyticsAccountLinks` must match the call that provided the page token.",
                  "type": "string"
                },
                "parent": {
                  "pattern": "^organizations/[^/]+$",
                  "required": true,
                  "location": "path",
                  "description": "Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id}",
                  "type": "string"
                },
                "pageSize": {
                  "location": "query",
                  "description": "Optional. The maximum number of Analytics account links to return in one call. The service may return fewer than this value. If unspecified, at most 50 Analytics account links will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
                  "type": "integer",
                  "format": "int32"
                }
              },
              "description": "Lists the Google Analytics accounts link to the specified Google Marketing Platform organization."
            },
            "delete": {
              "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}",
              "httpMethod": "DELETE",
              "response": {
                "$ref": "Empty"
              },
              "parameters": {
                "name": {
                  "description": "Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}",
                  "location": "path",
                  "type": "string",
                  "pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$",
                  "required": true
                }
              },
              "description": "Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link.",
              "id": "marketingplatformadmin.organizations.analyticsAccountLinks.delete",
              "parameterOrder": [
                "name"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
              ],
              "path": "v1alpha/{+name}"
            },
            "setPropertyServiceLevel": {
              "httpMethod": "POST",
              "response": {
                "$ref": "SetPropertyServiceLevelResponse"
              },
              "flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}:setPropertyServiceLevel",
              "parameters": {
                "analyticsAccountLink": {
                  "pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$",
                  "required": true,
                  "type": "string",
                  "description": "Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}",
                  "location": "path"
                }
              },
              "description": "Updates the service level for an Analytics property.",
              "id": "marketingplatformadmin.organizations.analyticsAccountLinks.setPropertyServiceLevel",
              "path": "v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel",
              "scopes": [
                "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
              ],
              "parameterOrder": [
                "analyticsAccountLink"
              ],
              "request": {
                "$ref": "SetPropertyServiceLevelRequest"
              }
            }
          }
        }
      }
    }
  },
  "id": "marketingplatformadmin:v1alpha",
  "schemas": {
    "ReportPropertyUsageRequest": {
      "id": "ReportPropertyUsageRequest",
      "description": "Request message for ReportPropertyUsage RPC.",
      "properties": {
        "month": {
          "type": "string",
          "description": "Required. The target month to list property usages. Format: YYYY-MM. For example, \"2025-05\""
        }
      },
      "type": "object"
    },
    "PropertyUsage": {
      "type": "object",
      "id": "PropertyUsage",
      "description": "Contains the count of events received by the property, along with metadata that influences the volume of `billable` events.",
      "properties": {
        "billableEventCount": {
          "type": "string",
          "format": "int64",
          "description": "The number of events for which the property is billed in the requested month."
        },
        "propertyType": {
          "description": "The subtype of the analytics property. This affects the billable event count.",
          "enum": [
            "ANALYTICS_PROPERTY_TYPE_UNSPECIFIED",
            "ANALYTICS_PROPERTY_TYPE_ORDINARY",
            "ANALYTICS_PROPERTY_TYPE_SUBPROPERTY",
            "ANALYTICS_PROPERTY_TYPE_ROLLUP"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unknown or unspecified property type",
            "Ordinary Google Analytics property",
            "Google Analytics subproperty",
            "Google Analytics rollup property"
          ]
        },
        "totalEventCount": {
          "description": "Total event count that the property received during the requested month.",
          "format": "int64",
          "type": "string"
        },
        "property": {
          "type": "string",
          "description": "The name of the Google Analytics Admin API property resource. Format: analyticsadmin.googleapis.com/properties/{property_id}"
        },
        "accountId": {
          "description": "The ID of the property's parent account.",
          "format": "int64",
          "type": "string"
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the property."
        },
        "serviceLevel": {
          "type": "string",
          "enumDescriptions": [
            "Service level unspecified.",
            "The standard version of Google Analytics.",
            "The premium version of Google Analytics."
          ],
          "enum": [
            "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED",
            "ANALYTICS_SERVICE_LEVEL_STANDARD",
            "ANALYTICS_SERVICE_LEVEL_360"
          ],
          "description": "The service level of the property."
        }
      }
    },
    "ListOrganizationsResponse": {
      "id": "ListOrganizationsResponse",
      "description": "Response message for ListOrganizations RPC.",
      "properties": {
        "organizations": {
          "type": "array",
          "description": "The Organization resource that the user has access to, which includes the org id and display name.",
          "items": {
            "$ref": "Organization"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        }
      },
      "type": "object"
    },
    "Empty": {
      "id": "Empty",
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "properties": {},
      "type": "object"
    },
    "Money": {
      "id": "Money",
      "description": "Represents an amount of money with its currency type.",
      "properties": {
        "currencyCode": {
          "description": "The three-letter currency code defined in ISO 4217.",
          "type": "string"
        },
        "units": {
          "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.",
          "type": "string",
          "format": "int64"
        },
        "nanos": {
          "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "SetPropertyServiceLevelRequest": {
      "type": "object",
      "id": "SetPropertyServiceLevelRequest",
      "description": "Request message for SetPropertyServiceLevel RPC.",
      "properties": {
        "analyticsProperty": {
          "type": "string",
          "description": "Required. The Analytics property to change the ServiceLevel setting. This field is the name of the Google Analytics Admin API property resource. Format: analyticsadmin.googleapis.com/properties/{property_id}"
        },
        "serviceLevel": {
          "type": "string",
          "enumDescriptions": [
            "Service level unspecified.",
            "The standard version of Google Analytics.",
            "The premium version of Google Analytics."
          ],
          "enum": [
            "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED",
            "ANALYTICS_SERVICE_LEVEL_STANDARD",
            "ANALYTICS_SERVICE_LEVEL_360"
          ],
          "description": "Required. The service level to set for this property."
        }
      }
    },
    "AnalyticsAccountLink": {
      "type": "object",
      "id": "AnalyticsAccountLink",
      "description": "A resource message representing the link between a Google Analytics account and a Google Marketing Platform organization.",
      "properties": {
        "displayName": {
          "description": "Output only. The human-readable name for the Analytics account.",
          "type": "string",
          "readOnly": true
        },
        "analyticsAccount": {
          "type": "string",
          "description": "Required. Immutable. The resource name of the AnalyticsAdmin API account. The account ID will be used as the ID of this AnalyticsAccountLink resource, which will become the final component of the resource name. Format: analyticsadmin.googleapis.com/accounts/{account_id}"
        },
        "name": {
          "type": "string",
          "description": "Identifier. Resource name of this AnalyticsAccountLink. Note the resource ID is the same as the ID of the Analtyics account. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} Example: \"organizations/xyz/analyticsAccountLinks/1234\""
        },
        "linkVerificationState": {
          "enumDescriptions": [
            "The link state is unknown.",
            "The link is established.",
            "The link is requested, but hasn't been approved by the product account admin."
          ],
          "type": "string",
          "readOnly": true,
          "enum": [
            "LINK_VERIFICATION_STATE_UNSPECIFIED",
            "LINK_VERIFICATION_STATE_VERIFIED",
            "LINK_VERIFICATION_STATE_NOT_VERIFIED"
          ],
          "description": "Output only. The verification state of the link between the Analytics account and the parent organization."
        }
      }
    },
    "Date": {
      "id": "Date",
      "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp",
      "properties": {
        "year": {
          "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.",
          "type": "integer",
          "format": "int32"
        },
        "day": {
          "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.",
          "type": "integer",
          "format": "int32"
        },
        "month": {
          "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "SetPropertyServiceLevelResponse": {
      "id": "SetPropertyServiceLevelResponse",
      "description": "Response message for SetPropertyServiceLevel RPC.",
      "properties": {},
      "type": "object"
    },
    "BillInfo": {
      "type": "object",
      "id": "BillInfo",
      "description": "Contains the bill amount.",
      "properties": {
        "eventFee": {
          "$ref": "Money",
          "description": "The amount of the event fee."
        },
        "baseFee": {
          "$ref": "Money",
          "description": "The amount of the monthly base fee."
        },
        "priceProtectionCredit": {
          "$ref": "Money",
          "description": "The amount of the price protection credit, this is only available for eligible customers."
        },
        "total": {
          "description": "The total amount of the bill.",
          "$ref": "Money"
        }
      }
    },
    "Organization": {
      "type": "object",
      "id": "Organization",
      "description": "A resource message representing a Google Marketing Platform organization.",
      "properties": {
        "name": {
          "description": "Identifier. The resource name of the GMP organization. Format: organizations/{org_id}",
          "type": "string"
        },
        "displayName": {
          "type": "string",
          "description": "The human-readable name for the organization."
        }
      }
    },
    "FindSalesPartnerManagedClientsResponse": {
      "id": "FindSalesPartnerManagedClientsResponse",
      "description": "Response message for FindSalesPartnerManagedClients RPC.",
      "properties": {
        "clientData": {
          "description": "The clients managed by the sales org.",
          "items": {
            "$ref": "ClientData"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ClientData": {
      "id": "ClientData",
      "description": "Contains the client data.",
      "properties": {
        "organization": {
          "$ref": "Organization",
          "description": "The end client that has/had contract with the requested sales org."
        },
        "startDate": {
          "description": "The start date of the contract between the sales org and the end client.",
          "$ref": "Date"
        },
        "endDate": {
          "description": "The end date of the contract between the sales org and the end client.",
          "$ref": "Date"
        }
      },
      "type": "object"
    },
    "FindSalesPartnerManagedClientsRequest": {
      "type": "object",
      "id": "FindSalesPartnerManagedClientsRequest",
      "description": "Request message for FindSalesPartnerManagedClients RPC.",
      "properties": {
        "isActive": {
          "description": "Optional. If set, only active and just ended clients will be returned.",
          "type": "boolean"
        }
      }
    },
    "ListAnalyticsAccountLinksResponse": {
      "id": "ListAnalyticsAccountLinksResponse",
      "description": "Response message for ListAnalyticsAccountLinks RPC.",
      "properties": {
        "analyticsAccountLinks": {
          "description": "Analytics account links in this organization.",
          "items": {
            "$ref": "AnalyticsAccountLink"
          },
          "type": "array"
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        }
      },
      "type": "object"
    },
    "ReportPropertyUsageResponse": {
      "type": "object",
      "id": "ReportPropertyUsageResponse",
      "description": "Response message for ReportPropertyUsage RPC.",
      "properties": {
        "propertyUsages": {
          "type": "array",
          "description": "Usage data for all properties in the specified organization and month.",
          "items": {
            "$ref": "PropertyUsage"
          }
        },
        "billInfo": {
          "$ref": "BillInfo",
          "description": "Bill amount in the specified organization and month. Will be empty if user only has access to usage data."
        }
      }
    }
  },
  "version_module": true
}
