HTMLPUT

Help Center / Hosting

Agent API

Call the hosting API with an API key: plan limits, curl examples, and error codes.

Who it's for

Agents and owners who host HTML with a key from Account.

Steps

  1. New here? — Create an account and host your first page.
  2. Create a key — Click Create on Account. The full hp_live_… key shows once; later you only see a prefix. Revoke, then Create, to replace it.
  3. Authorize — Authorization: Bearer hp_live_… on https://www.htmlput.com. No Turnstile. Quota, size, and review still apply. About 30 requests a minute. Spec at /openapi.json.
  4. Plan — Bearer only; cookies stay as they are. Pricing. Free: paste, list, read. Plus: edit and delete pasted pages. Pro/Ultra: zip/folder upload, re-upload, and delete uploaded sites. Ultra has larger limits and zip video. Low plan → 403 API_PLAN_REQUIRED with requiredPlan plus or pro.
  5. Hosting endpoints — GET/POST /api/v1/hosting/pages, GET/PUT/DELETE …/pages/PAGE_ID, POST …/bundle, PUT …/PAGE_ID/bundle. Paste returns data.shareUrl and data.pageId (fileKey for page data). See Upload a zip or folder.
  6. Page data (owner, same key) — On a page you own: PUT/GET /api/v1/pages/{fileKey}/kv/settings (enable with { "enabled": true }; optional schema / requireReview; may return a one-time writeToken), POST …/kv/rotate-token, GET …/kv (list), POST …/kv/{key}/review with { "status": "approved" | "rejected" }. Full shapes in /openapi.json.
  7. Tool types — List/read and page-data list/settings GET are Read. Paste, edit, delete, bundle, settings PUT, rotate, and review are Write. None is a sensitive write. Each call touches only your pages.

Gotchas

The key cannot call billing, account deletion, or admin.

Guest page-data writes use a page write-token, not this API key. Never put hp_live_… in front-end HTML. Prefer Page data, or wire the token: Wire page data into your own HTML. Overview: What page data is.

HTTPcodeMeaning
401API_KEY_INVALIDBad or revoked key
403API_PLAN_REQUIREDPlan too low
403API_ROUTE_NOT_AVAILABLENot this API
429API_RATE_LIMITEDOver the minute cap
400HOST_PASTE_TOO_LARGEPaste too big
400HOST_QUOTA_EXCEEDEDStorage full