Templates

Version history

Templates have a draft vs published lifecycle and a full version history, so you can iterate safely without disrupting live sends.

Templates used in production need a workflow that lets you change them safely without disrupting active emails. MailBlastr gives you a draft vs published lifecycle plus a full version history, so you can edit and test freely while live sends keep using the last published version.

Draft vs published

A template starts as a draft and must be published before it can be used to send. Keeping the two separate lets you:

  • Test a template thoroughly before it goes live.
  • Make edits without affecting emails that are already sending.
  • Maintain version control over your email content.

Once you publish, that published version is used for every send until you publish again. You can keep working on the draft in the meantime — the editor autosaves your progress and live sends are unaffected.

Create then publish

Create a template, then publish it with a separate call. Sending references the published version by id.

# Create the template (starts as a draft)
curl -X POST 'https://api.mailblastr.com/templates' \
  -H 'Authorization: Bearer mb_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "order-confirmation",
    "from": "Acme Store <store@yourdomain.com>",
    "subject": "Thanks for your order!",
    "html": "<p>Name: {{{PRODUCT}}}</p><p>Total: {{{PRICE}}}</p>",
    "variables": [
      { "key": "PRODUCT", "type": "string", "fallback_value": "item" },
      { "key": "PRICE", "type": "number", "fallback_value": 20 }
    ]
  }'

# Publish it
curl -X POST 'https://api.mailblastr.com/templates/{template_id}/publish' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'

After publishing you can keep editing the template through the editor or via the API without affecting the published version, so you can validate new edits before they reach recipients.

Version history

As you work, changes are saved as a draft (you can also save manually with Cmd/Ctrl + S). Nothing reaches live sends until you publish again. Each template keeps a version history so you can track what your team changed over time — open it from the three-dot menu in the top-right of the editor.

From the version history you can preview each version, see who made it and when, and revert to an earlier one. Reverting creates a new draft based on that version’s content; it does not change the published template.

Iterating on a live template

You can build a new draft of a published template — redesign it, rework the copy, add or remove variables — and test it thoroughly before publishing again. Your sends keep using the current published version until you make the switch, so there is no need to spin up a separate template and no risk of leaking unfinished changes (like a new logo) into live email.

Because draft edits do not affect the published version, you can safely add or remove variables on a production template without breaking existing sends or raising validation errors.