Skip to main content
covers the concepts behind this page.
A tenant template overrides one of your templates for a single customer, keyed by an id you choose. Their admin can rewrite the copy in their own voice, and only their users see it. Everyone else keeps the default. You create, publish, and delete tenant templates through the API, then reference them in a send with the tenant/<template_id> format. A tenant template is not a separate template you have to route to. Your send logic does not branch on which customer it is for. It names the same id every time, and Courier merges the tenant’s version over the message when one exists. Leave the tenant/ prefix off and the send succeeds with the wrong content. Courier reads template: "welcome" as your workspace template and renders that, because a template id that resolves is not an error. The customer’s edits are not in the message.
Tenant templates have no console UI, so create, list, and delete them through the API, as every step below does. To hand the editing to your customer instead, in your own app.

Prerequisites

Manage tenant templates

1

Create or update a tenant template

Create or replace a tenant’s template with the . The template_id is an ID you choose for this tenant’s template. Every element sits inside a channel block, the same rule follow.
2

Publish the template

Changes take effect once published. to make it live.
3

List and read templates

, , or read a .
4

Delete a template

removes it. This is the only way to remove one, since there is no console UI for it.
5

Send with the tenant template

Reference the tenant template in a send with template: "tenant/<template_id>", and set the tenant in the context. The word tenant is literal. Your tenant ID goes in context.tenant_id.
At send time, Courier merges the tenant template’s content over the message and routes it normally.
6

Verify the template

After publishing, and confirm the content is what you sent. Then send with template: "tenant/<template_id>" in the tenant’s context and check the message log to confirm the tenant’s content rendered.

Limits & behavior

  • A draft that is never published reaches nobody. Creating or replacing a tenant template writes a draft, and the send keeps rendering the last published version until you publish the new one.
  • The tenant id sits in a different place per method. list takes it positionally while retrieve, replace, and publish take it in the body. Check the installed SDK types under resources/tenants/ before writing against these.
  • Tenant templates have no console UI. No screen creates, lists, or deletes them, so a template that exists only for one customer is invisible to anyone looking in .