What are API keys?
API keys let you publish, update, and manage pages programmatically — without logging in through a browser. Use them in scripts, CI/CD pipelines, custom integrations, or AI agents.
Pro plan required. API keys are available on the Pro plan. If you're on a Free or Starter plan, upgrade to unlock this feature.
Finding your API keys
Go to Dashboard → Settings → API Keys, or navigate directly to /dashboard/api-keys.
Creating an API key
- Enter a descriptive name for the key (up to 64 characters). For example: GitHub Actions, Local Dev, Zapier Bot.
- Click Create Key.
- Your new key appears in a green confirmation card. Copy it now — it will never be shown again after you dismiss this dialog.
- Click Dismiss to close the card.
Limit: Each account can have up to 5 API keys at a time.
Using your API key
Pass the key as a Bearer token in the Authorization header of every request.
Publish or update a page
Use PUT /api/pages/{slug} to create or update a page. This endpoint is idempotent — calling it with the same slug will update an existing page rather than creating a duplicate.
curl -X PUT \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"html":"<h1>Hello World</h1>"}' \
https://htmlpub.com/api/pages/my-pageList your pages
curl -H "Authorization: Bearer YOUR_KEY" \
https://htmlpub.com/api/pagesDelete a page
curl -X DELETE \
-H "Authorization: Bearer YOUR_KEY" \
https://htmlpub.com/api/pages/my-pageManaging your keys
The keys table shows each key's name, a short prefix (e.g. lp_abc1...), when it was last used, and when it was created.
To revoke a key, click the trash icon next to it. This action is permanent — any integrations using that key will immediately stop working.
Resources
- API Documentation — full endpoint reference
- OpenAPI 3.1 spec — import into Postman, Insomnia, or your HTTP client
- LLM Reference — optimized for use with AI assistants like ChatGPT or Claude
Need more help?
You can always get in touch with our support team—just click Support in your Leadpages navigation menu, or submit a ticket ↗
