Templates & Variables
ShippedUse `{{variables}}` and mail-safe HTML/CSS hygiene.
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.