Lead Gen

Create a lead form

Creates a Lead Gen form. 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) 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.

post/v1/ads/lead-forms

Request body

accountIdstring required
namestring required
privacyPolicyUrlstring uri required
privacyPolicyLinkTextstring

Deprecated: use platformSpecificData.privacyPolicyLinkText.

followUpActionUrlstring uri

Deprecated: use platformSpecificData.followUpActionUrl.

localestring

Deprecated: use platformSpecificData.locale.

thankYouTitlestring

Deprecated: use platformSpecificData.thankYouTitle.

thankYouBodystring

Deprecated: use platformSpecificData.thankYouBody.

thankYouButtonTextstring

Deprecated: use platformSpecificData.thankYouButtonText.

thankYouButtonTypestring

Deprecated: use platformSpecificData.thankYouButtonType.

thankYouWebsiteUrlstring uri

Deprecated: use platformSpecificData.thankYouWebsiteUrl.

isOptimizedForQualityboolean

Deprecated: use platformSpecificData.isOptimizedForQuality.

Example request

{
  "locale": "EN_US",
  "thankYouButtonType": "VIEW_WEBSITE",
  "platformSpecificData": {
    "locale": "EN_US",
    "thankYouButtonType": "VIEW_WEBSITE"
  }
}

Response

Created form.

statusstring

Example response

{
  "status": "success"
}

Changes

Changed in 6 of the 56 revisions of this API.129

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ▲

      the /// request property format changed from no format to uri

      request-property-type-changed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ●

      removed the request property //

      request-property-removed

    • ●

      removed the request property //

      request-property-removed