Skip to main content

Lead Generation API

By Steven Van ·

The documented API covers creating native lead forms, attaching them to ad cards, and exporting submissions as JSON, CSV, or XLSX.

X has documented the Lead Generation API, which lets advertisers build native lead forms for Lead Gen campaigns. A form is created with POST /12/accounts/:account_id/lead_forms, specifying an introduction, fields, a privacy policy, and an optional thank-you page. The form is then attached to a card by creating a card with destination type LEAD_FORM.

Submitted leads can be exported as JSON, CSV, or XLSX through the ad-export endpoint, filtered by form and time window. Using the Leads API requires the Campaign user permission, and exporting leads is restricted to account administrators. Full details are in the changelog entry for the X API.

X
X
The real-time everything app — posts, news, and conversation, plus the X API and a hosted MCP server for connecting AI agents to real-time data.
View X →

Read the original announcement →

Read Lead Generation API on Creators Toolbox