The
status field on templates and versions is a free-text label kept for compatibility. Nothing enforces it. A version labelled draft can be live, and one labelled published might not be. Use is_current and lifecycle to know what will send.
In the builder
Saving in the builder creates a new version and makes it live immediately. Every integration sends the new content from that moment. If a template is in active use, try changes on a duplicate first, or use the API workflow below.Over the API
Changing content and making it live are separate steps with separate scopes. A key withtemplates:update can prepare versions, while only a key with templates:activate can put one live.
- Create a version:
POST /v1/templates/{id}/versionswithblocks, plus an optionalsample_dataand anotesaying why. The blocks must compile or nothing is created. The new version is never live on creation, so sends keep using the live version. - Check it:
POST /v1/templates/validateis a free dry run of the same blocks. - Activate it:
POST /v1/templates/{id}/versions/{version_id}/activate. The version is validated again first: its blocks must still compile, and its buttons may only reference destinations and modals that still exist in your organization.
expected_current_version_id with the live version you read before deciding. If someone else activated a different version in the meantime, the request fails with 409 current_version_changed. The response includes current_version_id, so you can look again rather than overwrite their change. Without it, activation behaves as it always has.
Activating the version that is already live changes nothing (changed: false). Template creation, version creation and activation all accept an Idempotency-Key, so a retry after a network failure replays the first answer instead of acting twice.
Compile and send responses include version_id and version_number: the version that was actually used.
Roll back
Rolling back is activating an earlier version.GET /v1/templates/{id}/activations lists every change of the live version, newest first:
- which version went live, and which one it replaced;
- who made the change;
- where it came from:
web,api,mcporsystem. Builder saves and restores are recorded aslegacy, andmigrationmarks the version that was live when the history began; - the note, if one was given.
Schedules and digests
Scheduled messages and batch digests created through the API send the version that was live when they were created. Later activations do not change them, including recurring messages. Batch digests created in the web app use the live version at the time each digest is sent.Archive a template
Archiving retires a template without losing anything. An archived template cannot be sent, compiled, versioned or activated (409 template_archived), but its versions, live version and history are all kept. POST /v1/templates/{id}/unarchive returns it to service exactly as it was.
409 template_in_use while anything would still send the template on its own: scheduled messages that are waiting, active digests, or /lb-send. The response’s uses counts each, so you know what to pause or move first. LithoBlocks does not pause them for you.
Prefer archiving to deleting. Deleting a template also deletes its send history.
Template lifecycle · API authoring
