Zernio
Zernio
API Reference

Accounts & Ops

Accounts

List ad accountsGETCreate Meta ad accountPOSTUpdate ad account settingsPATCHAd account financesGET

Activity

Ad account change / audit logGETList comments on an adGETReply to an ad commentPOSTHide or unhide an ad commentPOSTDelete an ad commentDELETE

Business Assets

Businesses listGETList TikTok Business CentersGETList ad labelsGETA/B tests and lift studiesGETList Instagram ad identitiesGETList advertisable appsGETGet iOS 14 campaign limitsGETList TikTok ad pixelsGET

Extension Assets

List account calloutsGETAdd account calloutsPOSTUpdate account calloutsPUTRemove account calloutDELETEList account sitelinksGETAdd account sitelinksPOSTUpdate account sitelinksPUTRemove account sitelinkDELETEList account snippetsGETAdd account snippetsPOSTUpdate account snippetsPUTRemove account snippetDELETE

Negative Keyword Lists

List negative keyword listsGETCreate a negative keyword listPOSTGet a negative keyword listGETRename a negative keyword listPUTDelete a negative keyword listDELETEReplace negative list keywordsPUT

Custom Conversions

List custom conversionsGETCreate custom conversionPOST

Value Rules

List value rule setsGETCreate a value rule setPOSTRead a value rule setGETReplace a value rule setPUTDelete a value rule setDELETE

Budget Scheduling

List high-demand periodsGETSchedule a budget increasePOST

DSA Compliance

Get ad account DSA defaultsGETGet DSA recommendationsGET

Other

Attach a Google Ads labelPOSTCreate a Google Ads labelPOSTDetach a Google Ads labelDELETEGet manager account hierarchyGETInvite a client account to a managerPOSTList Instagram posts to boostGETRemove a Google Ads labelDELETEAccept, decline, cancel or end a manager linkPATCHUpdate a Google Ads labelPATCH
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Accounts & Ops

Attach a Google Ads label

Attaches the label to campaigns, ad groups, ads and keywords (Google CampaignLabel, AdGroupLabel, AdGroupAdLabel and AdGroupCriterionLabel) in one mutate. Idempotent: a target that already carries the label is counted in unchanged instead of failing the call. All ids are Google's own: ads and keywords use the composite id Google puts in their resource names, {adGroupId}~{adId} and {adGroupId}~{criterionId} (the keyword form is the tail of resourceName on GET /v1/ads/keywords).


PlatformsGoogle
POST
/v1/ads/labels/{labelId}/assignments

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

labelId*string

Google label id

Match^\d+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

At least one id across the four target lists. Up to 1000 ids per list.

Response Body

application/json

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adaccounts.attachAdLabel({  path: {    labelId: 'label_abc123',  },  body: {    accountId: 'account_abc123',  },});console.log(data);
{  "customerId": "string",  "labelId": "string",  "attached": 0,  "unchanged": 0}
Was this page helpful?

Get DSA recommendations

Returns Meta's suggested beneficiary/payor names for an ad account, derived by Meta from the account's recent activity. Useful for prefilling `dsaBeneficiary`/`dsaPayor` inputs, or the defaults sent to `PATCH /v1/ads/accounts`, in your own UI. Meta returns a single flat list. Entries are not labeled as beneficiary or payor, and since these are legal disclosures Zernio never applies them automatically: let your user pick the right entity. The list may be empty for accounts with little activity. Meta accounts only.

Create a Google Ads label

Creates a label on a Google Ads customer. Attach it to campaigns, ad groups, ads and keywords with `POST /v1/ads/labels/{labelId}/assignments`. Label names are unique per customer; a duplicate is a 400.

accountId*string

Zernio SocialAccount id (Google Ads)

adAccountId?string

Google customer id. Required when the connection has multiple customers.

Match^\d+$
customerId?string
Deprecated

Alias of adAccountId

Match^\d+$
campaignIds?array<>

Google campaign ids

Itemsitems <= 1000
adSetIds?array<>

Google ad group ids

Itemsitems <= 1000
adIds?array<>

Google ad group ad ids, {adGroupId}~{adId}

Itemsitems <= 1000
keywordIds?array<>

Google keyword criterion ids, {adGroupId}~{criterionId}

Itemsitems <= 1000