lead gen
Get a lead form
PlatformsMetaLinkedIn
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
formIdstring
Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
Query Parameters
accountIdstring
Connected facebook or linkedin ads account id (selects the platform).
Response Body
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.getLeadForm({ path: { formId: 'form_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{
"status": "string",
"form": {}
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}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.
Archive a lead form DELETE
Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE).