---
title: "Save notification template (saveNotificationTemplate)"
method: POST
path: "/api/notification/template"
tags: ["notification-template-controller"]
---

# Save notification template (saveNotificationTemplate)

`POST /api/notification/template`

Creates or updates notification template.

Here is an example of template to send notification via Web, SMS and Slack:
```json
{
  "name": "Greetings",
  "notificationType": "GENERAL",
  "configuration": {
    "deliveryMethodsTemplates": {
      "WEB": {
        "enabled": true,
        "subject": "Greetings",
        "body": "Hi there, ${recipientTitle}",
        "additionalConfig": {
          "icon": {
            "enabled": true,
            "icon": "back_hand",
            "color": "#757575"
          },
          "actionButtonConfig": {
            "enabled": false
          }
        },
        "method": "WEB"
      },
      "SMS": {
        "enabled": true,
        "body": "Hi there, ${recipientTitle}",
        "method": "SMS"
      },
      "SLACK": {
        "enabled": true,
        "body": "Hi there, @${recipientTitle}",
        "method": "SLACK"
      }
    }
  }
}
```

Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.

## Request body

- NotificationTemplate
  - `id` NotificationTemplateId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_TEMPLATE', required — string
  - `createdTime` integer — Entity creation timestamp in milliseconds since Unix epoch
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `name` string, required
  - `notificationType` 'GENERAL' | 'ALARM' | 'DEVICE_ACTIVITY' | 'ENTITY_ACTION' | 'ALARM_COMMENT' | 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' | 'ALARM_ASSIGNMENT' | 'NEW_PLATFORM_VERSION' | 'ENTITIES_LIMIT' | 'ENTITIES_LIMIT_INCREASE_REQUEST' | 'API_USAGE_LIMIT' | 'RULE_NODE' | 'RATE_LIMITS' | 'EDGE_CONNECTION' | 'EDGE_COMMUNICATION_FAILURE' | 'TASK_PROCESSING_FAILURE' | 'RESOURCES_SHORTAGE', required
  - `configuration` NotificationTemplateConfig, required
    - `deliveryMethodsTemplates` object, required

## Response `200`

OK

- NotificationTemplate
  - `id` NotificationTemplateId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_TEMPLATE', required — string
  - `createdTime` integer — Entity creation timestamp in milliseconds since Unix epoch
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `name` string, required
  - `notificationType` 'GENERAL' | 'ALARM' | 'DEVICE_ACTIVITY' | 'ENTITY_ACTION' | 'ALARM_COMMENT' | 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' | 'ALARM_ASSIGNMENT' | 'NEW_PLATFORM_VERSION' | 'ENTITIES_LIMIT' | 'ENTITIES_LIMIT_INCREASE_REQUEST' | 'API_USAGE_LIMIT' | 'RULE_NODE' | 'RATE_LIMITS' | 'EDGE_CONNECTION' | 'EDGE_COMMUNICATION_FAILURE' | 'TASK_PROCESSING_FAILURE' | 'RESOURCES_SHORTAGE', required
  - `configuration` NotificationTemplateConfig, required
    - `deliveryMethodsTemplates` object, required

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
