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
https://api.splashifypro.com/api/v1/public/email/send-template
Headers
Same as Send Email — Authorization: Basic YOUR_API_KEY + Content-Type: application/json.
Request body
{
"to": "[email protected]",
"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": "[email protected]",
"reply_to": "[email protected]",
"subject": "Override the saved subject (optional)"
}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):
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://api.splashifypro.com/api/v1/public/email/send-template \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "[email protected]",
"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": "[email protected]"
}'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:
/api/v1/public/email/status/{message_id}
Common errors
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.03/email + reseller markup beyond. Category appears as email_transactional in Track Expenses.
See also
- Send Email — inline HTML send, no template needed.
- Send with Attachments — attach PDFs, images, and docs to template sends.
- Email Templates UI — visual editor.
- Authentication — how the API key works.