Skip to content
DocsAPI reference

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

MethodPathPurpose
GET/api/admin/cms-pagesList pages, including drafts
GET/api/admin/cms-pages/:idRead a page
POST/api/admin/cms-pagesCreate a page
PUT/api/admin/cms-pages/:idUpdate a page
DELETE/api/admin/cms-pages/:idDelete a non-legal page

The body uses slug, title, bodyMd, published, seoTitle, and seoDescription. These field names are intentionally camelCase.

json
{
  "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

MethodPathPurpose
GET/api/admin/newsletter/templatesAvailable templates
POST/api/admin/newsletter/renderRender a template preview
POST/api/admin/newsletter/testSend a test email
GET/api/admin/newsletter/campaignsList campaigns
POST/api/admin/newsletter/campaignsCreate a campaign
GET/api/admin/newsletter/campaigns/:idRead a campaign
PUT/api/admin/newsletter/campaigns/:idUpdate a campaign
DELETE/api/admin/newsletter/campaigns/:idDelete a campaign
POST/api/admin/newsletter/campaigns/:id/sendQueue campaign delivery
GET/api/admin/newsletter/campaigns/:id/statsDelivery/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.

Source reviewed Checked against kernel fe5c475.

Found something unclear? Let us know

Start exploring

NavigateOpenEscClose