OverviewProductsPlatformsAPI ReferenceResources
Accounts & Ops

Invite a client account to a manager

POSThttps://zernio.com/api/v1/ads/accounts/manager-links

Invites a Google Ads account to be managed by one of your manager accounts; the link stays pending until the client accepts.

Sends a manager-to-client link invitation from managerCustomerId to clientCustomerId (Google's CustomerClientLinkService).

  • The manager must be one the connection's Google user reaches, directly or under another manager (see GET /v1/ads/accounts/hierarchy).
  • The client can be any Google Ads account.

The link stays PENDING until someone with access to the client accepts it in Google Ads or through PATCH on this path.

Not idempotent: Google refuses a second invitation while one is pending. Send validateOnly: true to have Google check the request without sending anything.

PlatformsGoogle

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

accountIdstringRequired

Google ads SocialAccount id.

managerCustomerIdstringRequired

Manager customer id, digits only.

clientCustomerIdstringRequired

Client customer id to invite, digits only.

Optional parameters1 field
validateOnlybooleanDefault false

Responses

Success· the request worked

Errors· the request failed

Get manager account hierarchy

Shows the Google Ads manager (MCC) and client account tree for a connection, including pending invitations and link status. ### How the tree is built It starts from every customer the Google user behind the connection can access directly and walks each tree to any depth with `customer_client`. It then reads each manager's own client links, so every client carries its direct parent, the `managerLinkId` and the link status. - Invitations a manager sent that the client has not accepted yet appear as clients with `linkStatus: PENDING` (Google returns no name or currency for them). - Refused, canceled and ended links are history and are omitted. - A directly accessible account that is also nested in another tree appears only once, inside that tree. ### Response fields - `managerLinks` (on a root): the managers linked to that account, including invitations it can still accept with PATCH /v1/ads/accounts/manager-links. - `directCustomers`: every account the Google user accesses directly (the ones this connection can accept or decline invitations for) with their pending invitations, including accounts that are also nested in a tree. - `unavailable`: customers Google refuses to read (for example a cancelled account), with Google's reason, instead of failing the call. - `truncated`: true when more exist than the limit. Up to 50 roots and 50 managers per root are read. - `cachedAt` and `stale`: the response is cached for 10 minutes per connection. When the connection is scoped to specific ad accounts, client accounts outside that scope are hidden (managers stay visible).

Accept, decline, cancel or end a manager link

Accepts, declines or cancels a Google Ads manager invitation, or ends an existing manager-client link. Changes one manager-client link, identified by `managerCustomerId`, `clientCustomerId` and `managerLinkId` (all from GET /v1/ads/accounts/hierarchy). ### Actions - `accept` and `decline`: answer a pending invitation as the client (CustomerManagerLinkService). The connection's Google user needs direct access to the client account; access through a manager is not enough, because the link does not exist yet. - `cancel`: withdraws a pending invitation, as the manager (CustomerClientLinkService). - `unlink`: ends an active link, as the manager (CustomerClientLinkService). Send `validateOnly: true` to have Google check the change without applying it.

POST/v1/ads/accounts/manager-links
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaccounts.inviteAdAccountToManager({  body: {    accountId: 'account_abc123',    managerCustomerId: 'managercustomer_abc123',    clientCustomerId: 'clientcustomer_abc123',  },});console.log(data);
{  "managerCustomerId": "string",  "clientCustomerId": "string",  "managerLinkId": "string",  "status": "PENDING",  "validateOnly": true}
OpenAPI specification
Was this page helpful?