Skip to main content
Courier Create is a template and brand editor you mount in your React app. Your customers design and publish their notifications without leaving your product. Two editors, each wrapped by a provider that handles auth and state:
  • TemplateProvider wraps TemplateEditor for content.
  • BrandProvider wraps BrandEditor for logo, colors, and footer.
Everything they write is a Tenant-scoped Template. Email is fully supported.

Template editor

Mount it, restrict channels, switch templates, offer variables, publish.

Brand editor

Logo, colors, and footer, with their own scopes.

Tenant Templates API

The endpoints both editors write through.

Install the package

Requires React 18.2.0 or newer.
Import the stylesheet once in your app. An editor mounted without it renders unstyled, which reads as a broken layout rather than a missing import.

Issue a scoped token

The editor runs in the browser, so it authenticates with a JWT, never your API key. Issue one from your backend with , scoped to the Tenant the customer may edit: is the source of truth for the mint-and-sign-in flow. The scopes below are the designer’s own, and they differ from the Inbox scopes documented there.

Scopes

Scope a token to one Tenant so a customer edits only their own. Plural forms grant workspace-wide access. The per-Tenant Template scope is notifications, plural. Always include a user_id:<id> scope. A scope that is too narrow fails at save, not at mount. A token with Template scopes and no Brand scopes renders a Brand editor the customer cannot save from. Nothing reports the gap until the write is rejected.

Verify

Mount the editor and confirm it renders. A blank editor means the provider created a new draft. Publish a change, then open the Tenant’s Template in Courier and confirm it reflects what the customer wrote.

Limits & behavior

  • Issue the token server-side. Shipping your API key to the browser exposes the whole workspace.
  • A scope grants exactly what it names. A token with only notifications scopes cannot write a Brand, even with the brand editor mounted.
  • Tenant-scoped, not workspace. These Templates belong to a Tenant. For workspace Templates use the .
  • Topics are set at send time. Pass preferences.subscription_topic_id on the send. See .

FAQ

A user_id:<id> scope, plus tenant:<id>:notifications:read and :write for Templates, and tenant:<id>:brand:read / :write if you show the brand editor.
The API key never reaches the browser as long as you issue the JWT from your backend and pass only that token to the component.
Mount BrandProvider with BrandEditor and a token scoped to the Brand. See .
Email is fully supported. Pass routing to limit which channels appear, as describes.