# Hermoso: create_x_ads_lead_form · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/create_x_ads_lead_form/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / create_x_ads_lead_form

# `create_x_ads_lead_form`

Create an X lead form

Area: X ADS LEAD GEN, CARDS, MEDIA, PROMOTED-ONLY POSTS · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

Create an X lead form — the native form an X lead ad opens, so people sign up without leaving X. The X lead ad chain: lead form -> create_x_ads_card(leadFormId) -> create_x_ads_post(cardUri, lineItemId) on a WEBSITE_CLICKS line item (X retired the LEAD_GENERATION objective) -> get_x_ads_leads. Needs name, purpose, fields (at least one required), and an https privacy policy URL + company name. X ties every form to a conversion event: an ad account with no X Pixel needs conversionEventId, and the refusal says so plainly. X also builds a customer-list audience of the form's leads. Read back from X. Free.

## Parameters

Parameter Type Description

`adAccountId` `string` X ad account id (list_x_ads_accounts); omit if only one is shared

`accountId` `string` older name for adAccountId (MCP only)

`name` required `string` internal name of the lead form

`purpose` required `string` what the leads are used for (shown to the person)

`fields` required `object[]` at least one must not be optional

`fields[].key` required `"EMAIL" | "PHONE_NUMBER" | "STREET_ADDRESS" | "CITY" | "STATE" | "COUNTRY" | "ZIP_CODE" | "FULL_NAME" | "FIRST_NAME" | "LAST_NAME" | "DATE_OF_BIRTH" | "COMPANY_NAME" | "JOB_TITLE" | "WORK_EMAIL" | "WORK_PHONE_NUMBER" | "GENDER" | "HANDLE"` lead field the form collects, from X's fixed list of lead field keys

`fields[].optional` `boolean` true = the person may skip this field; at least one field must not be optional

`privacyPolicyUrl` required `string` https

`companyName` required `string` company name shown on the form

`headline` `string` intro card headline

`description` `string` intro card text

`thankYouHeadline` `string` headline on the thank-you page shown after submit

`thankYouDescription` `string` text on the thank-you page shown after submit

`thankYouUrl` `string` https link on the thank-you button

`thankYouButton` `string` label of the thank-you page button

`conversionEventId` `string` Event ID from X Events Manager — required when the ad account has no X Pixel

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/create_x_ads_lead_form`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_x_ads_lead_form","arguments":{"name":"<string>","purpose":"<string>","fields":"<array>","privacyPolicyUrl":"<string>","companyName":"<string>"}}}`
**CLI**

`hermoso call create_x_ads_lead_form --json '{"name":"<string>","purpose":"<string>","fields":"<array>","privacyPolicyUrl":"<string>","companyName":"<string>"}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [create_x_ads_card](https://hermoso.ai/docs/reference/ads/create_x_ads_card/) Build an X ad card
- [create_x_ads_post](https://hermoso.ai/docs/reference/ads/create_x_ads_post/) Write a promoted-only X post for ads
- [get_x_ads_leads](https://hermoso.ai/docs/reference/ads/get_x_ads_leads/) Read the leads from an X lead form
- [list_x_ads_lead_forms](https://hermoso.ai/docs/reference/ads/list_x_ads_lead_forms/) List X lead forms
- [update_x_ads_lead_form](https://hermoso.ai/docs/reference/ads/update_x_ads_lead_form/) Change an X lead form
- [upload_x_ads_media](https://hermoso.ai/docs/reference/ads/upload_x_ads_media/) Upload media to an X ad account
- [list_x_ads_media](https://hermoso.ai/docs/reference/ads/list_x_ads_media/) List an X ad account’s Media Library
- [list_x_ads_cards](https://hermoso.ai/docs/reference/ads/list_x_ads_cards/) List X ad cards
- [list_x_ads_posts](https://hermoso.ai/docs/reference/ads/list_x_ads_posts/) List the posts an X ad account can promote
- [preview_x_ads_post](https://hermoso.ai/docs/reference/ads/preview_x_ads_post/) Preview an X ad post

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
