DocumentationTemplate library

Template library

GET /library and POST clone — system templates for your tenant.

The template library provides pre-built system templates you can clone into your tenant and customize.

Auth: JWT + X-Tenant-Id (dashboard session).

List library templates

GET https://api.mailingcore.com/library?category=welcome&search=onboarding
Authorization: Bearer <JWT>
X-Tenant-Id: clxxxxxxxx
QueryDescription
categoryFilter by category slug
searchText search in name/description

Get template detail

GET /library/:id

Returns full template preview including HTML and metadata.

Clone to your tenant

POST /library/:id/clone
Authorization: Bearer <JWT>
X-Tenant-Id: clxxxxxxxx

Creates a new template under your tenant with an initial draft version. Edit in the dashboard, then publish.

Workflow

  1. Browse library → pick a starting point
  2. Clone → creates tenant-owned copy
  3. Edit HTML (Monaco) or blocks editor — Create and edit
  4. Publish a version
  5. Send with templateVersionIdSend with template

Related