Zernio
APIFor you
Zernio
APIFor you
API Reference

Accounts & Ops

Accounts

List ad accountsGETCreate ad accountPOSTUpdate ad account settingsPATCHAd account financesGET

Manager Accounts

Get manager account hierarchyGETInvite a client account to a managerPOSTAccept, decline, cancel or end a manager linkPATCH

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 CentersGETA/B tests and lift studiesGETList Instagram ad identitiesGETList Instagram posts to boostGETList advertisable appsGETGet iOS 14 campaign limitsGETList TikTok ad pixelsGET

Labels

List ad labelsGETCreate a Google Ads labelPOSTUpdate a Google Ads labelPATCHRemove a Google Ads labelDELETEAttach a Google Ads labelPOSTDetach a Google Ads labelDELETE

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

Assign a user to an ad accountPOSTAssign a user to a PagePOSTGet ad account billingGETCheck an ad account before creating adsGETRead an ad account's campaigns and ad sets liveGETInvite a user to an ad account by emailPOSTList invitations awaiting multi-party approvalGETList user access invitationsGETAd account usersGETBusiness usersGETPage users of a businessGETRemove a user from an ad accountDELETERemove a user from a PageDELETERevoke a user access invitationDELETESet up ad account billing (monthly invoicing)POSTWithdraw an invitation awaiting multi-party approvalDELETE
Dashboard
OverviewPlatformsAPI ReferenceResources
Accounts & Ops

Check an ad account before creating ads

Checks whether a Meta ad account can run ads right now, with a fix link for each problem.

Reads the account status, the payment method, the account spending limit, the Facebook Page and its Instagram account, the Page's Lead Ads terms, the newest pixel event and the WhatsApp number linked to the Page. Each check reads on its own: one this connection cannot see comes back unknown instead of failing the request.

status is blocked when any check is error (ads will be refused), attention when one is warning, else ok. missing marks an optional asset that is not set up (a pixel, a WhatsApp number): only the ads that need it are affected. A fix.url is either a Meta page or a Zernio dashboard path (starting with /).


PlatformsMeta
GET
/v1/ads/accounts/health

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Query Parameters

accountId*string

Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.

adAccountId*string

Meta ad account id (act_).

Response Body

application/json

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.getAdAccountHealth({  query: {    accountId: 'account_abc123',    adAccountId: 'act_123',  },});console.log(data);
{  "adAccountId": "string",  "status": "ok",  "checkedAt": "2019-08-24T14:15:22Z",  "checks": [    {      "id": "account_status",      "status": "ok",      "title": "string",      "message": "string",      "fix": {        "label": "string",        "url": "string"      }    }  ]}
Was this page helpful?

Get ad account billing

Reads the payments accounts a Google Ads account can be billed to, plus its billing setups and account budgets. Payments accounts come from Google's PaymentsAccountService, read as the manager above the customer: they are the monthly invoicing (consolidated billing) accounts of that manager. An empty `paymentsAccounts` means the manager has no monthly invoicing, so billing cannot be set up through the API and has to be added in Google Ads. Billing setups and account budgets are read live from Google with their status. Results are cached for 10 minutes and dropped on every setup through Zernio.

Read an ad account's campaigns and ad sets live

Reads an ad account's campaigns and ad sets straight from Meta or TikTok, so checks like budget limits see current values. Reads the campaigns and ad sets of one Meta ad account or TikTok advertiser **live from the platform**, so it is cheap enough to run before every write: for example a per-ad-account spend ceiling that must see the current daily / lifetime budget rather than the synced copy. On Meta it is a single Graph call per request (the account's `/campaigns` and `/adsets` edges, filtered by `effective_status`); on TikTok one `campaign/get` and one `adgroup/get` page (TikTok ad groups are returned as `adSets`). **Live vs synced.** GET /v1/ads/campaigns and GET /v1/ads/ad-sets serve Zernio's synced store, refreshed by background sync (typically 15 to 60 minutes behind Meta), and their `live=true` re-reads only the on/off switches of at most 20 objects. This endpoint returns what Meta reports at `readAt`, for every matching campaign and ad set, and stores nothing. Budgets and bid amounts are in whole units of `currency`, the same units as the synced rows (Meta's minor units are converted; TikTok already reports whole units). A campaign with a campaign budget (Meta Advantage+ campaign budget, TikTok campaign budget optimization) carries `budget`; otherwise each ad set carries its own. Each level returns at most `limit` rows. When more match, `paging.<level>.after` is a cursor: pass it back as `after` together with `level` to read the next page of that level only. TikTok pages by number, so a TikTok cursor must be sent with the same `limit` that produced it (another `limit` is a 400). Other platforms answer 501 rather than serving synced data. **TikTok specifics.** `status` maps to TikTok's `primary_status` filter, which takes one value: ACTIVE = delivering (`STATUS_DELIVERY_OK`), PAUSED = switched off (`STATUS_DISABLE`), DELETED = `STATUS_DELETE`; omitted = every status except deleted (`STATUS_NOT_DELETE`, which includes enabled entities that are not delivering, such as an ad group in review). Several values, or IN_PROCESS, WITH_ISSUES, CAMPAIGN_PAUSED and ARCHIVED, are a 400. `budgetRemaining` and `spendCap` are always null (TikTok reports neither), campaign `bidStrategy` is null (TikTok bids per ad group), ad set `bidStrategy` is normalized to the Meta vocabulary like GET /v1/ads, `promotedObject` is `{ pixelId, customEventType, applicationId, customConversionId }` (the keys TikTok has set, as POST /v1/ads/create takes them), and `targeting` holds TikTok's targeting fields verbatim.