// product · templates

Stop shipping HTML in your code.

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.

one call · id + variables
# 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
// what you get[01/03]

Content and code, finally separate.

01

Reusable content

Author a message once and reference it by id from anywhere — your code carries data, not markup. Change copy without a deploy.

02

Merge variables

Pass a variables object and Drin substitutes them into the template at send time, with safe escaping by default.

03

Versioned & published

Edit drafts freely; only the published version is sent. Roll a change forward — or back — without touching application code.

04

HTML + plain text

Every template carries both an HTML and a plain-text body, so every client gets a clean, readable message.

// at a glance[02/03]

Edit the email, not the deploy.

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.

See the send API →

Send bytemplate_id on POST /v1/emails
DataA variables object merged at render time
BodiesHTML and plain text, kept in sync
VersioningDraft → published; only published sends
AuthoringIn the dashboard, or over the API
Works withREST · SMTP · SDK · CLI · MCP
// pairs well with[03/03]
// author once

Move your email out of your codebase.

Create a template, publish it, and send by id with merge variables. Test in the sandbox; production starts at $3 a month.