canonical: https://jentic.com/apis/leadpages.net/leadpages

# Leadpages htmlpub API

The htmlpub API publishes complete HTML documents as live web pages under a slug you choose, and updates or deletes them by that slug. Each page can carry uploaded assets such as images, CSS, JavaScript, and fonts, pages can be grouped into sites with a default page, and a custom domain can be pointed at a page and verified once its CNAME record is in place. A single PUT creates a page or replaces one you own, returning 201 for new pages and 200 for updates, which makes it a direct way to put generated HTML online.

## For AI agents

Publish generated HTML as a live page at a chosen slug, update or delete it, upload page assets, group pages into sites, and attach and verify custom domains.

## Scope

Does not handle drag-and-drop page building, form submissions, lead capture, or site analytics. Use for publishing and hosting HTML pages, their assets, and custom domains only.

## Capabilities

- Publish a complete HTML document at a chosen slug, or replace a page you already own, with one PUT call
- Change a page's HTML or title, or move it into a site, without resending everything
- Upload images, CSS, JavaScript, and font files to a page and remove them individually or all at once
- Group pages into sites with a name, slug, and default page
- Point a custom domain at a page and verify its DNS configuration after the CNAME is set
- Fetch the raw HTML of any page by slug without a key

## Use cases

### Agent-published pages through Jentic

An AI agent that writes HTML, such as a landing page, a report, or a prototype, can put it online with one call to the htmlpub create-or-update operation and share the resulting URL. Through Jentic the agent finds the operation by intent and the bearer key is injected at execution time, and because the page slug sits in the URL path a rule can limit the agent to the one page it is allowed to publish.

Example prompt: Call PUT `/api/pages/{slug}` with slug 'q3-report' and html set to the generated report document, then return the page URL to the user

### Campaign landing pages

Marketing teams spin up short-lived pages for launches, events, and promotions. With htmlpub a page goes live from a single HTML document, its images and stylesheets upload as page assets, and related pages can be grouped into a site, so a campaign can be assembled and taken down programmatically.

Example prompt: Call POST `/api/sites` with slug 'spring-launch' and name 'Spring Launch', then PUT `/api/pages/{slug}` with slug 'spring-launch-home', the page html, and the new siteId

### Custom domains for published pages

A page on a branded domain looks more credible than one on a shared host. The htmlpub custom domain operations attach a domain to a page by pageId, let you repoint it later, and verify the DNS records after you add the CNAME, returning an error until the configuration is correct.

Example prompt: Call POST `/api/custom-domains` with domain 'launch.example.com' and the page's pageId, then call POST `/api/custom-domains/{domain}/verify` after the CNAME record has been added

### Page asset management

Pages often need their own images, stylesheets, scripts, and fonts. htmlpub accepts png, jpg, gif, svg, webp, css, js, woff, woff2, and ttf uploads per page, lists what a page holds, and deletes a single asset by assetId or clears every asset on the page.

Example prompt: Call POST `/api/pages/{slug}/assets` for slug 'spring-sale' with the file 'hero.webp', then reference the returned asset URL in the page HTML

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| PUT | `/api/pages/{slug}` | Create or update a page |
| PATCH | `/api/pages/{slug}` | Update a page |
| GET | `/api/pages` | List all pages |
| POST | `/api/pages/{slug}/assets` | Upload an asset |
| POST | `/api/sites` | Create a site |
| POST | `/api/custom-domains` | Add a custom domain |
| POST | `/api/custom-domains/{domain}/verify` | Verify a custom domain |

## Key resources

- **Pages** — Create or replace, update, list, and delete pages by slug, and read a page's raw HTML
- **Assets** — Upload, list, serve, and delete files attached to a page
- **Sites** — Create, update, list, and delete sites that group pages, with a default page
- **Custom domains** — Attach, repoint, verify, and remove custom domains for pages

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 70 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 54 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 79 / 100
- **View full report:** https://jentic.com/apis/leadpages.net/leadpages/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring htmlpub by hand means managing an hp_live_ bearer key, knowing which read operations are open, and handling 409 conflicts when a slug belongs to someone else. Through Jentic you install once, import htmlpub from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** htmlpub puts the page slug, site id, and custom domain in the URL path (`/api/pages/{slug}`, `/api/sites/{siteId}`), so a rule can pin your agent to one page or site and the operations you pick. You choose the operations it may call, so destructive ones like deleting a site or removing a custom domain are not included unless you add them.
- **Credential handling:** Your htmlpub API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'publish an HTML page' or 'attach a custom domain', and Jentic returns the matching htmlpub operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Netlify API** — Static site hosting with deploys, functions, and forms
- **Vercel API** — Frontend hosting and deployments for frameworks such as Next.js
- **Webflow API** — Visual website builder with a CMS and site publishing
- **Cloudflare API** — DNS, CDN, and security for domains

## FAQ

### Is there an htmlpub MCP server?

You don't need an MCP server to give your agent the htmlpub API. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls it. Operations are discovered on demand, so your agent's context carries no tool definitions it will not use.

### What authentication does the htmlpub API use?

Per its OpenAPI spec, the htmlpub API uses HTTP bearer authentication with an API key that starts with hp_live_, created in the htmlpub dashboard. Reading a page's raw HTML and serving an asset are declared open and need no key. Through Jentic, the key is stored encrypted by your own Jentic One instance and injected at execution time.

### Can I update an existing page with the htmlpub API?

Yes. PUT `/api/pages/{slug}` replaces a page you own with new html, returning 200 for an update and 201 for a new page, and 409 if another user holds the slug. PATCH `/api/pages/{slug}` changes only the fields you send, such as html, title, or siteId.

### What are the rate limits for the htmlpub API?

The OpenAPI spec does not specify rate limits. It notes that page HTML can be up to 5MB and that asset size limits depend on your plan; check https://htmlpub.com for current limits.

### Is the htmlpub API free?

No. Per the spec, API access requires a Pro plan, listed at $15 a month. Raw page HTML and page assets can be read without a key, but creating and managing pages needs a Pro API key.

### How do I publish a page with htmlpub through Jentic?

Install Jentic One with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, import the htmlpub API from the directory, and store your API key. Your agent then searches for 'publish an HTML page' and Jentic returns PUT `/api/pages/{slug}`, which takes the slug in the path and the html in the body. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the htmlpub API?

Yes. Write a rule that allows only PUT `/api/pages/{slug}` and POST `/api/pages/{slug}/assets` for the slug 'agent-drafts': the agent can publish and add assets to that one page, while your other pages, sites, and custom domains stay out of reach, and every call it makes is logged.
