Email Templates API
The email templates resource supports migrations, governance, and external template sync. This guide explains when to use templates, how to preserve structured editor content, and how to keep template names and descriptions useful for workspace users.
Manage Reusable Email Templates
Email templates are reusable layouts and content blocks that help teams create consistent emails. Teams can use templates as starting points for broadcasts, sequences, and other email workflows.
Use the email templates API for migrations from another email platform, external content governance, approved template libraries, or internal tools that keep brand-approved layouts synchronized.
Template changes can affect how users create future emails. Make template names, descriptions, and content clear enough that workspace users know when to use each template.
- List current templates before you import a new template library.
- Create or update one template at a time so review is easier.
- Use a plain name and description that match how users choose templates in Email Templates.
- Preserve structured
body_documentcontent exactly as the public schema expects. - Preview or test the template in Mailrith before you tell users to create broadcasts or sequences from the template.
- Delete templates only after you confirm they are no longer useful as starting points.
- List templates to build a template picker in an external tool.
- Create templates when you import approved layouts or set up a new workspace.
- Update templates when your design system or approved copy changes.
- Delete templates only after you confirm they are no longer needed as starting points.
Endpoint Overview
GET /v1/email-templates lists reusable templates. Item endpoints let your integration inspect, update, or delete a single template.
POST /v1/email-templates creates a template. The template payload includes the structured email body document that the Mailrith editor uses.
Treat body_document as structured editor content, not plain text. Keep the structure generated by your source system or by Mailrith's documented schema.
Template names can be up to 160 characters. Serialized body_document content must be 512000 bytes or less.
/v1/email-templates List email templates
Returns reusable email templates linked to the authenticated workspace.
View Schema /v1/email-templates Create an email template
Creates a reusable email template scoped to the authenticated workspace.
View Schema /v1/email-templates/{template_id} Get an email template
Returns a reusable email template linked to the authenticated workspace.
View Schema /v1/email-templates/{template_id} Update an email template
Updates the content or enabled state of an existing email template.
View Schema /v1/email-templates/{template_id} Delete an email template
Deletes an existing email template linked to the authenticated workspace.
View Schemacurl -X POST https://api.mailrith.com/v1/email-templates \
-H "Authorization: Bearer mrk_example_secret_key" \
-H "Idempotency-Key: template-welcome-v1" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome newsletter",
"description": "Default newsletter layout for the workspace",
"enabled": true,
"body_document": {
"type": "doc",
"content": []
}
}' Need Help Shipping an Integration?
Reach the Mailrith team if you need help planning a sync, validating a webhook flow, or troubleshooting a request.