Zernio
Zernio
API Reference

Lead Gen

List leads for a single formGETList lead formsGETList submitted leadsGETCreate a lead formPOSTCreate a test leadPOSTGet a lead formGETArchive a lead formDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Lead Gen

Create a lead form

Creates a Lead Gen form. 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); 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.


PlatformsMetaLinkedIn
POST
/v1/ads/lead-forms

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication - use your Zernio API key as a Bearer token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

{  "status": "string",  "form": {    "id": "string",    "name": "string"  }}
Was this page helpful?

List submitted leads

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.

Create a test lead

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.

accountId*string
name*string
Lengthlength <= 200
questions?array<>
Deprecated

Deprecated (Meta legacy shape): use platformSpecificData.questions.

Items1 <= items
privacyPolicyUrl*string
Formaturi
privacyPolicyLinkText?string
Deprecated

Deprecated: use platformSpecificData.privacyPolicyLinkText.

Lengthlength <= 70
followUpActionUrl?string
Deprecated

Deprecated: use platformSpecificData.followUpActionUrl.

Formaturi
locale?string
Deprecated

Deprecated: use platformSpecificData.locale.

thankYouTitle?string
Deprecated

Deprecated: use platformSpecificData.thankYouTitle.

thankYouBody?string
Deprecated

Deprecated: use platformSpecificData.thankYouBody.

thankYouButtonText?string
Deprecated

Deprecated: use platformSpecificData.thankYouButtonText.

thankYouButtonType?string
Deprecated

Deprecated: use platformSpecificData.thankYouButtonType.

thankYouWebsiteUrl?string
Deprecated

Deprecated: use platformSpecificData.thankYouWebsiteUrl.

Formaturi
isOptimizedForQuality?boolean
Deprecated

Deprecated: use platformSpecificData.isOptimizedForQuality.

platformSpecificData?|

Form content; the shape is selected by the accountId's platform. Unknown fields are a 400 (strict-parsed).