Production Ready1 min read
Templates & Variables
Use `{{variables}}` and mail-safe HTML/CSS hygiene.
Module:dashboard/templates/introduction
Templates and variables#
Templates are reusable email bodies that support {{variables}} substitution.
- Variables are rendered per recipient at send time.
- Built-in safety: HTML is inlined (Mailjet-style) for better Gmail rendering.
- Oversized base64 images are stripped to avoid clipping/broken icons in clients.
Key behavior#
When you send with a template, your message can include placeholders like:
{{otp}}{{name}},{{firstName}},{{lastName}}- Any other
{{key}}you supply in the variables object
Preview#
Use:
POST /api/v1/templates/:id/preview
to render a preview with example variables before sending.
Related Documentation
Explore interconnected guides and API endpoints.
Have a question about this guide?
Contact our engineering and deliverability support team anytime.