Send Template Email
Send an email using a template you built in the visual editor . Pass template_id + a variables map; the backend pulls the rendered HTML snapshot, substitutes {{variable}} tokens, and queues the send.
This is the right endpoint when:
- You’re sending the same shape of email repeatedly (order confirmations, OTP codes, password resets) and want to maintain the design in one place.
- You want non-developers to update the email body without redeploying your app.
For one-off sends with bespoke HTML, use Send Email instead.
Endpoint
POST https://apis.splashifypro.com/api/v1/public/email/send-templateHeaders
Same as Send Email — Authorization: Basic YOUR_API_KEY + Content-Type: application/json.
Request body
{
"to": "alice@example.com",
"template_id": "5d7e2a1f-3c4b-4d8a-9b1c-7e8f9a0b1c2d",
"variables": {
"first_name": "Alice",
"order_number": "1234",
"tracking_url": "https://acme-store.com/track/1234",
"items": "2 × Widget, 1 × Gadget"
},
"from_name": "Acme Store",
"from_email": "orders@acme-store.com",
"reply_to": "support@acme-store.com",
"subject": "Override the saved subject (optional)"
}| Field | Required | Notes |
|---|---|---|
to | yes | Recipient email address |
template_id | yes | UUID of a template you own. Find it in the URL when editing a template |
variables | optional | Key/value pairs substituted into {{key}} tokens in subject + body |
from_name | recommended | Display name, falls back to local-part of from_email |
from_email | yes | Must be on a verified domain |
reply_to | optional | Customer reply address |
subject | optional | Overrides the template’s saved subject when provided |
Variable substitution
Tokens use double-brace syntax: {{first_name}}, {{order_total}}, etc. They’re substituted in the subject, HTML body, and plaintext body independently — so you can use the same variable in all three places.
Reserved tokens (always populated):
| Token | Value |
|---|---|
{{recipient_email}} | The to value |
Unknown tokens render as empty strings rather than failing the send. Use this to make optional fields safe (e.g., {{coupon_code}} is empty when no coupon applies).
Values can be strings, numbers, or booleans. Nested objects get JSON-stringified.
Example
curl -X POST https://apis.splashifypro.com/api/v1/public/email/send-template \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "alice@example.com",
"template_id": "5d7e2a1f-3c4b-4d8a-9b1c-7e8f9a0b1c2d",
"variables": {
"first_name": "Alice",
"order_number": "1234",
"tracking_url": "https://acme-store.com/track/1234"
},
"from_name": "Acme Store",
"from_email": "orders@acme-store.com"
}'If the template’s saved subject is "Order #{{order_number}} confirmed", the recipient sees subject "Order #1234 confirmed".
Successful response — 200 OK
{
"result": true,
"status": "queued",
"message_id": "0190ed42-1234-7c8e-9f0a-abcdef012345"
}Same status polling endpoint as Send Email:
GET /api/v1/public/email/status/{message_id}Common errors
| Status | message body | Meaning |
|---|---|---|
400 | template_id is required | Missing field |
400 | invalid template_id | Not a valid UUID |
404 | template not found | Template doesn’t exist or doesn’t belong to your account |
400 | from_email domain '<x>' is not verified. | Verify the domain first |
402 | email_marketing not enabled on your plan | Plan flag is off |
When to update the template snapshot
The render pipeline uses the pre-compiled HTML snapshot that was saved the last time you clicked Save in the visual editor — not a fresh render per send. This keeps per-recipient cost negligible (just string-replace) but means you need to save the template before changes show up in API sends.
If a customer reports the wrong template content, confirm the latest version was saved + re-test.
Billing
Same as Send Email: first 100/day combined free, then ₹0.05/email + reseller markup beyond. Category appears as email_transactional in Track Expenses.
See also
- Send Email — inline HTML send, no template needed.
- Email Templates UI — visual editor.
- Authentication — how the API key works.