Examail Templates
Manage reusable email templates, support dynamic variables, and maintain a consistent brand identity.
Visual Editor
Create templates using our drag-and-drop builder without writing code
Raw HTML
Upload or write raw HTML for full control over your email design
Variable Substitution
Use Handlebars-like syntax for dynamic personalization
Version Control
Keep track of template changes and easily rollback if needed
Template Variables Syntax
Our templating engine uses double curly braces {{variableName}}. When sending an email, pass the matching keys in the variables object.
<!-- Template Content --><h1>Welcome, {{firstName}}!</h1><p>Your subscription to the {{planName}} plan is confirmed.</p><a href="{{loginUrl}}">Log in to your account</a>
Sending with a Template ID
Instead of passing HTML content directly, provide the templateId and the required variables.
{"to": "customer@example.com","from": "hello@yourdomain.com","subject": "Welcome Aboard!","templateId": "tpl_abc123xyz","variables": {"firstName": "Alex","planName": "Pro","loginUrl": "https://yourdomain.com/login"}}
Managing Templates via API
Full template CRUD is available under /v1/email/templates— you don't need the dashboard. Variables are auto-detected from {{...}} placeholders in bodyHtml/bodyText.
| Method | Path | Description |
|---|---|---|
| GET | /v1/email/templates | List templates (paginated, limit/offset) |
| POST | /v1/email/templates | Create a template |
| PUT | /v1/email/templates/:templateId | Update name/subject/body |
| DELETE | /v1/email/templates/:templateId | Soft-delete (deactivate) |
Create a template
curl -X POST 'https://api.sendexa.co/v1/email/templates' \-H 'Content-Type: application/json' \-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \-d '{"name": "Welcome Email","subject": "Welcome, {{firstName}}!","bodyHtml": "<h1>Welcome, {{firstName}}!</h1><p>Your {{planName}} plan is active.</p>","bodyText": "Welcome, {{firstName}}! Your {{planName}} plan is active."}'