Skip to Content
Xeonr Developer Docs
API SpecificationTemplates

Get template

POST
/xeonr.notify.v1.TemplateService/GetTemplate

One template for an (app, kind) with its published and draft versions in full: the default body, the per-channel overrides and the declared variables. Either may be absent — nothing published yet, or no unpublished draft. 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:read

Authorization

BearerAuth
AuthorizationBearer <token>

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

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

appSlug?string
Length1 <= length <= 64
kind?string
Length1 <= length <= 64
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.TemplateService/GetTemplate" \  -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]",
  "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-09-14T08:00: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_3a7f2e9c1b8d4a6e0f5c2b97 published:true publishedAt:2026-09-14T08:00:00Z templateId:tm_9e1d4b7a2c6f3e8a0b5d1c43 variables:[map[example:Dune: Part Two name:request_title required:true] map[example:Luke name:approver required:true]] version:2]",
  "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]"
}