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
| Query | Description |
|---|---|
category | Filter by category slug |
search | Text 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
- Browse library → pick a starting point
- Clone → creates tenant-owned copy
- Edit HTML (Monaco) or blocks editor — Create and edit
- Publish a version
- Send with
templateVersionId— Send with template