HighLevel: Create page lead form
HighLevel adPublishing.fbCreatePageLeadForm: arguments, response, policy and SDK examples.
← Ad publishing operations · Get started
Operation gohighlevel.fb_create_page_lead_form
Provider route: POST /ad-publishing/facebook/page/{pageId}/forms. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["adPublishing"]["fbCreatePageLeadForm"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.adPublishing.fbCreatePageLeadForm(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.ad_publishing.fb_create_page_lead_form(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.pageId | string | Required within parent | |
body | Model | Required within parent | Expand Create page lead form — request body — body |
Referenced models: Create page lead form — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root |
Schemas
Section titled “Schemas”Create page lead form — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
customDisclaimer | JSON | Optional | Custom disclaimer config |
customDisclaimer (allOf 1) | Model | All variants apply | Expand Create page lead form — request body — body custom Disclaimer body, checkboxes, title |
draftFormId | string | Optional | Draft form ID |
greetingCard | JSON | Optional | Greeting card config |
greetingCard (allOf 1) | Model | All variants apply | Expand Create page lead form — request body — body greeting Card content, style, title |
isDraft | boolean | Optional | If the form is a draft, set to true |
locale | string | Optional | Locale |
locationId | string | Required within parent | Location identifier |
name | string | Required within parent | Lead form name |
privacyPolicyLink | string | Required within parent | Privacy policy URL. Required when `isDraft` is false or omitted; optional for drafts. |
privacyPolicyText | string | Optional | Privacy policy text |
questionPageHeadline | string | Optional | Question page headline |
questions | array | Required within parent | List of questions displayed on the lead form. Required (non-empty) when `isDraft` is false or omitted; optional for drafts. |
questions[] | Model | Each item | Expand Create page lead form — request body — body questions item |
thankYouPage | JSON | Required within parent | Thank you page config. Required when `isDraft` is false or omitted; optional for drafts. |
thankYouPage (allOf 1) | Model | All variants apply | Expand Create page lead form — request body — body thank You Page body, business Phone, button Link, button Text, button Type, country Code, title |
type | string | Required within parent | Lead form type One of: MORE_VOLUME, HIGHER_INTENT |
Referenced models: Create page lead form — request body — body custom Disclaimer body, checkboxes, title, Create page lead form — request body — body questions item, Create page lead form — request body — body greeting Card content, style, title, Create page lead form — request body — body thank You Page body, business Phone, button Link, button Text, button Type, country Code, title
Create page lead form — request body — body custom Disclaimer body, checkboxes, title
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
body | string | Required within parent | Disclaimer body text |
checkboxes | array | Optional | Consent checkboxes the user must agree to before submitting the form |
checkboxes[] | Model | Each item | Expand Create page lead form — request body — body custom Disclaimer body, checkboxes, title checkboxes item |
title | string | Required within parent | Disclaimer title |
Referenced models: Create page lead form — request body — body custom Disclaimer body, checkboxes, title checkboxes item
Create page lead form — request body — body questions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
key | string | Required within parent | Question key |
label | string | Optional | Question label text shown to the user |
options | array | Optional | Answer options for multiple-choice questions (only applies to CUSTOM type) |
options[] | Model | Each item | Expand Create page lead form — request body — body questions item options item |
type | string | Required within parent | Question input type — use a prefilled type for standard fields or CUSTOM / SHORT_ANSWER for freeform questions One of: CUSTOM, CITY, COMPANY_NAME, COUNTRY, DATE_OF_BIRTH, EMAIL, FIRST_NAME, FULL_NAME, GENDER, JOB_TITLE, LAST_NAME, MARITIAL_STATUS, MILITARY_STATUS, PHONE, POST_CODE, RELATIONSHIP_STATUS, STATE, STREET_ADDRESS, WORK_EMAIL, WORK_PHONE_NUMBER, ZIP, SHORT_ANSWER |
Referenced models: Create page lead form — request body — body questions item options item
Create page lead form — request body — body greeting Card content, style, title
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
content | array | Required within parent | Greeting card content |
content[] | string | Each item | |
style | string | Required within parent | Greeting card style |
title | string | Required within parent | Greeting card title |
Create page lead form — request body — body thank You Page body, business Phone, button Link, button Text, button Type, country Code, title
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
body | string | Required within parent | Thank you page body |
businessPhone | string | Optional | Business phone number |
buttonLink | string | Optional | Button destination link |
buttonText | string | Required within parent | Button text label |
buttonType | string | Required within parent | Button action type |
countryCode | string | Optional | Phone country code |
title | string | Required within parent | Thank you page title |
Create page lead form — request body — body custom Disclaimer body, checkboxes, title checkboxes item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
isRequired | boolean | Required within parent | Checkbox required flag |
key | string | Required within parent | Checkbox unique key |
text | string | Required within parent | Checkbox text label |
Create page lead form — request body — body questions item options item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
key | string | Required within parent | Option key |
value | string | Required within parent | Option value |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.fb_create_page_lead_form. Catalog operation: fb-create-page-lead-form. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["adPublishing.write"]
Pinned headers: {"Version": "v3"}