The Courier Create API lets you create and update stored notification templates over HTTP. It powers the same Elemental model you edit in Design Studio and embed with the Courier Create React package. Use it from a script or CI when you want versioned, repeatable changes (for example, promoting a template across environments). This tutorial walks through a realistic order confirmation email: save a draft, refine the content, publish, then fetch the published version. You should be comfortable with Elemental basics. For request fields and status codes, see the Courier Create API reference.Documentation Index
Fetch the complete documentation index at: https://www.courier.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
These endpoints manage templates scoped to a specific tenant (
/tenants/{tenant_id}/templates/...). They are part of the Courier Create feature set and are separate from workspace-level notification templates you configure in the Courier dashboard.Prerequisites
- Courier API key with permission to manage tenant notification templates (or a JWT with the right scopes if you mirror Courier Create authentication)
- A tenant ID (replace placeholders below)
- Node.js (
npm install @trycourier/courier) or Python (pip install trycourier)
TEMPLATE_ID per tenant; reusing the same ID updates the template in place. Export:
Step 1: Create a draft template
Save an initial draft withpublished: false. The body uses TenantTemplateInput with required content (Elemental). This example uses email-oriented elements at the root: meta (subject), text, and an action link.
Step 2: Update the draft
Refine copy without publishing yet: send anotherPUT with the same template_id, still published: false. Add a divider and a support line so the email matches what you might ship after review.
Step 3: Publish
CallPOST /tenants/{tenant_id}/templates/{template_id}/publish with an empty body (or {"version": "latest"}) to publish the latest draft.
Step 4: Read the published version
Confirm what recipients will see by fetching the published snapshot:latest for the newest saved draft (published or not, depending on your workflow) and published for what is live.
Step 5: Send a message using the template
Reference a tenant template in the Send API by prefixing the template ID withtenant/ and setting context.tenant_id:
tenant/ prefix tells the Send API to resolve the template from the tenant’s notification map rather than from workspace-level notifications.
What you built
You now have a published template with version history: drafts fromPUT with published: false, a live version from POST .../publish, a way to audit what is live via GET .../versions/published, and a send call that delivers messages using the template.
What’s Next
Courier Create API reference
Endpoints, fields, and error codes
Elemental tutorial
More patterns for content structure
Preview in Studio
Test with sample data before you publish
Send API
Deliver messages that reference this template