Save draft
Writes the draft for an (app, kind), creating the template on the first call. Refused if the template does not parse — a draft that cannot render is not worth keeping. Declaring variables is what moves a missing field from a silent empty string in somebody's inbox to an error on the publish call. 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 <= 64TemplateBody is the rendering for one channel — or, with channel unset, the default every channel without an override uses.
A request-side message, so its bounds live here (§2.5).
items <= 8items <= 64Response Body
application/json
application/json
curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.TemplateService/SaveDraft" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"template": "map[appSlug:xmb createdAt:2026-09-14T08:00:00Z draftVersion:3 id:tm_9e1d4b7a2c6f3e8a0b5d1c43 kind:request.approved publishedVersion:2 updatedAt:2026-10-22T09:30:00Z]",
"draft": "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:false templateId:tm_9e1d4b7a2c6f3e8a0b5d1c43 variables:[map[example:Dune: Part Two name:request_title required:true] map[example:Luke name:approver required:true]] version:3]"
}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`
Unpublish template POST
Stops rendering through the template without deleting anything: the kind falls back to the publisher's own title and body, which is the ntfy path. The versions stay, so republishing is one call. Needs admin of the team that owns the app, or `notify:platform:admin`. **Required scopes:** `notify:templates:edit`