Create a lead form
Creates a Lead Gen form on the connected Facebook Page (POST /{page-id}/leadgen_forms). NOT idempotent — a retry creates a second form. Prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. Requires the Ads add-on.
API key authentication - use your Zernio API key as a Bearer token
In: header
length <= 2001 <= itemsurilength <= 70uriuriResponse Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.leadgen.createLeadForm({ body: { accountId: 'account_abc123', name: 'Example', questions: [ { type: 'string', }, ], privacyPolicyUrl: 'https://example.com', },});console.log(data);{
"status": "success",
"form": {
"id": "string",
"name": "string"
}
}{
"error": "Unauthorized"
}List submitted leads GET
Returns persisted Meta Lead Gen leads for your team, newest-first, with keyset pagination on `cursor`. Leads are ingested in real time from the `leadgen` webhook. Requires the Ads add-on.
Create a test lead POST
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.