REST API
The admin panel uses the same REST API that you can call yourself. The full schema is published as OpenAPI 3.1 at
/api/openapi.json.
Authentication
Section titled “Authentication”- Browser session: the admin’s own cookie. Every request that changes something must send
X-Wuppy-Request: 1(CSRF protection). - API token:
Authorization: Bearer wuppy_…, created under Users → API tokens.
curl -H "Authorization: Bearer $TOKEN" -H "X-Wuppy-Request: 1" \ https://example.com/api/content/postsConventions
Section titled “Conventions”- Errors always look like
{ "error": { "code": "SLUG_TAKEN", "message": "…" } }. Codes are listed in the OpenAPI schema. - Permissions: each route needs exactly one permission; see Roles and permissions.
- Conflicts: reads return an
ETag. Send it back asIf-Matchwhen saving; a stale write gets409 CONFLICTwith the server’s version. - Retries: send an
Idempotency-Keyheader on aPOSTto make a retry safe. - Rate limits: writes are limited per user, sign-in per client.
- TypeScript:
AppTypeworks with Hono’shcclient for a typed API.