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). Requires the Ads add-on.
NOT idempotent: a retry creates a second form.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Body
application/jsonWhat every request needs
Optional parameters11 fields
Deprecated (Meta legacy shape): use platformSpecificData.questions.
EMAIL, PHONE, FULL_NAME, FIRST_NAME, LAST_NAME, CUSTOM, …
Deprecated: use platformSpecificData.privacyPolicyLinkText.
Deprecated: use platformSpecificData.followUpActionUrl.
Deprecated: use platformSpecificData.locale.
Deprecated: use platformSpecificData.thankYouTitle.
Deprecated: use platformSpecificData.thankYouBody.
Deprecated: use platformSpecificData.thankYouButtonText.
Deprecated: use platformSpecificData.thankYouButtonType.
Deprecated: use platformSpecificData.thankYouWebsiteUrl.
Deprecated: use platformSpecificData.isOptimizedForQuality.
Form content; the shape is selected by the accountId's platform. Unknown fields are a 400 (strict-parsed).
Responses
Success· the request worked
Errors· the request failed
How it behaves
Meta
Created on the connected Facebook Page (POST /{page-id}/leadgen_forms). accountId may be:
- the
metaadsads 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)
- 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.
thankYouEnableMessenger, isPhoneSmsVerifyEnabled and customDisclaimer are accepted only inside platformSpecificData (top-level is a 400).
Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both.
LinkedIn
Created on the ad account's Company Page. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only).
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`. Requires the Ads add-on. ### Meta (default) Leads are served from the persisted cache, ingested in real time from the `leadgen` webhook. ### LinkedIn When `accountId` is a LinkedIn ads account, `adAccountId` is required. Leads are fetched live from LinkedIn's `leadFormResponses`: LinkedIn has no webhook and enforces 90-day retention, so nothing is persisted. Reading LinkedIn responses needs the `r_marketing_leadgen_automation` permission. Accounts connected before it was added must reconnect.
Create a test lead
Submits a test lead to a Meta lead form so you can check your lead retrieval without running ads. Submits a test lead against the form (POST /{form-id}/test_leads) to exercise retrieval without waiting for real ad impressions. Meta allows one test lead per form at a time.