{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.read": {
"description": "View your Google Analytics product account data in GMP home"
},
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update": {
"description": "Manage your Google Analytics product account data in GMP home"
}
}
}
},
"basePath": "",
"baseUrl": "https://marketingplatformadmin.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Google Marketing Platform Admin API",
"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.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/analytics/devguides/config/gmp/v1",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "marketingplatformadmin:v1alpha",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://marketingplatformadmin.mtls.googleapis.com/",
"name": "marketingplatformadmin",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"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": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"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.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"organizations": {
"methods": {
"findSalesPartnerManagedClients": {
"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.",
"flatPath": "v1alpha/organizations/{organizationsId}:findSalesPartnerManagedClients",
"httpMethod": "POST",
"id": "marketingplatformadmin.organizations.findSalesPartnerManagedClients",
"parameterOrder": [
"organization"
],
"parameters": {
"organization": {
"description": "Required. The name of the sales partner organization. Format: organizations/{org_id}",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+organization}:findSalesPartnerManagedClients",
"request": {
"$ref": "FindSalesPartnerManagedClientsRequest"
},
"response": {
"$ref": "FindSalesPartnerManagedClientsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
},
"get": {
"description": "Looks up a single organization.",
"flatPath": "v1alpha/organizations/{organizationsId}",
"httpMethod": "GET",
"id": "marketingplatformadmin.organizations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the Organization to retrieve. Format: organizations/{org_id}",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+name}",
"response": {
"$ref": "Organization"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
},
"list": {
"description": "Returns a list of organizations that the user has access to.",
"flatPath": "v1alpha/organizations",
"httpMethod": "GET",
"id": "marketingplatformadmin.organizations.list",
"parameterOrder": [],
"parameters": {
"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.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"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.",
"location": "query",
"type": "string"
}
},
"path": "v1alpha/organizations",
"response": {
"$ref": "ListOrganizationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
},
"reportPropertyUsage": {
"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.",
"flatPath": "v1alpha/organizations/{organizationsId}:reportPropertyUsage",
"httpMethod": "POST",
"id": "marketingplatformadmin.organizations.reportPropertyUsage",
"parameterOrder": [
"organization"
],
"parameters": {
"organization": {
"description": "Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id}",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+organization}:reportPropertyUsage",
"request": {
"$ref": "ReportPropertyUsageRequest"
},
"response": {
"$ref": "ReportPropertyUsageResponse"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
}
},
"resources": {
"analyticsAccountLinks": {
"methods": {
"create": {
"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.",
"flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks",
"httpMethod": "POST",
"id": "marketingplatformadmin.organizations.analyticsAccountLinks.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id}",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+parent}/analyticsAccountLinks",
"request": {
"$ref": "AnalyticsAccountLink"
},
"response": {
"$ref": "AnalyticsAccountLink"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
},
"delete": {
"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.",
"flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}",
"httpMethod": "DELETE",
"id": "marketingplatformadmin.organizations.analyticsAccountLinks.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}",
"location": "path",
"pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
},
"list": {
"description": "Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.",
"flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks",
"httpMethod": "GET",
"id": "marketingplatformadmin.organizations.analyticsAccountLinks.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"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.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"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.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id}",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+parent}/analyticsAccountLinks",
"response": {
"$ref": "ListAnalyticsAccountLinksResponse"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.read",
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
},
"setPropertyServiceLevel": {
"description": "Updates the service level for an Analytics property.",
"flatPath": "v1alpha/organizations/{organizationsId}/analyticsAccountLinks/{analyticsAccountLinksId}:setPropertyServiceLevel",
"httpMethod": "POST",
"id": "marketingplatformadmin.organizations.analyticsAccountLinks.setPropertyServiceLevel",
"parameterOrder": [
"analyticsAccountLink"
],
"parameters": {
"analyticsAccountLink": {
"description": "Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}",
"location": "path",
"pattern": "^organizations/[^/]+/analyticsAccountLinks/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel",
"request": {
"$ref": "SetPropertyServiceLevelRequest"
},
"response": {
"$ref": "SetPropertyServiceLevelResponse"
},
"scopes": [
"https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"
]
}
}
}
}
}
},
"revision": "20260303",
"rootUrl": "https://marketingplatformadmin.googleapis.com/",
"schemas": {
"AnalyticsAccountLink": {
"description": "A resource message representing the link between a Google Analytics account and a Google Marketing Platform organization.",
"id": "AnalyticsAccountLink",
"properties": {
"analyticsAccount": {
"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}",
"type": "string"
},
"displayName": {
"description": "Output only. The human-readable name for the Analytics account.",
"readOnly": true,
"type": "string"
},
"linkVerificationState": {
"description": "Output only. The verification state of the link between the Analytics account and the parent organization.",
"enum": [
"LINK_VERIFICATION_STATE_UNSPECIFIED",
"LINK_VERIFICATION_STATE_VERIFIED",
"LINK_VERIFICATION_STATE_NOT_VERIFIED"
],
"enumDescriptions": [
"The link state is unknown.",
"The link is established.",
"The link is requested, but hasn't been approved by the product account admin."
],
"readOnly": true,
"type": "string"
},
"name": {
"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\"",
"type": "string"
}
},
"type": "object"
},
"BillInfo": {
"description": "Contains the bill amount.",
"id": "BillInfo",
"properties": {
"baseFee": {
"$ref": "Money",
"description": "The amount of the monthly base fee."
},
"eventFee": {
"$ref": "Money",
"description": "The amount of the event fee."
},
"priceProtectionCredit": {
"$ref": "Money",
"description": "The amount of the price protection credit, this is only available for eligible customers."
},
"total": {
"$ref": "Money",
"description": "The total amount of the bill."
}
},
"type": "object"
},
"ClientData": {
"description": "Contains the client data.",
"id": "ClientData",
"properties": {
"endDate": {
"$ref": "Date",
"description": "The end date of the contract between the sales org and the end client."
},
"organization": {
"$ref": "Organization",
"description": "The end client that has/had contract with the requested sales org."
},
"startDate": {
"$ref": "Date",
"description": "The start date of the contract between the sales org and the end client."
}
},
"type": "object"
},
"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",
"id": "Date",
"properties": {
"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.",
"format": "int32",
"type": "integer"
},
"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"
},
"year": {
"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"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); }",
"id": "Empty",
"properties": {},
"type": "object"
},
"FindSalesPartnerManagedClientsRequest": {
"description": "Request message for FindSalesPartnerManagedClients RPC.",
"id": "FindSalesPartnerManagedClientsRequest",
"properties": {
"isActive": {
"description": "Optional. If set, only active and just ended clients will be returned.",
"type": "boolean"
}
},
"type": "object"
},
"FindSalesPartnerManagedClientsResponse": {
"description": "Response message for FindSalesPartnerManagedClients RPC.",
"id": "FindSalesPartnerManagedClientsResponse",
"properties": {
"clientData": {
"description": "The clients managed by the sales org.",
"items": {
"$ref": "ClientData"
},
"type": "array"
}
},
"type": "object"
},
"ListAnalyticsAccountLinksResponse": {
"description": "Response message for ListAnalyticsAccountLinks RPC.",
"id": "ListAnalyticsAccountLinksResponse",
"properties": {
"analyticsAccountLinks": {
"description": "Analytics account links in this organization.",
"items": {
"$ref": "AnalyticsAccountLink"
},
"type": "array"
},
"nextPageToken": {
"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": "string"
}
},
"type": "object"
},
"ListOrganizationsResponse": {
"description": "Response message for ListOrganizations RPC.",
"id": "ListOrganizationsResponse",
"properties": {
"nextPageToken": {
"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": "string"
},
"organizations": {
"description": "The Organization resource that the user has access to, which includes the org id and display name.",
"items": {
"$ref": "Organization"
},
"type": "array"
}
},
"type": "object"
},
"Money": {
"description": "Represents an amount of money with its currency type.",
"id": "Money",
"properties": {
"currencyCode": {
"description": "The three-letter currency code defined in ISO 4217.",
"type": "string"
},
"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"
},
"units": {
"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"Organization": {
"description": "A resource message representing a Google Marketing Platform organization.",
"id": "Organization",
"properties": {
"displayName": {
"description": "The human-readable name for the organization.",
"type": "string"
},
"name": {
"description": "Identifier. The resource name of the GMP organization. Format: organizations/{org_id}",
"type": "string"
}
},
"type": "object"
},
"PropertyUsage": {
"description": "Contains the count of events received by the property, along with metadata that influences the volume of `billable` events.",
"id": "PropertyUsage",
"properties": {
"accountId": {
"description": "The ID of the property's parent account.",
"format": "int64",
"type": "string"
},
"billableEventCount": {
"description": "The number of events for which the property is billed in the requested month.",
"format": "int64",
"type": "string"
},
"displayName": {
"description": "The display name of the property.",
"type": "string"
},
"property": {
"description": "The name of the Google Analytics Admin API property resource. Format: analyticsadmin.googleapis.com/properties/{property_id}",
"type": "string"
},
"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"
],
"enumDescriptions": [
"Unknown or unspecified property type",
"Ordinary Google Analytics property",
"Google Analytics subproperty",
"Google Analytics rollup property"
],
"type": "string"
},
"serviceLevel": {
"description": "The service level of the property.",
"enum": [
"ANALYTICS_SERVICE_LEVEL_UNSPECIFIED",
"ANALYTICS_SERVICE_LEVEL_STANDARD",
"ANALYTICS_SERVICE_LEVEL_360"
],
"enumDescriptions": [
"Service level unspecified.",
"The standard version of Google Analytics.",
"The premium version of Google Analytics."
],
"type": "string"
},
"totalEventCount": {
"description": "Total event count that the property received during the requested month.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"ReportPropertyUsageRequest": {
"description": "Request message for ReportPropertyUsage RPC.",
"id": "ReportPropertyUsageRequest",
"properties": {
"month": {
"description": "Required. The target month to list property usages. Format: YYYY-MM. For example, \"2025-05\"",
"type": "string"
}
},
"type": "object"
},
"ReportPropertyUsageResponse": {
"description": "Response message for ReportPropertyUsage RPC.",
"id": "ReportPropertyUsageResponse",
"properties": {
"billInfo": {
"$ref": "BillInfo",
"description": "Bill amount in the specified organization and month. Will be empty if user only has access to usage data."
},
"propertyUsages": {
"description": "Usage data for all properties in the specified organization and month.",
"items": {
"$ref": "PropertyUsage"
},
"type": "array"
}
},
"type": "object"
},
"SetPropertyServiceLevelRequest": {
"description": "Request message for SetPropertyServiceLevel RPC.",
"id": "SetPropertyServiceLevelRequest",
"properties": {
"analyticsProperty": {
"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}",
"type": "string"
},
"serviceLevel": {
"description": "Required. The service level to set for this property.",
"enum": [
"ANALYTICS_SERVICE_LEVEL_UNSPECIFIED",
"ANALYTICS_SERVICE_LEVEL_STANDARD",
"ANALYTICS_SERVICE_LEVEL_360"
],
"enumDescriptions": [
"Service level unspecified.",
"The standard version of Google Analytics.",
"The premium version of Google Analytics."
],
"type": "string"
}
},
"type": "object"
},
"SetPropertyServiceLevelResponse": {
"description": "Response message for SetPropertyServiceLevel RPC.",
"id": "SetPropertyServiceLevelResponse",
"properties": {},
"type": "object"
}
},
"servicePath": "",
"title": "Google Marketing Platform Admin API",
"version": "v1alpha",
"version_module": true
}