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 formDELETE
Dashboard
OverviewPlatformsAPI ReferenceResources
Lead Gen

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.


PlatformsMetaLinkedIn
DELETE
/v1/ads/lead-forms/{formId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

formId*string

Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).

Query Parameters

accountId*string

Connected Meta ads, facebook, instagram or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile; an Instagram account uses the Page its ads run under (its own linked Page, else the Facebook or business-login Meta ads account on the same profile).

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.leadgen.archiveLeadForm({  path: {    formId: 'form_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "status": "string",  "formId": "string",  "archived": true}
Was this page helpful?

Delete a test lead

Deletes the test lead on a Meta lead form so you can submit a new one (Meta allows only one at a time). Removes a test lead created for the form (DELETE /{leadgen_id}), so a new one can be submitted: Meta keeps one test lead per form and refuses a second until the first is gone. The same test lead appears in Meta's Lead Ads Testing Tool. Meta only deletes test leads; a real lead is refused.

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.