Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.pageIdstringRequired within parent
bodyModelRequired within parentExpand Create page lead form — request body — body

Referenced models: Create page lead form — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
Create page lead form — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
customDisclaimerJSONOptionalCustom disclaimer config
customDisclaimer (allOf 1)ModelAll variants applyExpand Create page lead form — request body — body custom Disclaimer body, checkboxes, title
draftFormIdstringOptionalDraft form ID
greetingCardJSONOptionalGreeting card config
greetingCard (allOf 1)ModelAll variants applyExpand Create page lead form — request body — body greeting Card content, style, title
isDraftbooleanOptionalIf the form is a draft, set to true
localestringOptionalLocale
locationIdstringRequired within parentLocation identifier
namestringRequired within parentLead form name
privacyPolicyLinkstringRequired within parentPrivacy policy URL. Required when `isDraft` is false or omitted; optional for drafts.
privacyPolicyTextstringOptionalPrivacy policy text
questionPageHeadlinestringOptionalQuestion page headline
questionsarrayRequired within parentList of questions displayed on the lead form. Required (non-empty) when `isDraft` is false or omitted; optional for drafts.
questions[]ModelEach itemExpand Create page lead form — request body — body questions item
thankYouPageJSONRequired within parentThank you page config. Required when `isDraft` is false or omitted; optional for drafts.
thankYouPage (allOf 1)ModelAll variants applyExpand Create page lead form — request body — body thank You Page body, business Phone, button Link, button Text, button Type, country Code, title
typestringRequired within parentLead 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
FieldTypePresenceDescription and constraints
$objectRoot
bodystringRequired within parentDisclaimer body text
checkboxesarrayOptionalConsent checkboxes the user must agree to before submitting the form
checkboxes[]ModelEach itemExpand Create page lead form — request body — body custom Disclaimer body, checkboxes, title checkboxes item
titlestringRequired within parentDisclaimer 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
FieldTypePresenceDescription and constraints
$objectRoot
keystringRequired within parentQuestion key
labelstringOptionalQuestion label text shown to the user
optionsarrayOptionalAnswer options for multiple-choice questions (only applies to CUSTOM type)
options[]ModelEach itemExpand Create page lead form — request body — body questions item options item
typestringRequired within parentQuestion 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
FieldTypePresenceDescription and constraints
$objectRoot
contentarrayRequired within parentGreeting card content
content[]stringEach item
stylestringRequired within parentGreeting card style
titlestringRequired within parentGreeting card title
Create page lead form — request body — body thank You Page body, business Phone, button Link, button Text, button Type, country Code, title
FieldTypePresenceDescription and constraints
$objectRoot
bodystringRequired within parentThank you page body
businessPhonestringOptionalBusiness phone number
buttonLinkstringOptionalButton destination link
buttonTextstringRequired within parentButton text label
buttonTypestringRequired within parentButton action type
countryCodestringOptionalPhone country code
titlestringRequired within parentThank you page title
Create page lead form — request body — body custom Disclaimer body, checkboxes, title checkboxes item
FieldTypePresenceDescription and constraints
$objectRoot
isRequiredbooleanRequired within parentCheckbox required flag
keystringRequired within parentCheckbox unique key
textstringRequired within parentCheckbox text label
Create page lead form — request body — body questions item options item
FieldTypePresenceDescription and constraints
$objectRoot
keystringRequired within parentOption key
valuestringRequired within parentOption value

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"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.