List submitted leads
Lists the leads submitted through your Meta or LinkedIn lead forms, newest first.
Returns submitted Lead Gen leads for your team, newest-first, with keyset pagination on cursor. For Meta (default) leads are served from the persisted cache, ingested in real time from the leadgen webhook. When accountId is a LinkedIn ads account, leads are fetched live from LinkedIn's leadFormResponses (LinkedIn has no webhook and enforces 90-day retention, so nothing is persisted) and adAccountId is required. Reading LinkedIn responses needs the r_marketing_leadgen_automation permission; accounts connected before it was added must reconnect. Requires the Ads add-on.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
Filter to a single lead form.
Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
1 <= value <= 10025Unix seconds; only leads created at/after this timestamp. Millisecond timestamps return 400 with instructions to divide by 1000.
1 <= value <= 253402300799Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
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.leadgen.listLeads();console.log(data);{ "status": "string", "leads": [ { "id": "string", "leadgenId": "string", "formId": "string", "formName": "string", "accountId": "string", "adId": "string", "adsetId": "string", "campaignId": "string", "isOrganic": true, "createdTime": "string", "fields": { "property1": "string", "property2": "string" }, "fieldData": [ {} ], "status": "new", "statusChangedAt": "2019-08-24T14:15:22Z", "value": 0, "currency": "string", "contactId": "string", "firstContactedAt": "2019-08-24T14:15:22Z" } ], "pagination": { "hasMore": true, "cursor": "string" }, "meta": { "lastCheckedAt": "2019-08-24T14:15:22Z", "lastUpdated": "2019-08-24T14:15:22Z" }}List lead forms
Lists the lead forms on a Facebook Page or LinkedIn Company Page. Meta: forms on the connected Facebook Page. Pass either the `metaads` ads connection (the Page is taken from the Facebook account linked to it) or the Facebook account itself. LinkedIn: forms owned by the ad account's Company Page. Pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
Create a lead form
Creates a lead form on a Facebook Page or LinkedIn Company Page to collect contact details from ads. The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where `accountId` may be the `metaads` ads connection (its Page comes from the Facebook account linked to the same profile), an Instagram account (the Page its ads run under: its own linked Page, else the Facebook or business-login Meta ads account on the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.