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 billingGETRead 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

List ad accounts

Lists the ad accounts a connection can manage, such as Meta ad accounts, TikTok advertisers or Google Ads customers.

Returns the platform ad accounts available for the given account (e.g. Meta ad accounts, TikTok advertiser IDs, Google Ads customer IDs). Meta business-login accounts use their own system-user token. Fresh Meta discovery includes businessId and businessName from the owning Business Manager when available; cached entries gain these fields after the next discovery refresh.

For TikTok agencies: enumerates every advertiser under every Business Center the token can read (paginated server-side), then chunks the lookup against TikTok's /advertiser/info/ endpoint (which has a per-call cap of ≤100 IDs). Solo advertisers without a BC fall back to the OAuth-time advertiser_ids list. Cached for 1h on the SocialAccount; lazy-refreshed on first call after expiry.

For Google Ads: responds 429 when Google's API quota is temporarily exhausted (instead of an empty list). Retry after a delay.

For Reddit Ads (redditads): every Reddit ad account the connected Reddit user can reach, with businessId, approvalStatus (Reddit's admin_approval), timezone and type.

Every listed ad account carries selected: whether it is in the connection's ad-account selection (the ad accounts picked at connect time or in the dashboard picker, the ones Zernio syncs). On a connection without a selection every ad account is selected: true. Writes through /v1/ads endpoints to an ad account with selected: false answer 403 ad_account_not_selected; add it to the selection first (dashboard picker, or GET /v1/connect/{platform}/ads with adAccountIds). The list includes unselected ad accounts by default; pass inScopeOnly=true to get only the ones this connection can use.


PlatformsMetaGoogleTikTokLinkedInPinterestX
GET
/v1/ads/accounts

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

Account ID

adAccountId?string

Filter response to a single platform ad account ID (e.g. act_123 for Meta, advertiser_id for TikTok). Returns at most one item.

limit?integer

Clamp the returned accounts[] length. Useful for typeahead pickers on agency tokens with hundreds of advertisers.

Range1 <= value <= 1000
inScopeOnly?boolean

true returns only the ad accounts this connection accepts as adAccountId on the other /v1/ads endpoints, i.e. those inside its ad-account selection (every item then has selected: true). Without it, every ad account the login can reach is listed and selected flags selection membership. On Meta, LinkedIn, X and Reddit it drops the ad accounts with selected: false; a connection without a selection keeps them all. On Google Ads it also drops customers the login reaches that are not on this connection (for example ones selected on another connection of the same login), which those endpoints answer with a 400. TikTok and Pinterest have no selection, so the list is unchanged.

Defaultfalse

Response Body

application/json

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.listAdAccounts({  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "accounts": [    {      "id": "string",      "name": "string",      "currency": "string",      "businessId": "string",      "businessName": "string",      "status": "string",      "accountStatus": null,      "approvalStatus": "string",      "timezone": "string",      "type": "string",      "disableReason": 0,      "balance": 0,      "cashBalance": 0,      "grantBalance": 0,      "timezoneName": "string",      "timezoneOffsetHoursUtc": 0,      "minimumDailyBudget": 0,      "fundingSource": "string",      "fundingSourceDetails": {        "id": "string",        "displayString": "string",        "type": 0      },      "billingStatus": "ok",      "selectable": true,      "unusableReason": "string",      "selected": true    }  ],  "cachedAt": "2019-08-24T14:15:22Z",  "stale": true}
Was this page helpful?

Archive a lead form

Archives a lead form so it can no longer be used (neither Meta nor LinkedIn allows deleting one). Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE). Meta forms must belong to the Page the accountId manages.

Create ad account

Creates a new Meta ad account in the user's own business portfolio, or a Google Ads client account under a manager (MCC) account the connection reaches. Billing must then be set up on the platform. **Meta** (omit `platform` or send `meta`). Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. The Meta flow has no validateOnly or dry-run option. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call. **Google** (send `platform: google`). Google only creates accounts through a manager account, so the new client account is created under `managerCustomerId`, which must be a manager the Google user behind the googleads `accountId` reaches (directly or as a sub-manager). List them with GET /v1/ads/accounts/hierarchy. Whose manager it is (the integrator's or the end user's) is the caller's choice: pass the connection that reaches it. `currency` (ISO 4217) and `timeZone` (IANA name, for example Europe/Madrid) cannot be changed after creation. The account starts without billing: set it up in Google Ads before ads can serve. Google caps how many accounts a manager can create and how many active client accounts it can hold. The new customer is added to the connection (and to a scoped connection's allowlist), discovery is nudged immediately, and the returned adAccountId works with every other ads endpoint. `validateOnly: true` asks Google to validate the request without creating anything and returns 200. A real create is not idempotent: after a 502 with details.creationStatus=unknown, check the manager in Google Ads before trying again.