Publish template
Promotes the draft to live as a new immutable version. From here on, a publish naming this kind renders through it, and each message records the version it rendered so the delivery log can show what was sent even after the template moves on. Needs admin of the team that owns the app, or notify:platform:admin. A product's service account may call this for its own application, so a product ships its wording with its code and publishes it at boot, idempotently.
Required scopes: notify:templates:edit
Authorization
BearerAuth An access token from Xeonr Auth, presented as
Authorization: Bearer <token>. Its audience must include
https://notify.xeonr.io, and it must carry the scope the method
lists.
In: header
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
1 <= length <= 641 <= length <= 64Response Body
application/json
application/json
curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.TemplateService/PublishTemplate" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"template": "map[appSlug:xmb createdAt:2026-09-14T08:00:00Z draftVersion:0 id:tm_9e1d4b7a2c6f3e8a0b5d1c43 kind:request.approved publishedVersion:3 updatedAt:2026-10-22T09:30:00Z]",
"published": "map[channelBodies:[map[body:{{.approver}} approved your request for {{.request_title}}. channel:CHANNEL_EMAIL html:<p>{{.approver}} approved your request for <b>{{.request_title}}</b>.</p> subject:[XMB] {{.request_title}} was approved title:{{.request_title}} was approved]] createdAt:2026-10-22T09:30:00Z createdBy:urn:xeonr:auth:uid:user:3 defaultBody:map[body:{{.approver}} approved your request for {{.request_title}}. title:{{.request_title}} was approved] id:tv_6b2d8f4a1e9c3b7d0a5e2f16 published:true publishedAt:2026-10-22T09:30:00Z templateId:tm_9e1d4b7a2c6f3e8a0b5d1c43 variables:[map[example:Dune: Part Two name:request_title required:true] map[example:Luke name:approver required:true]] version:3]"
}Preview template POST
Renders a template against a payload without publishing or sending anything — the console's live preview, and the way to see the email exactly as it will arrive. Pass the bodies inline to preview the editor's current contents, or omit them to render whatever is stored, draft first. An empty payload falls back to each variable's declared example, which is what makes a preview work before anybody has invented one. A kind with no template at all previews as empty rather than failing. Parse errors and missing required variables come back in `error`; variables the bodies reference but do not declare come back in `undeclared`, which is not an error but is usually a typo. Needs admin of the team that owns the app, or `notify:platform:admin`. **Required scopes:** `notify:templates:read`
Put kind POST
Creates or replaces one catalogue entry, idempotent on (app, kind). The category is the coarse grouping subscribers filter on — deliberately coarse, because a settings row per event type is the named failure mode of every notification system that has one. A critical kind reaches a recipient even through an off switch, and its deliveries are marked forced so the ledger shows the override rather than hiding it. A sensitive kind's content is never readable over the API and is scrubbed from the store once delivered — for password resets and one-time codes. Needs admin of the team that owns the app, or `notify:platform:admin`. A product's **service account** may call this for its own application — the one whose slug the account's token names — so a product owns its catalogue and its credentials without a person in the loop. **Required scopes:** `notify:templates:edit`