Content and email
Manage CMS pages, newsletter subscribers, campaigns, and custom email content.
The administrative endpoints on this page use an admin session. The reviewed token policy does not include scopes for CMS editing or newsletter management.
CMS pages
| Method | Path | Purpose |
|---|---|---|
GET | /api/admin/cms-pages | List pages, including drafts |
GET | /api/admin/cms-pages/:id | Read a page |
POST | /api/admin/cms-pages | Create a page |
PUT | /api/admin/cms-pages/:id | Update a page |
DELETE | /api/admin/cms-pages/:id | Delete a non-legal page |
The body uses slug, title, bodyMd, published, seoTitle, and seoDescription. These field names are intentionally camelCase.
{
"slug": "about-us",
"title": "About our workshop",
"bodyMd": "We build products for people who love their workshop.",
"published": false
}
Public reads use GET /api/pages and GET /api/pages/:slug, resolving the shop from its publishable key. Only published pages appear. A detail response includes slug, title, bodyMd, and updatedAt.
Newsletter subscribers
Administrative routes under /api/admin/newsletter/ include:
GET stats: subscriber overview.GET subscribers: subscriber list.GET subscribers/export: CSV export.PATCH subscribers/:id: update a subscriber.
The legacy public subscription and tracking handlers use /store/newsletter..., without /api. The split backend allowlists do not currently expose this prefix. Confirm the configured public routing before linking a signup form to those handlers.
Campaigns
| Method | Path | Purpose |
|---|---|---|
GET | /api/admin/newsletter/templates | Available templates |
POST | /api/admin/newsletter/render | Render a template preview |
POST | /api/admin/newsletter/test | Send a test email |
GET | /api/admin/newsletter/campaigns | List campaigns |
POST | /api/admin/newsletter/campaigns | Create a campaign |
GET | /api/admin/newsletter/campaigns/:id | Read a campaign |
PUT | /api/admin/newsletter/campaigns/:id | Update a campaign |
DELETE | /api/admin/newsletter/campaigns/:id | Delete a campaign |
POST | /api/admin/newsletter/campaigns/:id/send | Queue campaign delivery |
GET | /api/admin/newsletter/campaigns/:id/stats | Delivery/engagement statistics |
Creation requires name, template_slug, and subject; optional fields include preheader, content, and audience_filter. Use a template returned by the templates endpoint and preview its content before sending.
Custom emails and attachments
The campaign body can include body_html for custom HTML and attachments descriptors. When HTML is provided, the normal template lookup is skipped. Upload attachments through POST /api/admin/newsletter/attachments and reuse the returned descriptors; attachment ownership is checked against the shop.
Audience selection belongs to audience_filter. An empty legacy filter targets subscribers. A successful send response describes queued recipients; it is not a guarantee that every destination has received the email.
Found something unclear? Let us know