Create customer lists
Creates the Product Metrics Customer Match lists in the property's Google Ads account, or adopts matching ones, and records them for the property's tracking.
POST /properties/{propertyId}/google-ads/customer-lists
Scope setup · Access Changes data · Operation id google_ads.create_customer_lists
Try it
productmetrics runs after productmetrics login; curl needs PM_TOKEN (see Authentication). Set $PROPERTY_ID first.
productmetrics google-ads create-customer-lists \
--property-id $PROPERTY_ID \
--company-id 2a7d9b3c-1e4f-4a5b-8c6d-7e8f9a0b1c2d \
--jsonResponse
API response (200):
{
"data": {
"status": "complete",
"results": [
{
"kind": "all_customers",
"status": "managed",
"origin": "created",
"user_list_id": "1234567890",
"display_name": "Product Metrics - All customers - Example Store",
"customer_type_categories": [
"ALL_CUSTOMERS"
]
}
]
},
"request_id": "req_01JMZY4A93FQQ66RPHDR1MFT46"
}CLI output: productmetrics google-ads create-customer-lists --json prints { "ok": true, "data": …, "request_id": "…" } with the same data.
Before you call
Requires the property’s Google Ads tracking destination, a Google sign-in allowed to manage the account, and company admin. The Customer Match terms must already be accepted in the Google Ads web interface; otherwise a list fails with customer_match_terms_not_accepted. Safe to repeat. Check the result with google_ads.get_customer_lists.
Path parameters
| Name | Type | Description |
|---|---|---|
propertyId | string (uuid) | The property id, from productmetrics whoami or properties.list (property_id). |
Body
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string (uuid) | Yes | Your workspace id, from productmetrics whoami or properties.list. |
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_01JMZKM1EAC2QKJXKD10FAS00D"
}| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A path, query or body value does not match this page. details.issues lists each location, path and message. |
| 401 | invalid_token | The token is missing, expired or revoked: sign in again (productmetrics login). The WWW-Authenticate header says why. |
| 403 | insufficient_scope | The token lacks the setup scope (details.required_scope): sign in again and allow it. |
| 403 | company_access_denied | You are not an admin of the workspace. |
| 404 | property_not_found | The property does not exist in this workspace. |
| 404 | destination_mapping_not_found | The property has no Google Ads tracking destination yet (tracking.set_scope_destination). |
| 409 | google_authorization_required | The Google Ads connection is missing, inactive or lacks Google Ads access: connect Google again (google.get_connect_link). |
| 409 | google_account_authority_mismatch | The Google sign-in cannot act on this property’s Google Ads account: another person’s sign-in, or a manager (MCC) account. |
| 409 | destination_mapping_authority_mismatch | The tracking destination belongs to another property or Google Ads account. |
| 429 | rate_limited | More than 600 requests a minute for this person: wait the Retry-After seconds (60) and retry. |
| 503 | internal_error | Google Ads or Product Metrics could not be reached: retry later. |