Developers

Leadpages API
Documentation

Create pages, manage sites and assets, and retrieve page analytics programmatically with supported REST endpoints.

REST APIMCP ServerWebhooks

Quick Start

Three ways to integrate.

Choose the integration method that fits your workflow. Each option supports a different way to connect with Leadpages.

REST API

Create and manage pages programmatically with a standard RESTful API. Bearer token authentication. Available on Grow 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 when pages are published, updated, or deleted, or when a form is submitted. Configure endpoints from your account settings.

REST API Overview

Build with the supported API areas.

Authenticated endpoints use predictable URLs and return JSON responses. The routes below are available with a Leadpages API key.

ENDPOINTS

Pages

List pages and create, read, update, or delete a page by slug.

GET /api/pagesGET /api/pages/:slugPUT /api/pages/:slugDELETE /api/pages/:slug

Sites

Create multi-page websites and organize pages into sites.

GET /api/sitesPOST /api/sitesGET /api/sites/:siteIdPATCH /api/sites/:siteIdDELETE /api/sites/:siteId

Library

Upload files and manage assets in your library.

GET /api/libraryPOST /api/libraryPATCH /api/library/:assetIdDELETE /api/library/:assetId

Blogs

Create blogs and list or create their posts.

GET /api/blogsPOST /api/blogsGET /api/blogs/:blogId/postsPOST /api/blogs/:blogId/posts

Analytics

Retrieve summary metrics for the pages in your account.

GET /api/analytics/pages

Forms

List forms, retrieve submissions by page slug, and delete a submission.

GET /api/formsGET /api/forms/:pageSlugDELETE /api/forms/:pageSlug/:submissionId

Domains

Add, update, and remove custom domains.

GET /api/custom-domainsPOST /api/custom-domainsPATCH /api/custom-domains/:domainDELETE /api/custom-domains/:domain

Brand Kits

Create and manage brand kits or extract brand details from a URL.

GET /api/brand-kitsPOST /api/brand-kitsPOST /api/brand-kits/extractGET /api/brand-kits/:kitIdPUT /api/brand-kits/:kitIdDELETE /api/brand-kits/:kitId

Authentication

Two ways to authenticate.

Use an API key for REST requests. Compatible MCP clients use a scoped OAuth flow.

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 hp_live_your_api_key

Best for server-to-server integrations

Available on Grow plan and above

Scoped to your account

2

OAuth 2.0

Authorization Code Flow

Compatible MCP clients discover and complete the OAuth flow automatically. Users approve the requested scopes without sharing their Leadpages credentials.

https://mcp.leadpages.com/mcp

Used by compatible MCP clients

Available on all plans

Access is limited to approved scopes

Example

Create or update a page in one request.

Send HTML to a stable slug. Reuse the same request to update it later.

RequestPOST
curl -X PUT https://leadpages.com/api/pages/spring-sale \
  -H "Authorization: Bearer hp_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Spring Sale</h1>"}'
Response201 Created
{
  "id": "a1b2c3d4e5",
  "slug": "spring-sale",
  "url": "/edit/a1b2c3d4e5"
}

Get Started

Ready to build?

Generate your API key and start creating pages programmatically. REST API keys are available on the Grow plan and above. MCP server access is included on every plan.

Learn about the MCP server →