Email Templates API
The email templates resource supports migration, 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.
6 min read
Manage Reusable Email Templates
Email templates are reusable layouts and content blocks that help teams create consistent emails. They can be used 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 future emails are created. Make names, descriptions, and content clear enough that workspace users understand when to use each template.
- List current templates before importing a new 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 telling users to create broadcasts or sequences from it.
- Delete templates only after confirming they are no longer useful as starting points.
- List templates to build a template picker in an external tool.
- Create templates when importing approved layouts or starting a new workspace setup.
- Update templates when your design system or approved copy changes.
- Delete templates only after confirming they are no longer needed as a starting point.
Endpoint Overview
GET /v1/email-templates lists reusable templates. Item endpoints let your integration inspect, update, or delete one template.
POST /v1/email-templates creates a template. Template payloads include the structured email body document used by the Mailrith editor.
Treat body_document as structured editor content, not as plain text. Preserve the structure generated by your source system or by Mailrith's documented schema.
/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.
Related Guides
Create campaign drafts, send tests, and protect live broadcast sends with deliberate approval.
Manage timed email series for onboarding, nurture, migration, and lifecycle workflows.
Browse generated endpoint details and download the exact OpenAPI contract for tooling.