Zernio
APIFor you
Zernio
APIFor you
API Reference

Lead Gen

List leads for a single formGETList lead formsGETList submitted leadsGETCreate a lead formPOSTCreate a test leadPOSTGet a lead formGETUpdate a lead's statusPATCHDelete a test leadDELETEArchive a lead formDELETECount leads by statusGET
Dashboard
OverviewPlatformsAPI ReferenceResources
Lead Gen

Count leads by status

Counts your team's stored Meta leads per status, for a status filter or a "new leads" badge.

Every status is present, with 0 when no lead has it. Requires the Ads add-on.


PlatformsMeta
GET
/v1/ads/leads/counts

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

Count one connected account only.

campaignId?string

The platform campaign id the leads came from.

Response Body

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.leadgen.countLeads();console.log(data);
{  "status": "string",  "counts": {    "new": 0,    "contacted": 0,    "unreachable": 0,    "qualified": 0,    "converted": 0,    "disqualified": 0  },  "total": 0}
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.

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.