Templates

Store HTML once. Send with a slug and a data object. No more copying markup into every request.

How it works

  1. Edit a template in Dashboard → Templates (welcome, OTP, invoice, and more).
  2. Use {{name}} placeholders in the subject or HTML.
  3. POST /api/send with template + data.

Request

Send with a template

Starter slugs

SlugVariables
welcomename, product
verify-emailname, link
password-resetname, code
otpname, code
invoicename, amount, invoice_id, date
payment-successfulname, amount, product
payment-failedname, amount, retry_url
subscription-expiringname, plan, date
account-suspendedname, reason, support_url

from — optional if you have one Gmail connected. Required if you have several.

Missing data — the API returns 400 listing the empty {{variables}}.

Custom HTML — omit template and send subject + html as before.