Skip to main content
This page covers the REST API for tenant notification templates. These endpoints let you create, update, list, read, version, and publish templates within a specific tenant. For workspace-wide templates (/notifications/...), use the Templates API.
Check out the Courier Create API tutorial for a detailed walkthrough with code samples.

Base URL and authentication

All paths are rooted at https://api.courier.com. Send your API key in the Authorization header as Bearer <token>. For browser-embedded Courier Create, use a JWT with the right tenant template scopes instead of the workspace key; see Courier Create authentication.

Endpoint guide

The sections below describe Courier Create routes in the API Reference. Each one links to the matching operation for schemas, query parameters, and status codes.

List templates

GET /tenants/{tenant_id}/templates returns a paginated list of templates for one tenant. Use limit and cursor from the response to walk pages (default page size 20, max 100).

Create or replace

PUT /tenants/{tenant_id}/templates/{template_id} creates a template when the ID is new (201) or updates it in place when it already exists (200). Notification content uses Elemental (ElementalContentSchema). Build the same JSON you would use with the Elemental overview: a version, an elements array, plus routing or channel data when you need it. Request body (PutTenantTemplateRequest):
FieldTypeRequiredDescription
templateobjectYesTenantTemplateInput (see below)
publishedbooleanNoDefault false. If true, save and publish in one step
template object (TenantTemplateInput):
FieldTypeRequiredDescription
contentElementalYesElementalContent: version plus elements array
routingobjectNoMessageRouting; multi-channel routing
channelsobjectNoMessageChannels; per-channel config
providersobjectNoMessageProviders; provider overrides

Get current template

GET /tenants/{tenant_id}/templates/{template_id} returns the current template for that tenant and ID. Use it when you need the latest merged view without requesting a specific version string.

Get a specific version

GET /tenants/{tenant_id}/templates/{template_id}/versions/{version} returns one version of the template. The version path segment accepts latest, published, or a concrete identifier such as v1 or v2.

Publish

POST /tenants/{tenant_id}/templates/{template_id}/publish publishes a draft so it becomes what recipients resolve when sending. The optional request body can include a version string; it defaults to latest (publish the newest draft). The template must already exist for the tenant.

Common responses

Each Courier Create operation documents its own responses in openapi-specs/openapi.documented.yml in the mintlify-docs repo (paths under /tenants/{tenant_id}/templates). Typical codes:
StatusMeaning
200Successful read, list, or publish with a response body; or template updated (PUT when the template already existed)
201Template created (PUT when the template is new)
400Bad request / validation error
404Tenant, template, or version not found (where that operation defines it)
413Payload too large (PUT /tenants/{tenant_id}/templates/{template_id} only)

Tenant templates vs workspace templates

These routes are tenant-scoped: paths start with /tenants/{tenant_id}/templates/... and isolate template data per tenant. For the workspace catalog (/notifications/...) shared across the account, use the Templates API.

What’s Next

How to Use the Courier Create API

Draft, update, publish, and verify with code

Design Studio overview

Editing experience in the UI

Elemental

Build template.content

Courier Create authentication

JWT scopes for embedded template editing