Create a lead form
Changed onCreates a lead form on a Facebook Page or LinkedIn Company Page to collect contact details from ads.
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), where accountId may be the metaads ads connection (its Page comes from the Facebook account linked to the same profile), an Instagram account (the Page its ads run under: its own linked Page, else the Facebook or business-login Meta ads account on the same profile) or the Facebook account itself; 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.
Request
- Base URL: https://zernio.com/api
- URL: https://zernio.com/api/v1/ads/lead-forms
- Auth: HTTP bearer
Request body
Example request
{
"locale": "EN_US",
"thankYouButtonType": "VIEW_WEBSITE",
"platformSpecificData": {
"locale": "EN_US",
"thankYouButtonType": "VIEW_WEBSITE",
"customDisclaimer": {
"title": "WhatsApp",
"body": "Acme can contact you on WhatsApp about your request.",
"checkboxes": [
{
"key": "whatsapp_optin",
"text": "I agree to receive WhatsApp messages from Acme"
}
]
}
}
}Response
Created form.
Example response
{
"status": "success"
}Changes
- info
added the new optional request property
//
- info
- warning
added the new
accountenum value to the/response property for the response status - warning
added the new
accountenum value to the/response property for the response status
- warning