Push finished HTML with an API key; each push becomes a hosted page with its own URL.
Opening a page returns only the raw HTML. Agents: a machine-readable version lives at
/llms.txt and a JSON index at /api.
Every API request needs a bearer token โ an API key created in the portal:
Authorization: Bearer ph_live_...
POST https://app.pushhtml.com/api/pages โ the one call most tools need.
curl -X POST https://app.pushhtml.com/api/pages \
-H "Authorization: Bearer ph_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"My Page","description":"","html":"<h1>Hello</h1>","visibility":"public"}'
Response 201:
{
"id": 1,
"slug": "k3p9x2ab7qmt",
"name": "My Page",
"visibility": "public",
"view_url": "https://view.pushhtml.com/k3p9x2ab7qmt",
"created_at": "...", "updated_at": "..."
}
Open view_url to see the raw HTML. Public pages are viewable by anyone with the
link; private pages include a capability token (?t=...) in view_url.
| Field | Required | Notes |
|---|---|---|
name | yes | Shown in your dashboard. |
html | yes | The page body. Served verbatim, including <script>. |
description | no | Optional metadata. |
visibility | no | public or private (default private). |
Skip the JSON wrapping: send the HTML as the body with Content-Type: text/html and
put metadata in query params (or X-Tunnel-Name / -Description / -Visibility headers).
curl -X POST "https://app.pushhtml.com/api/pages?name=My%20Page&visibility=public" \
-H "Authorization: Bearer ph_live_..." \
-H "Content-Type: text/html" \
--data-binary @page.html
Create requires an API key; the rest accept an API key or a logged-in portal session.
| Method | Path | Purpose |
|---|---|---|
POST | /api/pages | Create a page. |
GET | /api/pages | List your pages (metadata only). |
GET | /api/pages/{id} | One page; ?include=html for the HTML. |
PUT | /api/pages/{id} | Update name/description/html/visibility (any subset). Same URL. |
DELETE | /api/pages/{id} | Delete a page. |
Errors return {"error": "..."} with an appropriate status. 401 = missing/invalid key,
400 = bad body, 404 = no such page (or not yours).