Guides
Accounts

Account hierarchy

Manager accounts (MCC) and client accounts, login-customer-id, listAccessibleCustomers, customer_client and createCustomerClient.

In Google Ads, a user has direct access to some accounts. A manager account (MCC) gives access to the client accounts below it. The Google Ads API requires you to say which MCC you are signing in through, in the login-customer-id header.

Access rules

On every customers/{id}/… route:

  1. The id must contain only digits. With hyphens or letters, 400 requestError: INVALID_CUSTOMER_ID.
  2. An unknown account answers 403 authorizationError: USER_PERMISSION_DENIED: Google never confirms that an id exists.
  3. With login-customer-id, the user must have direct access to it, and the target account must be that account or sit below it.
  4. Without the header, the target account must be one with direct access. A client account without the header answers USER_PERMISSION_DENIED with the official message "…the manager's customer ID must be set in the login-customer-id header…".
  5. Accounts that are CANCELED, CLOSED or have an incomplete sign-up answer 403 authorizationError: CUSTOMER_NOT_ENABLED. SUSPENDED accounts accept reads and refuse mutates with ACTION_NOT_PERMITTED_FOR_SUSPENDED_ACCOUNT.
  6. A project at TEST only reaches test accounts: CLOUD_PROJECT_NOT_APPROVED_FOR_PRODUCTION (v25 and v26) or ACTION_NOT_PERMITTED (v23 and v24).

1. Accounts with direct access

bash
curl --url https://google-ads.mimicr.dev/v26/customers:listAccessibleCustomers \
  --header 'Authorization: Bearer <token>'
json
{ "resourceNames": ["customers/6446154552"] }

No login-customer-id. Accounts reached only through the MCC do not show up here. A user without accounts gets {}, because empty lists are omitted.

2. Details of each account

bash
curl --request POST \
  --url https://google-ads.mimicr.dev/v26/customers/6446154552/googleAds:search \
  --header 'Authorization: Bearer <token>' \
  --header 'login-customer-id: 6446154552' \
  --header 'Content-Type: application/json' \
  --data '{ "query": "SELECT customer.id, customer.descriptive_name, customer.currency_code, customer.time_zone, customer.status, customer.manager FROM customer" }'
json
{
  "results": [
    { "customer": { "resourceName": "customers/6446154552", "id": "6446154552", "descriptiveName": "MCC minha-org", "currencyCode": "BRL", "timeZone": "America/Sao_Paulo", "status": "ENABLED", "manager": true } }
  ],
  "fieldMask": "customer.id,customer.descriptiveName,customer.currencyCode,customer.timeZone,customer.status,customer.manager",
  "queryResourceConsumption": "1"
}

3. Clients of the MCC

bash
curl --request POST \
  --url https://google-ads.mimicr.dev/v26/customers/6446154552/googleAds:search \
  --header 'Authorization: Bearer <token>' \
  --header 'login-customer-id: 6446154552' \
  --header 'Content-Type: application/json' \
  --data '{ "query": "SELECT customer_client.id, customer_client.descriptive_name, customer_client.status, customer_client.manager FROM customer_client WHERE customer_client.level > 0" }'

Each row carries customerClient with the client account's id. From there, call customers/{client id}/… with login-customer-id set to the MCC's id. "Conta pendente" shows up as CANCELED and answers CUSTOMER_NOT_ENABLED if you try to query it.

4. Create a client account

bash
curl --request POST \
  --url https://google-ads.mimicr.dev/v26/customers/6446154552:createCustomerClient \
  --header 'Authorization: Bearer <token>' \
  --header 'login-customer-id: 6446154552' \
  --header 'Content-Type: application/json' \
  --data '{ "customerClient": { "descriptiveName": "Revenda Centro", "currencyCode": "BRL", "timeZone": "America/Sao_Paulo" } }'
json
{ "resourceName": "customers/4149401652" }

The new account starts as ENABLED, below the MCC. currencyCode and timeZone are immutable. With emailAddress, the response also carries invitationLink. validateOnly: true only validates.

ErrorWhen
authorizationError: ACTION_NOT_PERMITTEDThe account in the path is not a manager account
currencyCodeError: UNSUPPORTEDInvalid currency
timeZoneError: INVALID_TIME_ZONEInvalid time zone
stringLengthError: TOO_LONGName longer than 255 bytes
customerError: CREATION_DENIED_INELIGIBLE_MCCIneligible MCC ([mcc-inelegivel] trigger in the name)
managerLinkError: TOO_MANY_ACCOUNTSMore than 20 clients in the MCC (limits.clientsPerManager) or [limite-contas] in the name
customerError: CREATION_DENIED_FOR_POLICY_VIOLATION[politica] in the name

Build other trees

On Mimicr's side, customer.create creates accounts (client, sub-MCC or standalone) and user.add creates Google users with direct access to the accounts you specify. customer.set_status and customer.require_signup take an account to the error states above. See Sandbox control.