POST
Create a notification template

Authorizations

Authorization
string
header
required

A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.

Headers

Idempotency-Key
string
required

A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.

Body

application/json

THE COPY GOES LIVE ON THE NEXT SEND of this event, with no review step in between. Send is_active false to STAGE it instead: the row exists and the event keeps sending the platform default wording until you switch it on. The subject and body are PARSED before they are stored, so a broken construct is a 400 now rather than a send that fails at 2am for every order on this event. One template per (store, event, channel): an event you have already customised is 409 template_exists, and the next move is a PATCH.

event_key
string
required

The send this template overrides, such as order.confirmation or customer.password_reset. IMMUTABLE once created, because every send looks a template up by (store, event, channel); the PATCH refuses this key rather than ignoring it.

subject
string
required

text/template source for the header line. Placeholders are the event's own payload fields, written {{.order_number}}. A missing placeholder renders empty rather than failing.

body
string
required

html/template source for the message. Escaped as HTML on render, so a value carrying markup is not a way to inject it.

is_active
boolean

Defaults to true. false stages the copy without using it.

Response

Created

data
object