ThingsBoard notification-controller API

Notification

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-device-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-deviceprofile-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-asset-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-assetprofile-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-entityrelation-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-alarm-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-rulechain-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-dashboard-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-tenant-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-customer-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/json-schema/thingsboard-user-schema.json

OpenAPI Specification

thingsboard-notification-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ThingsBoard Admin admin-controller notification-controller API
  description: 'ThingsBoard Admin API — subset of the ThingsBoard REST API (open-source IoT platform). Covers: Admin, Audit Log, Event, Usage Info, Queue, Queue Stats, Mail Config Template, Qr Code Settings, Job.'
  version: 4.3.0.3DEMO
  contact:
    name: ThingsBoard team
    url: https://thingsboard.io
    email: info@thingsboard.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://demo.thingsboard.io
  description: ThingsBoard Live Demo
- url: http://localhost:8080
  description: Local ThingsBoard server
tags:
- name: notification-controller
  description: Notification
paths:
  /api/notifications/read:
    put:
      tags:
      - notification-controller
      summary: Mark All Notifications as Read (markAllNotificationsAsRead)
      description: 'Marks all unread notifications as read.


        Available for any authorized user. '
      operationId: markAllNotificationsAsRead
      parameters:
      - name: deliveryMethod
        in: query
        description: Delivery method
        required: false
        schema:
          type: string
          enum:
          - WEB
          - MOBILE_APP
      responses:
        '200':
          description: OK
  /api/notification/{id}/read:
    put:
      tags:
      - notification-controller
      summary: Mark Notification as Read (markNotificationAsRead)
      description: 'Marks notification as read by its id.


        Available for any authorized user. '
      operationId: markNotificationAsRead
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
  /api/notification/settings:
    get:
      tags:
      - notification-controller
      summary: Get Notification Settings (getNotificationSettings)
      description: 'Retrieves notification settings for this tenant or sysadmin.


        Available for users with ''SYS_ADMIN'' or ''TENANT_ADMIN'' authority.'
      operationId: getNotificationSettings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSettings'
    post:
      tags:
      - notification-controller
      summary: Save Notification Settings (saveNotificationSettings)
      description: "Saves notification settings for this tenant or sysadmin.\n`deliveryMethodsConfigs` of the settings must be specified.\n\nHere is an example of the notification settings with Slack configuration:\n```json\n{\n  \"deliveryMethodsConfigs\": {\n    \"SLACK\": {\n      \"method\": \"SLACK\",\n      \"botToken\": \"xoxb-....\"\n    }\n  }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority."
      operationId: saveNotificationSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationSettings'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSettings'
  /api/notification/settings/user:
    get:
      tags:
      - notification-controller
      operationId: getUserNotificationSettings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNotificationSettings'
    post:
      tags:
      - notification-controller
      operationId: saveUserNotificationSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserNotificationSettings'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserNotificationSettings'
  /api/notification/request:
    post:
      tags:
      - notification-controller
      summary: Create Notification Request (createNotificationRequest)
      description: "Processes notification request.\nMandatory 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).\nOptionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.\n\nFor 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.\nFor `SLACK` delivery method - you need to chose at least one `SLACK` notification target.\n\nNotification 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. \n\nHere is an example of notification request to one target using saved template:\n```json\n{\n  \"templateId\": {\n    \"entityType\": \"NOTIFICATION_TEMPLATE\",\n    \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\"\n  },\n  \"targets\": [\n    \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\"\n  ],\n  \"additionalConfig\": {\n    \"sendingDelayInSec\": 0\n  }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority."
      operationId: createNotificationRequest
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationRequest'
  /api/notification/request/preview:
    post:
      tags:
      - notification-controller
      summary: Get Notification Request Preview (getNotificationRequestPreview)
      description: '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.'
      operationId: getNotificationRequestPreview
      parameters:
      - name: recipientsPreviewSize
        in: query
        description: Amount of the recipients to show in preview
        required: false
        schema:
          type: integer
          format: int32
          default: 20
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationRequestPreview'
  /api/notification/entitiesLimitIncreaseRequest/{entityType}:
    post:
      tags:
      - notification-controller
      summary: Send Entity Limit Increase Request Notification to System Administrators (sendEntitiesLimitIncreaseRequest)
      description: 'Send entity limit increase request notification by Tenant Administrator to System administrators.


        Available for users with ''TENANT_ADMIN'' authority.'
      operationId: sendEntitiesLimitIncreaseRequest
      parameters:
      - name: entityType
        in: path
        description: Entity type
        required: true
        schema:
          type: string
          enum:
          - DEVICE
          - ASSET
          - CUSTOMER
          - USER
          - DASHBOARD
          - RULE_CHAIN
          - EDGE
      responses:
        '200':
          description: OK
  /api/notifications:
    get:
      tags:
      - notification-controller
      summary: Get Notifications (getNotifications)
      description: "Returns the page of notifications for current user.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. \n\n**WebSocket API**:\n\nThere are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves.\n\nThe URI for opening WS session for notifications: `/api/ws/plugins/notifications`.\n\nSubscription command for unread notifications count:\n```\n{\n  \"unreadCountSubCmd\": {\n    \"cmdId\": 1234\n  }\n}\n```\nTo subscribe for latest unread notifications:\n```\n{\n  \"unreadSubCmd\": {\n    \"cmdId\": 1234,\n    \"limit\": 10\n  }\n}\n```\nTo unsubscribe from any subscription:\n```\n{\n  \"unsubCmd\": {\n    \"cmdId\": 1234\n  }\n}\n```\nTo mark certain notifications as read, use following command:\n```\n{\n  \"markAsReadCmd\": {\n    \"cmdId\": 1234,\n    \"notifications\": [\n      \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\",\n      \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\"\n    ]\n  }\n}\n\n```\nTo mark all notifications as read:\n```\n{\n  \"markAllAsReadCmd\": {\n    \"cmdId\": 1234\n  }\n}\n```\n\n\nUpdate structure for unread **notifications count subscription**:\n```\n{\n  \"cmdId\": 1234,\n  \"totalUnreadCount\": 55\n}\n```\nFor **notifications subscription**:\n- full update of latest unread notifications:\n```\n{\n  \"cmdId\": 1234,\n  \"notifications\": [\n    {\n      \"id\": {\n        \"entityType\": \"NOTIFICATION\",\n        \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n      },\n      ...\n    }\n  ],\n  \"totalUnreadCount\": 1\n}\n```\n- when new notification arrives or shown notification is updated:\n```\n{\n  \"cmdId\": 1234,\n  \"update\": {\n    \"id\": {\n      \"entityType\": \"NOTIFICATION\",\n      \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n    },\n    # updated notification info, text, subject etc.\n    ...\n  },\n  \"totalUnreadCount\": 2\n}\n```\n- when unread notifications count changes:\n```\n{\n  \"cmdId\": 1234,\n  \"totalUnreadCount\": 5\n}\n```"
      operationId: getNotifications
      parameters:
      - name: pageSize
        in: query
        description: Maximum amount of entities in a one page
        required: true
        schema:
          type: integer
          format: int32
      - name: page
        in: query
        description: Sequence number of page starting from 0
        required: true
        schema:
          type: integer
          format: int32
      - name: textSearch
        in: query
        description: Case-insensitive 'substring' filter based on notification subject or text
        required: false
        schema:
          type: string
      - name: sortProperty
        in: query
        description: Property of entity to sort by
        required: false
        schema:
          type: string
      - name: sortOrder
        in: query
        description: Sort order. ASC (ASCENDING) or DESC (DESCENDING)
        required: false
        schema:
          type: string
      - name: unreadOnly
        in: query
        description: To search for unread notifications only
        required: false
        schema:
          type: boolean
          default: false
      - name: deliveryMethod
        in: query
        description: Delivery method
        required: false
        schema:
          type: string
          enum:
          - WEB
          - MOBILE_APP
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDataNotification'
  /api/notifications/unread/count:
    get:
      tags:
      - notification-controller
      summary: Get Unread Notifications Count (getUnreadNotificationsCount)
      description: 'Returns unread notifications count for chosen delivery method.


        Available for any authorized user. '
      operationId: getUnreadNotificationsCount
      parameters:
      - name: deliveryMethod
        in: query
        description: Delivery method
        required: false
        schema:
          type: string
          enum:
          - WEB
          - MOBILE_APP
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: integer
                format: int32
  /api/notification/requests:
    get:
      tags:
      - notification-controller
      summary: Get Notification Requests (getNotificationRequests)
      description: "Returns the page of notification requests submitted by users of this tenant or sysadmins.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority."
      operationId: getNotificationRequests
      parameters:
      - name: pageSize
        in: query
        description: Maximum amount of entities in a one page
        required: true
        schema:
          type: integer
          format: int32
      - name: page
        in: query
        description: Sequence number of page starting from 0
        required: true
        schema:
          type: integer
          format: int32
      - name: textSearch
        in: query
        description: Case-insensitive 'substring' filed based on the used template name
        required: false
        schema:
          type: string
      - name: sortProperty
        in: query
        description: Property of entity to sort by
        required: false
        schema:
          type: string
      - name: sortOrder
        in: query
        description: Sort order. ASC (ASCENDING) or DESC (DESCENDING)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDataNotificationRequestInfo'
  /api/notification/request/{id}:
    get:
      tags:
      - notification-controller
      summary: Get Notification Request by Id (getNotificationRequestById)
      description: 'Fetches notification request info by request id.


        Available for users with ''SYS_ADMIN'' or ''TENANT_ADMIN'' authority.'
      operationId: getNotificationRequestById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationRequestInfo'
    delete:
      tags:
      - notification-controller
      summary: Delete Notification Request (deleteNotificationRequest)
      description: 'Deletes notification request by its id.


        If the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled.


        Available for users with ''SYS_ADMIN'' or ''TENANT_ADMIN'' authority.'
      operationId: deleteNotificationRequest
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
  /api/notification/deliveryMethods:
    get:
      tags:
      - notification-controller
      summary: Get Available Delivery Methods (getAvailableDeliveryMethods)
      description: 'Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications.


        Available for users with ''SYS_ADMIN'' or ''TENANT_ADMIN'' authority.'
      operationId: getAvailableDeliveryMethods
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  enum:
                  - WEB
                  - EMAIL
                  - SMS
                  - SLACK
                  - MICROSOFT_TEAMS
                  - MOBILE_APP
  /api/notification/{id}:
    delete:
      tags:
      - notification-controller
      summary: Delete Notification (deleteNotification)
      description: 'Deletes notification by its id.


        Available for any authorized user. '
      operationId: deleteNotification
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
components:
  schemas:
    NotificationRequestConfig:
      type: object
      properties:
        sendingDelayInSec:
          type: integer
          format: int32
          maximum: 604800
    NotificationTemplate:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/NotificationTemplateId'
        createdTime:
          type: integer
          format: int64
          description: Entity creation timestamp in milliseconds since Unix epoch
          example: 1746028547220
          readOnly: true
        tenantId:
          $ref: '#/components/schemas/TenantId'
        name:
          type: string
          minLength: 1
        notificationType:
          type: string
          enum:
          - 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
        configuration:
          $ref: '#/components/schemas/NotificationTemplateConfig'
      required:
      - configuration
      - name
      - notificationType
    NotificationInfo:
      type: object
      discriminator:
        propertyName: type
      properties:
        dashboardId:
          $ref: '#/components/schemas/DashboardId'
        stateEntityId:
          $ref: '#/components/schemas/EntityId'
        type:
          type: string
      required:
      - type
    MicrosoftTeamsDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
          themeColor:
            type: string
          button:
            $ref: '#/components/schemas/Button'
      required:
      - body
    NotificationRequest:
      type: object
      properties:
        tenantId:
          $ref: '#/components/schemas/TenantId'
        targets:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
        templateId:
          $ref: '#/components/schemas/NotificationTemplateId'
        template:
          $ref: '#/components/schemas/NotificationTemplate'
        info:
          $ref: '#/components/schemas/NotificationInfo'
        additionalConfig:
          $ref: '#/components/schemas/NotificationRequestConfig'
        originatorEntityId:
          $ref: '#/components/schemas/EntityId'
        ruleId:
          $ref: '#/components/schemas/NotificationRuleId'
        status:
          type: string
          enum:
          - PROCESSING
          - SENT
          - SCHEDULED
        stats:
          $ref: '#/components/schemas/NotificationRequestStats'
        id:
          $ref: '#/components/schemas/NotificationRequestId'
        createdTime:
          type: integer
          format: int64
          description: Entity creation timestamp in milliseconds since Unix epoch
          example: 1746028547220
          readOnly: true
      required:
      - targets
    NotificationRequestId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          description: string
          enum:
          - NOTIFICATION_REQUEST
          example: NOTIFICATION_REQUEST
      required:
      - entityType
      - id
    PageDataNotification:
      type: object
      properties:
        data:
          type: array
          description: Array of the entities
          items:
            $ref: '#/components/schemas/Notification'
          readOnly: true
        totalPages:
          type: integer
          format: int32
          description: Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria
          readOnly: true
        totalElements:
          type: integer
          format: int64
          description: Total number of elements in all available pages
          readOnly: true
        hasNext:
          type: boolean
          description: '''false'' value indicates the end of the result set'
          readOnly: true
    EntityId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          enum:
          - 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
          example: DEVICE
      required:
      - entityType
      - id
    NotificationRuleId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          description: string
          enum:
          - NOTIFICATION_RULE
          example: NOTIFICATION_RULE
      required:
      - entityType
      - id
    Notification:
      type: object
      properties:
        requestId:
          $ref: '#/components/schemas/NotificationRequestId'
        recipientId:
          $ref: '#/components/schemas/UserId'
        type:
          type: string
          enum:
          - 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
        deliveryMethod:
          type: string
          enum:
          - WEB
          - EMAIL
          - SMS
          - SLACK
          - MICROSOFT_TEAMS
          - MOBILE_APP
        subject:
          type: string
        text:
          type: string
        additionalConfig:
          $ref: '#/components/schemas/JsonNode'
        info:
          $ref: '#/components/schemas/NotificationInfo'
        status:
          type: string
          enum:
          - SENT
          - READ
        id:
          $ref: '#/components/schemas/NotificationId'
        createdTime:
          type: integer
          format: int64
          description: Entity creation timestamp in milliseconds since Unix epoch
          example: 1746028547220
          readOnly: true
    NotificationSettings:
      type: object
      properties:
        deliveryMethodsConfigs:
          type: object
          additionalProperties:
            oneOf:
            - $ref: '#/components/schemas/MobileAppNotificationDeliveryMethodConfig'
            - $ref: '#/components/schemas/SlackNotificationDeliveryMethodConfig'
      required:
      - deliveryMethodsConfigs
    NotificationTemplateConfig:
      type: object
      properties:
        deliveryMethodsTemplates:
          type: object
          additionalProperties:
            oneOf:
            - $ref: '#/components/schemas/EmailDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/MicrosoftTeamsDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/MobileAppDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/SlackDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/SmsDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/WebDeliveryMethodNotificationTemplate'
          minProperties: 1
      required:
      - deliveryMethodsTemplates
    Button:
      type: object
      properties:
        enabled:
          type: boolean
        text:
          type: string
        linkType:
          type: string
          enum:
          - LINK
          - DASHBOARD
        link:
          type: string
        dashboardId:
          type: string
          format: uuid
        dashboardState:
          type: string
        setEntityIdInState:
          type: boolean
    NotificationDeliveryMethodConfig:
      discriminator:
        propertyName: method
      properties:
        method:
          type: string
      required:
      - method
    EmailDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
            minLength: 1
      required:
      - body
      - subject
    NotificationTemplateId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          description: string
          enum:
          - NOTIFICATION_TEMPLATE
          example: NOTIFICATION_TEMPLATE
      required:
      - entityType
      - id
    NotificationRequestPreview:
      type: object
      properties:
        processedTemplates:
          type: object
          additionalProperties:
            oneOf:
            - $ref: '#/components/schemas/EmailDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/MicrosoftTeamsDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/MobileAppDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/SlackDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/SmsDeliveryMethodNotificationTemplate'
            - $ref: '#/components/schemas/WebDeliveryMethodNotificationTemplate'
        totalRecipientsCount:
          type: integer
          format: int32
        recipientsCountByTarget:
          type: object
          additionalProperties:
            type: integer
            format: int32
        recipientsPreview:
          type: array
          items:
            type: string
    NotificationRequestInfo:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/NotificationRequestId'
        createdTime:
          type: integer
          format: int64
          description: Entity creation timestamp in milliseconds since Unix epoch
          example: 1746028547220
          readOnly: true
        tenantId:
          $ref: '#/components/schemas/TenantId'
        targets:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
        templateId:
          $ref: '#/components/schemas/NotificationTemplateId'
        template:
          $ref: '#/components/schemas/NotificationTemplate'
        info:
          $ref: '#/components/schemas/NotificationInfo'
        additionalConfig:
          $ref: '#/components/schemas/NotificationRequestConfig'
        originatorEntityId:
          $ref: '#/components/schemas/EntityId'
        ruleId:
          $ref: '#/components/schemas/NotificationRuleId'
        status:
          type: string
          enum:
          - PROCESSING
          - SENT
          - SCHEDULED
        stats:
          $ref: '#/components/schemas/NotificationRequestStats'
        templateName:
          type: string
        deliveryMethods:
          type: array
          items:
            type: string
            enum:
            - WEB
            - EMAIL
            - SMS
            - SLACK
            - MICROSOFT_TEAMS
            - MOBILE_APP
      required:
      - targets
    UserId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          description: string
          enum:
          - USER
          example: USER
      required:
      - entityType
      - id
    SlackDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      required:
      - body
    NotificationPref:
      type: object
      properties:
        enabled:
          type: boolean
        enabledDeliveryMethods:
          type: object
          additionalProperties:
            type: boolean
      required:
      - enabledDeliveryMethods
    MobileAppNotificationDeliveryMethodConfig:
      allOf:
      - $ref: '#/components/schemas/NotificationDeliveryMethodConfig'
      - type: object
        properties:
          firebaseServiceAccountCredentialsFileName:
            type: string
          firebaseServiceAccountCredentials:
            type: string
            minLength: 1
      required:
      - firebaseServiceAccountCredentials
    WebDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
            minLength: 1
          additionalConfig:
            $ref: '#/components/schemas/JsonNode'
      required:
      - body
      - subject
    SlackNotificationDeliveryMethodConfig:
      allOf:
      - $ref: '#/components/schemas/NotificationDeliveryMethodConfig'
      - type: object
        properties:
          botToken:
            type: string
            minLength: 1
      required:
      - botToken
    JsonNode:
      description: A value representing the any type (object or primitive)
      examples:
      - {}
    NotificationId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          description: string
          enum:
          - NOTIFICATION
          example: NOTIFICATION
      required:
      - entityType
      - id
    DashboardId:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the entity, time-based UUID v1
          example: 784f394c-42b6-435a-983c-b7beff2784f9
        entityType:
          type: string
          description: string
          enum:
          - DASHBOARD
          example: DASHBOARD
      required:
      - entityType
      - id
    NotificationRequestStats:
      type: object
      properties:
        sent

# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/thingsboard/refs/heads/main/openapi/thingsboard-notification-controller-api-openapi.yml