Lead Gen

Create a lead form

Creates 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.

Billing: Request; paid actions are priced in credits (see GET /v1/messaging/prices) · Rate limit: 60/min

post/v1/messaging/ads/lead-forms

Request

  • Base URL: https://apihub.co.il
  • URL: https://apihub.co.il/v1/messaging/ads/lead-forms
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Replay-safe: the same execution is returned instead of charging twice

X-Tagstring

Group calls into one job (e.g. one video) — see GET /v1/usage?tag=…

Request body

namestring required
localestring

Deprecated: use platformSpecificData.locale.

accountIdstring required
thankYouBodystring

Deprecated: use platformSpecificData.thankYouBody.

thankYouTitlestring

Deprecated: use platformSpecificData.thankYouTitle.

privacyPolicyUrlstring uri required
followUpActionUrlstring uri

Deprecated: use platformSpecificData.followUpActionUrl.

thankYouButtonTextstring

Deprecated: use platformSpecificData.thankYouButtonText.

thankYouButtonTypestring

Deprecated: use platformSpecificData.thankYouButtonType.

thankYouWebsiteUrlstring uri

Deprecated: use platformSpecificData.thankYouWebsiteUrl.

isOptimizedForQualityboolean

Deprecated: use platformSpecificData.isOptimizedForQuality.

privacyPolicyLinkTextstring

Deprecated: use platformSpecificData.privacyPolicyLinkText.

Response

Completed

idstring

Execution id — stable across internal retries; use it with GET /v1/executions/{id}

status'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
operationstring
tagstring nullable

Your X-Tag, if sent

created_atstring date-time
completed_atstring date-time nullable
errorstring nullable

Changes

No recorded changes to this operation across all 2 revisions of this API.