OverviewProductsPlatformsAPI ReferenceResources
Lead Gen

Get a lead form

GEThttps://zernio.com/api/v1/ads/lead-forms/{formId}

Shows a lead form in full, including its questions and thank-you page.

Returns the full form, including the thank-you page, so a form can be diffed against what was created. Meta forms are scoped to the Page the accountId manages: a form on any other Page is a 404, never a read.

PlatformsMetaLinkedIn

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

formIdstringRequired

Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).

Query parameters

accountIdstringRequired

Connected Meta ads, facebook, instagram or linkedin ads account id (selects the platform).

  • Meta ads connection: resolves its Page through the Facebook account linked to the same profile.
  • Instagram account: uses the Page its ads run under (its own linked Page, else the Facebook or business-login Meta ads account on the same profile).
fieldsstring, max 2000

Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change.

  • Field names, commas and {} expansion only. Anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400.
  • Unknown field names are rejected by Meta as a 400.
  • Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages.

Responses

Success· the request worked

Errors· the request failed

GET/v1/ads/lead-forms/{formId}
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": {    "id": "string",    "name": "string",    "status": "string",    "locale": "string",    "created_time": "2019-08-24T14:15:22Z",    "page_id": "string",    "leads_count": 0,    "organic_leads_count": 0,    "expired_leads_count": 0,    "privacy_policy_url": "http://example.com",    "follow_up_action_url": "http://example.com",    "follow_up_action_text": "string",    "question_page_custom_headline": "string",    "is_optimized_for_quality": true,    "block_display_for_non_targeted_viewer": true,    "allow_organic_lead": true,    "tracking_parameters": [      {        "key": "string",        "value": "string"      }    ],    "legal_content": {      "id": "string",      "privacy_policy": {        "url": "http://example.com",        "link_text": "string"      },      "custom_disclaimer": {}    },    "context_card": {      "id": "string",      "title": "string",      "style": "LIST_STYLE",      "content": [        "string"      ],      "button_text": "string",      "cover_photo": {        "id": "string"      }    },    "thank_you_page": {      "id": "string",      "title": "string",      "body": "string",      "button_text": "string",      "button_type": "string",      "website_url": "http://example.com",      "enable_messenger": true,      "status": "string",      "lead_gen_use_case": "string",      "business_phone_number": "string",      "country_code": "string"    },    "questions": [      {        "id": "string",        "key": "string",        "label": "string",        "type": "string",        "inline_context": "string",        "options": [          {            "key": "string",            "value": "string"          }        ],        "conditional_questions_group_id": "string",        "conditional_questions_choices": [          {}        ],        "dependent_conditional_questions": [          {}        ]      }    ]  }}
OpenAPI specification
Was this page helpful?