Developers

Leadpages API
Documentation

Create pages, manage sites, upload assets, and track analytics programmatically. Everything you can do in the dashboard, you can do through the API.

REST APIMCP ServerWebhooks

Quick Start

Three ways to integrate.

Choose the integration method that fits your workflow. All methods give you full access to the Leadpages platform.

REST API

Create and manage pages programmatically with a standard RESTful API. Bearer token authentication. Available on Pro plan and above.

MCP Server

Connect AI agents like Claude, Cursor, and n8n directly to Leadpages. OAuth authentication. Available on all plans, including free trial.

Webhooks

Get notified in real time when pages are published, leads are captured, or form submissions come in. Configure endpoints from your dashboard.

API Reference

Everything you need, one API away.

Eight endpoint categories covering the full Leadpages platform. RESTful design, JSON responses, predictable URLs.

ENDPOINTS

Pages

Create, read, update, delete, and render published pages.

POST /api/pagesGET /api/pagesPUT /api/pages/:slugDELETE /api/pages/:slugGET /api/pages/:slug/raw

Sites

Create multi-page websites and organize pages into sites.

POST /api/sitesGET /api/sitesPUT /api/sites/:id

Assets

Upload images, import from URL, and manage your asset library.

POST /api/assets/uploadPOST /api/assets/importGET /api/assets

Blogs

Create blogs, publish posts, manage templates and landing pages.

POST /api/blogsPOST /api/blogs/:id/postsGET /api/blogs/:id/posts

Analytics

Page metrics, visitor data, click heatmaps, and scroll depth.

GET /api/analytics/pages/:idGET /api/analytics/heatmapsGET /api/analytics/scroll-depth

Forms

Retrieve form submissions and export lead data.

GET /api/forms/:id/submissionsPOST /api/forms/export

Domains

Add custom domains, verify DNS, and manage SSL certificates.

POST /api/custom-domainsGET /api/custom-domainsDELETE /api/custom-domains/:id

Brand Kits

Create brand kits or extract colors, fonts, and logos from any URL.

POST /api/brand-kitsPOST /api/brand-kits/extractGET /api/brand-kits

Authentication

Two ways to authenticate.

Choose the method that fits your use case. Both provide full access to the API.

1

API Key

Bearer Token

Generate an API key from your dashboard settings. Include it as a Bearer token in the Authorization header of every request.

Authorization: Bearer lp_your_api_key

Best for server-to-server integrations

Available on Pro plan and above

Scoped to your account

2

OAuth 2.0

Authorization Code Flow

Use OAuth for MCP connections and user-facing integrations. Users authorize your app through a standard consent flow. Tokens refresh automatically.

POST /oauth/authorize POST /oauth/token

Best for MCP and user-facing apps

Available on all plans

No credentials shared with third parties

Example

Publish a page in one request.

Upload HTML, set a title, choose a slug. Your page is live in seconds.

RequestPOST
curl -X POST https://api.leadpages.com/api/pages \
  -H "Authorization: Bearer lp_your_api_key" \
  -H "Content-Type: multipart/form-data" \
  -F "html=@landing-page.html" \
  -F "title=Spring Sale Landing Page" \
  -F "slug=spring-sale"
Response201 Created
{
  "id": "pg_a1b2c3d4e5",
  "slug": "spring-sale",
  "title": "Spring Sale Landing Page",
  "url": "https://leadpages.com/p/spring-sale",
  "status": "published",
  "createdAt": "2026-03-25T12:00:00Z"
}

Get Started

Ready to build?

Generate your API key and start creating pages programmatically. Full API access is available on the Pro plan. MCP server access is included on every plan.

Learn about the MCP server →