/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revertAuthRevert a template
Restores an earlier version as a new version (audited as `notify.template.reverted`).
Path parameters
workspace_id*string · uuidId of the workspace.
type_id*string · uuidId of the type.
channel*enum (4)Template channel.
locale*stringTemplate locale (BCP 47).
Request body
version*integerThe version to restore (from `…/versions`). The restore is saved as a new version.
Response · 200 The template after the revert.
channel*objectChannel.
locale*stringLocale (BCP 47).
Example: "pt-PT"
version*integerCurrent version.
updated_at*string · date-timeLast change.
body*objectThe channel template, field names as shown (stored and returned exactly as sent). Text fields use the Mustache subset `{{var}}`, `{{#section}}`, `{{^inverted}}` (no partials). `inbox`: `{title, body (Markdown), action_url?, avatar_url?, actions?: [{label, url? | action_key?}] (≤ 2)}`. `email`: `{mail_template_name, data_mapping?}` (the HTML lives in Mail; `data_mapping` maps Mail variables to Notify variables). `push`: `{title?, body, url?, image_url?, badge?: "unread_count" | number, sound?, thread_id?, data_only?, apns_overrides?, fcm_overrides?}`. `webpush`: `{title, body?, url?, icon?, tag?}`. URL fields must be https (http only for localhost). At most 32 KB.
variables*arrayVariables the template uses.
Example
Request
POST https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"version": 0
}Response
{
"channel": {},
"locale": "pt-PT",
"version": 0,
"updated_at": "2026-01-01T00:00:00.000Z",
"body": {},
"variables": [
"string"
]
}