advertising
Get a lead form
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
formIdstring
Query Parameters
accountIdstring
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.ads.getLeadForm({ path: { formId: 'form_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{
"status": "string",
"form": {}
}{
"error": "Unauthorized"
}Create a lead form POST
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.
Archive a lead form DELETE
Meta has no hard delete for forms; this archives the form (status=ARCHIVED).