Skip to content

HighLevel: Create lead form

HighLevel adPublishing.liCreateLeadForm: arguments, response, policy and SDK examples.

← Ad publishing operations · Get started

Operation gohighlevel.li_create_lead_form

Provider route: POST /ad-publishing/linkedin/{accountId}/form. 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"]["liCreateLeadForm"]>[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.liCreateLeadForm(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.li_create_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.accountIdstringRequired within parent
queryobjectRequired within parentAdditional keys: not allowed
query.locationIdstringRequired within parent
query.isDraftbooleanOptional
bodyModelRequired within parentExpand Create lead form — request body — body

Referenced models: Create 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

6 more schemas are linked from the tables above, on the schema pages.

Create lead form — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
contentJSONRequired within parentForm content
content (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions
creationLocaleJSONRequired within parentCreation locale
creationLocale (allOf 1)ModelAll variants applyExpand Create lead form — request body — body creation Locale country, language
hiddenFieldsarrayOptionalHidden fields
hiddenFields[]ModelEach itemExpand Create lead form — request body — body hidden Fields item
namestringRequired within parentForm name
ownerJSONRequired within parentForm owner
owner (allOf 1)ModelAll variants applyExpand Create lead form — request body — body owner sponsored Account
statestringRequired within parentForm state
One of: PUBLISHED

Referenced models: Create lead form — request body — body creation Locale country, language, Create lead form — request body — body hidden Fields item, Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions, Create lead form — request body — body owner sponsored Account

Create lead form — request body — body creation Locale country, language
FieldTypePresenceDescription and constraints
$objectRoot
countrystringRequired within parentCountry code
languagestringRequired within parentLanguage code
Create lead form — request body — body hidden Fields item
FieldTypePresenceDescription and constraints
$objectRoot
namestringRequired within parentField name
valuestringRequired within parentField value
Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions
FieldTypePresenceDescription and constraints
$objectRoot
descriptionJSONOptionalForm description
description (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized
headlineJSONRequired within parentForm headline
headline (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized
legalInfoJSONRequired within parentLegal information
legalInfo (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions legal Info consents, legal Disclaimer, privacy Policy Url
postSubmissionInfoJSONRequired within parentPost-submission info
postSubmissionInfo (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions post Submission Info call To Action, message
questionsarrayRequired within parentForm questions
questions[]ModelEach itemExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions questions item

Referenced models: Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions questions item, Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions legal Info consents, legal Disclaimer, privacy Policy Url, Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized, Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions post Submission Info call To Action, message

Create lead form — request body — body owner sponsored Account
FieldTypePresenceDescription and constraints
$objectRoot
sponsoredAccountstringRequired within parentSponsored account URN
Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions questions item
FieldTypePresenceDescription and constraints
$objectRoot
namestringRequired within parentQuestion field name
predefinedFieldstringOptionalPredefined field identifier
questionJSONRequired within parentQuestion text
question (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized
questionDetailsJSONRequired within parentQuestion type details
questionDetails (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions questions item question Details multiple Choice Question Details, text Question Details

Referenced models: Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized, Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions questions item question Details multiple Choice Question Details, text Question Details

Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions legal Info consents, legal Disclaimer, privacy Policy Url
FieldTypePresenceDescription and constraints
$objectRoot
consentsarrayRequired within parentConsent entries
consents[]ModelEach itemExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions legal Info consents, legal Disclaimer, privacy Policy Url consents item
legalDisclaimerJSONOptionalLegal disclaimer text
legalDisclaimer (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized
privacyPolicyUrlstringRequired within parentPrivacy policy URL

Referenced models: Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions legal Info consents, legal Disclaimer, privacy Policy Url consents item, Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized

Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized
FieldTypePresenceDescription and constraints
$objectRoot
localizedobjectRequired within parentLocale-keyed string map
Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions post Submission Info call To Action, message
FieldTypePresenceDescription and constraints
$objectRoot
callToActionJSONRequired within parentPost-submission call to action
callToAction (allOf 1)ModelAll variants applyExpand Create lead form — request body — body / content / description, headline, legalInfo, postSubmissionInfo, questions / postSubmissionInfo / callToAction, message / callToAction / callToActionLabel: VISIT COMPANY WEBSITE, DOWNLOAD NOW, TRY NOW, VIEW NOW, LEARN MORE
messageJSONRequired within parentThank-you message
message (allOf 1)ModelAll variants applyExpand Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized

Referenced models: Create lead form — request body — body content description, headline, legal Info, post Submission Info, questions headline localized, Create lead form — request body — body / content / description, headline, legalInfo, postSubmissionInfo, questions / postSubmissionInfo / callToAction, message / callToAction / callToActionLabel: VISIT COMPANY WEBSITE, DOWNLOAD NOW, TRY NOW, VIEW NOW, LEARN MORE

SDK function policy ID: gohighlevel.li_create_lead_form. Catalog operation: li-create-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.