Skip to content
Google Ads

Connect a Google Ads account

Creates a property in the workspace for one Google Ads account and connects it; this is how a property comes into existence.

POST /companies/{companyId}/google-ads/property-connections

Scope setup · Access Changes data · Operation id google_ads.create_property_connection

Try it

productmetrics runs after productmetrics login; curl needs PM_TOKEN (see Authentication). Set $COMPANY_ID first.

productmetrics google-ads create-property-connection \
  --company-id $COMPANY_ID \
  --connection-mode central_read_only \
  --customer-id 1234567890 \
  --json

Response

API response (200):

{
  "data": {
    "propertyId": "8c1f4d2e-7a3b-4c5d-9e6f-0a1b2c3d4e5f",
    "companyId": "2a7d9b3c-1e4f-4a5b-8c6d-7e8f9a0b1c2d",
    "customerId": "1234567890",
    "displayName": "Example Store",
    "currencyCode": "EUR",
    "timeZone": "Europe/Amsterdam",
    "connectionMode": "central_read_only",
    "status": "active",
    "principalLabel": "Google OAuth user",
    "verifiedAt": "2026-11-02T09:30:00.000Z"
  },
  "request_id": "req_01JTAF4QSK05SE37N9N6VZR4RH"
}

CLI output: productmetrics google-ads create-property-connection --json prints { "ok": true, "data": …, "request_id": "…" } with the same data.

Before you call

Product Metrics verifies the account first. With user_oauth the person’s own Google sign-in must reach customer_id (see google_ads.list_accounts). With central_read_only the account must first accept the manager-link invite from google_ads.send_invite. Manager (MCC) accounts are refused. Needs company admin. A 409 says what is missing (invite not accepted yet, Google sign-in to redo). Next: connect Merchant Center with merchant_center.create_connection.

Path parameters

NameTypeDescription
companyIdstring (uuid)Your workspace id, from productmetrics whoami or properties.list (company_id).

Body

NameTypeRequiredDescription
connection_modeenumYescentral_read_only: Product Metrics’ manager account sends an invite; user_oauth: the person’s own Google sign-in. One of central_read_only, user_oauth.
customer_idstringYesThe Google Ads customer id, 10 digits without dashes.
login_customer_idstringNoThe manager (MCC) account id to sign in through, 10 digits; leave it out for a direct account.
namestringNoThe property’s name in Product Metrics, usually the store or account name. 1 to 120 characters.

Errors

A failure answers with its HTTP status and { error: { code, message, details? }, request_id }. Branch on code (stable, lower_snake); show message to the person. The CLI prints the same error with "ok": false.

{
  "error": {
    "code": "insufficient_scope",
    "message": "This operation needs the setup scope; connect again and allow it.",
    "details": {
      "required_scope": "setup"
    }
  },
  "request_id": "req_01J28W4BYNJ7X2V56M5PBXV60G"
}
StatusCodeWhen
400invalid_requestA path, query or body value does not match this page. details.issues lists each location, path and message.
401invalid_tokenThe token is missing, expired or revoked: sign in again (productmetrics login). The WWW-Authenticate header says why.
403insufficient_scopeThe token lacks the setup scope (details.required_scope): sign in again and allow it.
404not_foundAn id in the path does not exist, or the signed-in person cannot open it.
409conflictA 409 says what is missing (invite not accepted yet, Google sign-in to redo).
429rate_limitedMore than 600 requests a minute for this person: wait the Retry-After seconds (60) and retry.

All Google Ads operations