Push HTML

API docs

Get an API key โ†’

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.

Authentication

Every API request needs a bearer token โ€” an API key created in the portal:

Authorization: Bearer ph_live_...

Create a page

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.

Fields

FieldRequiredNotes
nameyesShown in your dashboard.
htmlyesThe page body. Served verbatim, including <script>.
descriptionnoOptional metadata.
visibilitynopublic or private (default private).

Raw-HTML shortcut

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

All endpoints

Create requires an API key; the rest accept an API key or a logged-in portal session.

MethodPathPurpose
POST/api/pagesCreate a page.
GET/api/pagesList 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).