Notification Templates API
Manage the notifications ThunderID sends. Templates are defined per channel. Content can embed placeholders resolved at render time: translations ({{t(key)}}) for the recipient’s language and context values ({{ctx(var)}}) for both channels, plus design tokens ({{design(token)}}) in the email body only. All operations require the system OAuth2 scope; within it, list and read require the notification-template view permission while create, update, and delete require the notification-template manage permission.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
clientCredentials flow, token URL /oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
Templates
List, create, update, and delete notification templates.
List templates
GET /notification-templates/{channel}/templates
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel | path | string | Yes | Notification channel supported by this API version. Allowed values: |
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of templates | TemplateListResponse |
400 | Bad request | Error |
401 | Unauthorized | Error |
403 | Forbidden | Error |
500 | Internal server error | Error |
Create a template
POST /notification-templates/{channel}/templates
Create a template with the provided content. The content must match the shape for the given channel. The handle is immutable and unique within the channel; a duplicate handle is rejected with 409.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel | path | string | Yes | Notification channel supported by this API version. Allowed values: |
Request body (required): application/json
Schema: CreateTemplateRequest
Responses
| Code | Description | Schema |
|---|---|---|
201 | Template created | Template |
400 | Bad request | Error |
401 | Unauthorized | Error |
403 | Forbidden: insufficient permissions (AUTH-4030), or the store runs in declarative-only mode so templates cannot be created through the API (NTM-1024). | Error |
409 | Conflict: a template with the same handle already exists in the channel. | Error |
500 | Internal server error | Error |
Get a template
GET /notification-templates/{channel}/templates/{id}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel | path | string | Yes | Notification channel supported by this API version. Allowed values: |
id | path | string (uuid) | Yes | Unique identifier of the template. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Template | Template |
400 | Bad request | Error |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Not found | Error |
500 | Internal server error | Error |
Update a template
PUT /notification-templates/{channel}/templates/{id}
Updates the template's displayName, description, content, and design configuration. The content must match the shape for the given channel.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel | path | string | Yes | Notification channel supported by this API version. Allowed values: |
id | path | string (uuid) | Yes | Unique identifier of the template. |
Request body (required): application/json
Schema: UpdateTemplateRequest
Responses
| Code | Description | Schema |
|---|---|---|
200 | Template updated | Template |
400 | Bad request | Error |
401 | Unauthorized | Error |
403 | Forbidden: insufficient permissions (AUTH-4030), or the template is declared in a file and is read-only (NTM-1022). | Error |
404 | Not found | Error |
500 | Internal server error | Error |
Delete a template
DEL /notification-templates/{channel}/templates/{id}
Deletes the template. Idempotent, so deleting a template that does not exist also returns 204. Rejected with 409 if a flow references the template.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel | path | string | Yes | Notification channel supported by this API version. Allowed values: |
id | path | string (uuid) | Yes | Unique identifier of the template. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Template deleted, or already absent. | |
400 | Bad request | Error |
401 | Unauthorized | Error |
403 | Forbidden: insufficient permissions (AUTH-4030), or the template is declared in a file and is read-only (NTM-1022). | Error |
409 | Conflict: the template is referenced by a flow and cannot be deleted. | Error |
500 | Internal server error | Error |
Schemas
TemplateListResponse
Type: object
A page of template summaries in the requested channel.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | Number of results that match the listing operation. | |
startIndex | integer | Index of the first element of the page, which will be equal to offset + 1. | |
count | integer | Number of elements in the returned page. | |
templates | array of TemplateSummary | Yes | Templates available in the requested channel. |
links | array of Link | Pagination links (for example next and previous pages). Empty when there are no further pages. |
TemplateSummary
Type: object
Basic template details and a link to the full template.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | Unique identifier of the template. Used as the {id} path parameter. |
handle | string | Yes | Immutable, unique identifier for the template within its channel. Used to reference the template (for example from a flow) instead of the id. |
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
self | string | Yes | Relative URL of this template. |
Template
Type: one of: EmailTemplate, SmsTemplate
A notification template. The shape matches the channel in the path (the channel is not repeated in the payload): the email channel returns an EmailTemplate and the sms channel returns an SmsTemplate.
EmailTemplate
Type: object
Email template with content and optional design references.
11 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | Unique identifier of the template. Used as the {id} path parameter. |
ouId | string (uuid) | Yes | The ID of the organization unit this template belongs to. Set at creation and immutable thereafter. |
handle | string | Yes | Immutable, unique kebab-case identifier for the template within its channel. Used to reference the template (for example from a flow) instead of the id. |
isReadOnly | boolean | Yes | Indicates whether the template is defined in declarative configuration and cannot be modified or deleted through the API. |
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
design | TemplateDesign | Design references for this template. | |
design.colorScheme | string | Color theme variant of the application's branding to apply at render. Allowed values: | |
content | EmailTemplateContent | Yes | Email content that may include translations and context placeholders. |
content.subject | string | Yes | Subject line, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not allowed in the subject. |
content.body | string | Yes | Body, optionally containing translation ({{t(key)}}), context ({{ctx(var)}}), and design-token ({{design(token)}}) placeholders. |
SmsTemplate
Type: object
SMS template.
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | Unique identifier of the template. Used as the {id} path parameter. |
ouId | string (uuid) | Yes | The ID of the organization unit this template belongs to. Set at creation and immutable thereafter. |
handle | string | Yes | Immutable, unique kebab-case identifier for the template within its channel. Used to reference the template (for example from a flow) instead of the id. |
isReadOnly | boolean | Yes | Indicates whether the template is defined in declarative configuration and cannot be modified or deleted through the API. |
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
content | SmsTemplateContent | Yes | SMS content that may include translations and context placeholders. |
content.body | string | Yes | Body, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not supported for SMS. |
CreateTemplateRequest
Type: one of: CreateEmailTemplateRequest, CreateSmsTemplateRequest
Create payload. The body must use the shape for the channel in the path: CreateEmailTemplateRequest for the email channel and CreateSmsTemplateRequest for the sms channel. OpenAPI cannot bind a request body to a path parameter value, so this is expressed as a oneOf and the server rejects a body whose shape does not match the path channel with 400.
UpdateTemplateRequest
Type: one of: UpdateEmailTemplateRequest, UpdateSmsTemplateRequest
Update payload. The handle is immutable and is not part of this body; the template is identified by the id in the path. The body must use the shape for the channel in the path: UpdateEmailTemplateRequest for the email channel and UpdateSmsTemplateRequest for the sms channel. The server rejects a body whose shape does not match the path channel with 400.
CreateEmailTemplateRequest
Type: object
Create payload for an email template.
9 properties
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | Immutable, unique kebab-case identifier for the template within its channel. Set at creation and used to reference the template (for example from a flow). |
ouId | string (uuid) | Yes | The ID of the organization unit this template belongs to. Set at creation and immutable thereafter. |
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
design | TemplateDesign | Optional design references applied when the email is rendered. | |
design.colorScheme | string | Color theme variant of the application's branding to apply at render. Allowed values: | |
content | EmailTemplateContent | Yes | Email content, which may include translations and context placeholders. |
content.subject | string | Yes | Subject line, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not allowed in the subject. |
content.body | string | Yes | Body, optionally containing translation ({{t(key)}}), context ({{ctx(var)}}), and design-token ({{design(token)}}) placeholders. |
UpdateEmailTemplateRequest
Type: object
Update payload for an email template. The handle cannot be changed and is not included.
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
design | TemplateDesign | Optional design references applied when the email is rendered. | |
design.colorScheme | string | Color theme variant of the application's branding to apply at render. Allowed values: | |
content | EmailTemplateContent | Yes | Email content, which may include translations and context placeholders. |
content.subject | string | Yes | Subject line, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not allowed in the subject. |
content.body | string | Yes | Body, optionally containing translation ({{t(key)}}), context ({{ctx(var)}}), and design-token ({{design(token)}}) placeholders. |
CreateSmsTemplateRequest
Type: object
Create payload for an SMS template.
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | Immutable, unique kebab-case identifier for the template within its channel. Set at creation and used to reference the template (for example from a flow). |
ouId | string (uuid) | Yes | The ID of the organization unit this template belongs to. Set at creation and immutable thereafter. |
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
content | SmsTemplateContent | Yes | SMS content, which may include translations and context placeholders. |
content.body | string | Yes | Body, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not supported for SMS. |
UpdateSmsTemplateRequest
Type: object
Update payload for an SMS template. The handle cannot be changed and is not included.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | Human-readable name of the template. |
description | string | Optional human-readable description of what this template is for. | |
content | SmsTemplateContent | Yes | SMS content, which may include translations and context placeholders. |
content.body | string | Yes | Body, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not supported for SMS. |
EmailTemplateContent
Type: object
Email content. Placeholders are resolved at render time: {{t(key)}} (localized text) and {{ctx(var)}} (context values) are allowed in both the subject and the body, while {{design(token)}} (design tokens, e.g. palette.primary.main) is allowed only in the body. The subject is required and must be non-blank.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
subject | string | Yes | Subject line, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not allowed in the subject. |
body | string | Yes | Body, optionally containing translation ({{t(key)}}), context ({{ctx(var)}}), and design-token ({{design(token)}}) placeholders. |
SmsTemplateContent
Type: object
SMS content (plain text). A subject and a design are not allowed for the SMS channel and are rejected with 400.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
body | string | Yes | Body, optionally containing translation ({{t(key)}}) and context ({{ctx(var)}}) placeholders. Design-token placeholders are not supported for SMS. |
TemplateDesign
Type: object
Per-template design references composed on top of the content at render time. Email only.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
colorScheme | string | Color theme variant of the application's branding to apply at render. Allowed values: |
Error
Type: object
Error code and localized details for a failed request.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Error code. Template-specific errors use the NTM-10xx family (NTM-1001 through NTM-1024); shared errors keep their own prefix (AUTH-, SSE-). |
message | I18nMessage | Yes | Internationalized message with translation key and default value. |
description | I18nMessage | Yes | Internationalized message with translation key and default value. |
I18nMessage
Type: object
Internationalized message with translation key and default value.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Translation key for fetching localized message. |
defaultValue | string | Yes | Default message in English (fallback). |
Was this page helpful?