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