Author your emails once, version them, and send by id with a bag of variables. Your application passes data; Drin renders the HTML and plain text. Copy changes never need a deploy again.
# POST /v1/emails — send by template id curl https://api.drin.run/v1/emails \ -H "Authorization: Bearer $DRIN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "hello@drin.run", "to": "user@acme.com", "template_id": "tmpl_welcome", "variables": { "name": "Ada", "plan": "Scale" } }' # → 202 Accepted · rendered from the published version
Author a message once and reference it by id from anywhere — your code carries data, not markup. Change copy without a deploy.
Pass a variables object and Drin substitutes them into the template at send time, with safe escaping by default.
Edit drafts freely; only the published version is sent. Roll a change forward — or back — without touching application code.
Every template carries both an HTML and a plain-text body, so every client gets a clean, readable message.
A template lives outside your build. Fix a typo, restyle a button, or update the wording, publish — and the next send picks it up. The same id works whether you call REST, SMTP, the SDK, the CLI or the MCP tools.
template_id on POST /v1/emailsvariables object merged at render timeCreate a template, publish it, and send by id with merge variables. Test in the sandbox; production starts at $3 a month.