---
title: "Create notification request (createNotificationRequest)"
method: POST
path: "/api/notification/request"
tags: ["notification-controller"]
---

# Create notification request (createNotificationRequest)

`POST /api/notification/request`

Processes notification request.
Mandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template).
Optionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.

For each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type.
For `SLACK` delivery method - you need to chose at least one `SLACK` notification target.

Notification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. 

Here is an example of notification request to one target using saved template:
```json
{
  "templateId": {
    "entityType": "NOTIFICATION_TEMPLATE",
    "id": "6dbc3670-e4dd-11ed-9401-dbcc5dff78be"
  },
  "targets": [
    "320e3ed0-d785-11ed-a06c-21dd57dd88ca"
  ],
  "additionalConfig": {
    "sendingDelayInSec": 0
  }
}
```

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

## Request body

- NotificationRequest
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `targets` string[], required
  - `templateId` NotificationTemplateId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_TEMPLATE', required — string
  - `template` 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
  - `info` NotificationInfo
    - `dashboardId` DashboardId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'DASHBOARD', required — string
    - `stateEntityId` EntityId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'TENANT' | 'CUSTOMER' | 'USER' | 'DASHBOARD' | 'ASSET' | 'DEVICE' | 'ALARM' | 'RULE_CHAIN' | 'RULE_NODE' | 'ENTITY_VIEW' | 'WIDGETS_BUNDLE' | 'WIDGET_TYPE' | 'TENANT_PROFILE' | 'DEVICE_PROFILE' | 'ASSET_PROFILE' | 'API_USAGE_STATE' | 'TB_RESOURCE' | 'OTA_PACKAGE' | 'EDGE' | 'RPC' | 'QUEUE' | 'NOTIFICATION_TARGET' | 'NOTIFICATION_TEMPLATE' | 'NOTIFICATION_REQUEST' | 'NOTIFICATION' | 'NOTIFICATION_RULE' | 'QUEUE_STATS' | 'OAUTH2_CLIENT' | 'DOMAIN' | 'MOBILE_APP' | 'MOBILE_APP_BUNDLE' | 'CALCULATED_FIELD' | 'JOB' | 'ADMIN_SETTINGS' | 'AI_MODEL' | 'API_KEY', required
    - `type` string, required
  - `additionalConfig` NotificationRequestConfig
    - `sendingDelayInSec` integer
  - `originatorEntityId` EntityId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT' | 'CUSTOMER' | 'USER' | 'DASHBOARD' | 'ASSET' | 'DEVICE' | 'ALARM' | 'RULE_CHAIN' | 'RULE_NODE' | 'ENTITY_VIEW' | 'WIDGETS_BUNDLE' | 'WIDGET_TYPE' | 'TENANT_PROFILE' | 'DEVICE_PROFILE' | 'ASSET_PROFILE' | 'API_USAGE_STATE' | 'TB_RESOURCE' | 'OTA_PACKAGE' | 'EDGE' | 'RPC' | 'QUEUE' | 'NOTIFICATION_TARGET' | 'NOTIFICATION_TEMPLATE' | 'NOTIFICATION_REQUEST' | 'NOTIFICATION' | 'NOTIFICATION_RULE' | 'QUEUE_STATS' | 'OAUTH2_CLIENT' | 'DOMAIN' | 'MOBILE_APP' | 'MOBILE_APP_BUNDLE' | 'CALCULATED_FIELD' | 'JOB' | 'ADMIN_SETTINGS' | 'AI_MODEL' | 'API_KEY', required
  - `ruleId` NotificationRuleId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_RULE', required — string
  - `status` 'PROCESSING' | 'SENT' | 'SCHEDULED'
  - `stats` NotificationRequestStats
    - `sent` object
    - `errors` object
    - `totalErrors` object
      - `opaque` integer
      - `acquire` integer
      - `release` integer
      - `andIncrement` integer
      - `andDecrement` integer
      - `plain` integer
    - `error` string
  - `id` NotificationRequestId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_REQUEST', required — string
  - `createdTime` integer — Entity creation timestamp in milliseconds since Unix epoch

## Response `200`

OK

- NotificationRequest
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `targets` string[], required
  - `templateId` NotificationTemplateId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_TEMPLATE', required — string
  - `template` 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
  - `info` NotificationInfo
    - `dashboardId` DashboardId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'DASHBOARD', required — string
    - `stateEntityId` EntityId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'TENANT' | 'CUSTOMER' | 'USER' | 'DASHBOARD' | 'ASSET' | 'DEVICE' | 'ALARM' | 'RULE_CHAIN' | 'RULE_NODE' | 'ENTITY_VIEW' | 'WIDGETS_BUNDLE' | 'WIDGET_TYPE' | 'TENANT_PROFILE' | 'DEVICE_PROFILE' | 'ASSET_PROFILE' | 'API_USAGE_STATE' | 'TB_RESOURCE' | 'OTA_PACKAGE' | 'EDGE' | 'RPC' | 'QUEUE' | 'NOTIFICATION_TARGET' | 'NOTIFICATION_TEMPLATE' | 'NOTIFICATION_REQUEST' | 'NOTIFICATION' | 'NOTIFICATION_RULE' | 'QUEUE_STATS' | 'OAUTH2_CLIENT' | 'DOMAIN' | 'MOBILE_APP' | 'MOBILE_APP_BUNDLE' | 'CALCULATED_FIELD' | 'JOB' | 'ADMIN_SETTINGS' | 'AI_MODEL' | 'API_KEY', required
    - `type` string, required
  - `additionalConfig` NotificationRequestConfig
    - `sendingDelayInSec` integer
  - `originatorEntityId` EntityId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT' | 'CUSTOMER' | 'USER' | 'DASHBOARD' | 'ASSET' | 'DEVICE' | 'ALARM' | 'RULE_CHAIN' | 'RULE_NODE' | 'ENTITY_VIEW' | 'WIDGETS_BUNDLE' | 'WIDGET_TYPE' | 'TENANT_PROFILE' | 'DEVICE_PROFILE' | 'ASSET_PROFILE' | 'API_USAGE_STATE' | 'TB_RESOURCE' | 'OTA_PACKAGE' | 'EDGE' | 'RPC' | 'QUEUE' | 'NOTIFICATION_TARGET' | 'NOTIFICATION_TEMPLATE' | 'NOTIFICATION_REQUEST' | 'NOTIFICATION' | 'NOTIFICATION_RULE' | 'QUEUE_STATS' | 'OAUTH2_CLIENT' | 'DOMAIN' | 'MOBILE_APP' | 'MOBILE_APP_BUNDLE' | 'CALCULATED_FIELD' | 'JOB' | 'ADMIN_SETTINGS' | 'AI_MODEL' | 'API_KEY', required
  - `ruleId` NotificationRuleId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_RULE', required — string
  - `status` 'PROCESSING' | 'SENT' | 'SCHEDULED'
  - `stats` NotificationRequestStats
    - `sent` object
    - `errors` object
    - `totalErrors` object
      - `opaque` integer
      - `acquire` integer
      - `release` integer
      - `andIncrement` integer
      - `andDecrement` integer
      - `plain` integer
    - `error` string
  - `id` NotificationRequestId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'NOTIFICATION_REQUEST', required — string
  - `createdTime` integer — Entity creation timestamp in milliseconds since Unix epoch

---

[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)
