API reference
Pens
Playgrounds with HTML (template), CSS and JS – editor and public view under /cms-admin/pen/<uuid> (see manual).
{ "id": 1, "uuid": "bbda7c51-1a00-499b-a75b-39bb374b314b", "title": "Getränke-Test",
"html": "<h1>{{ page.title }}</h1>", "css": "h1 { color: red }", "js": "", "public": true, "show_code": true,
"created_at": 1791287700, "updated_at": 1791287760 }
| Endpoint | Access | Description |
|---|---|---|
GET /pens |
🔑 | All pens, most recently changed first |
POST /pens |
✏️ | Create (title, html, css, js, public, show_code – default true; false = publicly only the result as a standalone page); the server assigns the uuid |
GET /pens/{uuid} · PUT /pens/{uuid} · DELETE /pens/{uuid} |
🔑 / ✏️ | Read, change (with base_updated_at), delete |
POST /pens/{uuid}/preview |
🔑 | Renders an unsaved state (html, css, js, title) → { "html": "<!doctype html>…" }, 422 on template errors |
Changes to pens don’t clear the page cache.