LeafPage API
Publish a self-contained HTML report and receive a permanent URL. Reports are immutable snapshots, served from a cookieless content host.
The API lives on the application host https://leafpage.cc; published reports are served from https://view.leafpage.cc. All requests and responses are JSON. The machine-readable spec is at /openapi.json.
Authentication
Requests authenticate with an Authorization: Bearer lp_… header. Personal access tokens are created in the portal under the account menu → API Tokens; the plaintext value is shown once at creation.
Scopes: reports:read (list), reports:write (upload/modify, implies read), reports:delete. A token lacking the required scope returns 403.
Errors
Errors return { "error": "…" } with the status below. A target owned by another account is reported as 404, indistinguishable from one that does not exist.
| Status | Meaning |
|---|---|
400 | Malformed request — invalid JSON, missing index.html, bad name/encoding, or invalid field. |
401 | Authentication required or not recognized. |
403 | The token lacks the required scope. |
404 | The target does not exist or is owned by another account. |
409 | Name owned by another account, or rename collision. |
413 | A file exceeds the per-file size limit. |
429 | Rate limited — see the Retry-After header. |
507 | A storage quota is full. |