---
title: "Get notification request preview (getNotificationRequestPreview)"
method: POST
path: "/api/notification/request/preview"
tags: ["notification-controller"]
---

# Get notification request preview (getNotificationRequestPreview)

`POST /api/notification/request/preview`

Returns preview for notification request.

`processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target.

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

## Query parameters

- `recipientsPreviewSize` integer

## 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

- NotificationRequestPreview
  - `processedTemplates` object
  - `totalRecipientsCount` integer
  - `recipientsCountByTarget` object
  - `recipientsPreview` string[]

---

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