Email Templates
Templates built for developers
Email templates in Mail Tactic are version-controlled, variable-driven, and accessible via API. Design once, send forever, update without deploying.
How templates work
Templates live in your Mail Tactic account and are referenced by ID at send time:
curl -X POST https://api.mailtactic.com/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"to": "user@example.com",
"from": "noreply@yourdomain.com",
"template_id": "welcome-email",
"variables": {
"first_name": "Alice",
"activation_url": "https://app.example.com/activate/abc123"
}
}'
Variable substitution
Templates support {{ variable_name }} syntax. Pass any key-value object at send time and variables are substituted before delivery. Missing variables render empty by default, or throw if you enable strict mode.
Versioning
Every template change creates a new version. Send against any version by ID, or always use the latest. Roll back instantly if something looks wrong.
Multi-language support
Store locale-specific template variants under the same template ID. Pass a locale field at send time and Mail Tactic selects the right variant automatically.
Previewing
Preview any template with test variable values directly from the dashboard — rendered as both HTML and plain text, across simulated email clients.
Plain text fallback
Every template includes an auto-generated plain text version. Or provide your own. Plain text matters for deliverability and accessibility.
What’s next
- API Reference — manage templates via API
- SDKs — create and send templates from your code
- Getting started — create your first template in minutes