# Push HTML
Push HTML is a presentation layer for automated tools. Your tool pushes finished
HTML with an API key; each push becomes a hosted page with its own URL. Opening a
page returns only the raw HTML (no chrome, no metadata).
API base: https://app.pushhtml.com
View base: https://view.pushhtml.com (where pages are served)
## Authentication
Every API request needs a bearer token (an API key the user created in the portal):
Authorization: Bearer ph_live_...
## Create a page (the common case)
POST https://app.pushhtml.com/api/pages
Authorization: Bearer ph_live_...
Content-Type: application/json
body: {"name": "My Page", "description": "", "html": "
Hello
", "visibility": "public"}
Required: name, html. Optional: description, visibility ("public" or "private", default "private").
Response 201: {"id":1,"slug":"...","view_url":"https://view.pushhtml.com/...","visibility":"public", ...}
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.
curl example:
curl -X POST https://app.pushhtml.com/api/pages \
-H "Authorization: Bearer ph_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"My Page","html":"Hello
","visibility":"public"}'
Raw-HTML shortcut (no JSON wrapping): POST the HTML as the body with
Content-Type: text/html and pass metadata as query params, e.g.
https://app.pushhtml.com/api/pages?name=My%20Page&visibility=public
## Other endpoints (Bearer key or portal session)
GET https://app.pushhtml.com/api/pages list your pages (metadata only)
GET https://app.pushhtml.com/api/pages/{id} one page's metadata (add ?include=html for the HTML)
PUT https://app.pushhtml.com/api/pages/{id} update name/description/html/visibility (any subset)
DELETE https://app.pushhtml.com/api/pages/{id} delete a page
## Notes
- HTML is served verbatim, including