Skip to content
( TEMPLATES )

Versioned templates, rendered server-side.

Reference a template by id, pass the data, and the published version is the version that sends. Your message and your send code stay apart, so nothing drifts between releases.

( THE TEMPLATE, END TO END )

Edit the message. Never touch the send call.

A template holds every version you have edited, published, or archived. Send code references it by templateId; Samva renders the published version with the data you pass and returns a message id, so editing a template never means shipping code.

template order-update
v4 draft     edited 2h ago
v3 published  pinned
v2 archived
v1 archived

send { templateId: "order-update", templateData: { orderId: "A-1042" } }
the published version is the version that sends
#01VERSIONS

Edit, publish, and roll back.

  • Every edit creates a new version instead of overwriting the one that is sending
  • Publish a version and it becomes the one that sends, with one call
  • Restore an older version from its history if a publish doesn't work out
ALL ABOUT VERSIONS
order-update · versions
v4draft
v3published
v2archived

Restore v2 and it becomes the version that sends again, with one call.

#02RENDERING

Pass data by name, get back finished HTML.

  • Reference a template with templateId instead of inline subject and html
  • Pass templateData by name and Samva renders the published version server-side
  • Preview and validate a template's content before you publish it
ALL ABOUT RENDERING
POST /v1/messages
templateId: "order-update"
templateData: { orderId: "A-1042" }

Samva renders the published version server-side with the data you pass, and returns the finished message.

#03REUSE

One template, every send that needs it.

  • Create a template once and send from it by reference wherever the message repeats
  • Content lives in one place, so a copy fix ships without a deploy
  • Duplicate a template to start a variant from a known-good version
ALL ABOUT REUSE
templateId: "order-update"
checkout service → send
fulfillment service → send
support tool → send

Every service that triggers this message references the same template by id.

( KEEP READING )

The rest of the email channel.

Common questions.

What is a template in Samva?

A reusable, versioned email body. Create it once, then send from it by passing templateId on a message instead of inline subject and html, so the content lives in one place.

How do I change what a template sends without touching code?

Edit the template and publish the new version. The published version is the version that sends, and your send call keeps referencing the same templateId, so nothing in your codebase changes.

Can I undo a template change?

Yes. Every edit is a version, and version history keeps each one. Restore an earlier version and it becomes the one that sends again.

How does data get into a rendered template?

Pass templateData on the send call with the values the template expects, keyed by name. Samva renders the published version server-side and sends the result, so the layout and the data stay separate.

Can I check a template before it goes out?

Yes. Render and preview a template's output before publishing, so you see the finished email before it reaches a version that sends.

Get started

Publish the first template today.

Sign up and send your first message from a version you control.