Skip to main content
Courier Create reads and writes through these endpoints, so anything the editor does you can script.

Authentication

Two credentials reach these endpoints, and which one you use depends on where the code runs. Your server uses the API key, as above. The browser uses a JWT scoped to one Tenant, which is the same token TemplateProvider takes. Issue it with and scope it as lists. Never send the API key from a browser. It carries the whole workspace, not one Tenant, so a customer holding it can read and write every other customer’s Templates.

Endpoints

A PUT replaces the draft rather than merging into it, so send the whole document. Reading first and writing back a modified copy is the safe order.

Publishing is a separate call

A write leaves a draft. A draft doesn’t send, so a customer who edits and closes the tab has changed nothing a recipient will see. Publishing is what promotes it.
The editor publishes for the customer through its own button, or through useTemplateActions when you hide it. See .

Versions

Publishing keeps the previous published document, and reads one back by version. Use it to show a customer what changed, or to restore a document by writing an older version back with a PUT.

Common responses

401 and 403 separate cleanly. A 401 means fix the token. A 403 means the token works but was scoped too narrowly, usually a missing brand scope or a tenant in the scope that doesn’t match the path.

Tenant Templates aren’t workspace Templates

These two live in different places and neither endpoint reaches the other. A Template your customer writes in Courier Create doesn’t appear in the workspace Template list, and a workspace Template isn’t editable through these endpoints. Sending to a Tenant resolves that Tenant’s own Template.

Verify

List the Tenant’s Templates, write a draft with a PUT, then read it back. Publish it and read it again. The published document is what a send to that Tenant now resolves.

FAQ

A write leaves a draft. Call the publish endpoint, or publish from the editor, before a send resolves the new document.
A 401 means the credential is missing, malformed, or expired. A 403 means the credential is valid but too narrowly scoped, usually a missing brand scope or a tenant scope that doesn’t match the path.
Tenant Templates and workspace Templates are separate. Workspace Templates live under /notifications and are documented in the .
A browser can call them with a Tenant-scoped JWT. The API key stays on your server, because it carries the whole workspace rather than one Tenant.