Skip to Content
Public APISend Template Email

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-template

Headers

Same as Send EmailAuthorization: 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)" }
FieldRequiredNotes
toyesRecipient email address
template_idyesUUID of a template you own. Find it in the URL when editing a template
variablesoptionalKey/value pairs substituted into {{key}} tokens in subject + body
from_namerecommendedDisplay name, falls back to local-part of from_email
from_emailyesMust be on a verified domain
reply_tooptionalCustomer reply address
subjectoptionalOverrides 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):

TokenValue
{{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

Statusmessage bodyMeaning
400template_id is requiredMissing field
400invalid template_idNot a valid UUID
404template not foundTemplate doesn’t exist or doesn’t belong to your account
400from_email domain '<x>' is not verified.Verify the domain first
402email_marketing not enabled on your planPlan 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