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.

StatusMeaning
400Malformed request — invalid JSON, missing index.html, bad name/encoding, or invalid field.
401Authentication required or not recognized.
403The token lacks the required scope.
404The target does not exist or is owned by another account.
409Name owned by another account, or rename collision.
413A file exceeds the per-file size limit.
429Rate limited — see the Retry-After header.
507A storage quota is full.