Notify API reference

Notify API · Notification-Types

post/v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revertAuth

Revert a template

Restores an earlier version as a new version (audited as `notify.template.reverted`).

Path parameters

workspace_id*string · uuid

Id of the workspace.

type_id*string · uuid

Id of the type.

channel*enum (4)

Template channel.

locale*string

Template locale (BCP 47).

Request body

version*integer

The version to restore (from `…/versions`). The restore is saved as a new version.

Response · 200 The template after the revert.

channel*object

Channel.

locale*string

Locale (BCP 47).

Example: "pt-PT"

version*integer

Current version.

updated_at*string · date-time

Last change.

body*object

The 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*array

Variables 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"
  ]
}