Templates let you store your email HTML once and send it by id with per-message variables — no redeploy to change copy.

Create a template

Under Templates, add a name, subject and HTML. Use {{variable}} placeholders, e.g. Hi {{name}}, your code is {{code}}.

Send it

curl "https://send.esmsafrica.io/v1/emails/" \
  -H "Authorization: Bearer esms_k_..." \
  -d '{
    "from": {"email": "hello@yourdomain.com"},
    "to": [{"email": "user@example.com"}],
    "template_id": "…",
    "template_data": {"name": "Ada", "code": "482910"}
  }'

We render the template with your template_data, apply the subject (yours or the template's), and send. Everything else — tracking, webhooks, DKIM — works the same.