ThingsBoard notification-controller API

Notification

Operations 16

PUT /api/notifications/read Mark All Notifications as Read (markAllNotificationsAsRead) #
PUT /api/notification/{id}/read Mark Notification as Read (markNotificationAsRead) #
GET /api/notification/settings Get Notification Settings (getNotificationSettings) #
POST /api/notification/settings Save Notification Settings (saveNotificationSettings) #
GET /api/notification/settings/user #
POST /api/notification/settings/user #
POST /api/notification/request Create Notification Request (createNotificationRequest) #
POST /api/notification/request/preview Get Notification Request Preview (getNotificationRequestPreview) #
POST /api/notification/entitiesLimitIncreaseRequest/{entityType} Send Entity Limit Increase Request Notification to System Administrators (sendEntitiesLimitIncreaseRequest) #
GET /api/notifications Get Notifications (getNotifications) #
GET /api/notifications/unread/count Get Unread Notifications Count (getUnreadNotificationsCount) #
GET /api/notification/requests Get Notification Requests (getNotificationRequests) #
GET /api/notification/request/{id} Get Notification Request by Id (getNotificationRequestById) #
DELETE /api/notification/request/{id} Delete Notification Request (deleteNotificationRequest) #
GET /api/notification/deliveryMethods Get Available Delivery Methods (getAvailableDeliveryMethods) #
DELETE /api/notification/{id} Delete Notification (deleteNotification) #

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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/thingsboard-notification-controller-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

thingsboard-notification-controller-api-openapi.yml Raw ↑
openapi: 3.2.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:
    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
    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
    UserNotificationSettings:
      type: object
      properties:
        prefs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/NotificationPref'
      required:
      - prefs
    PageDataNotificationRequestInfo:
      type: object
      properties:
        data:
          type: array
          description: Array of the entities
          items:
            $ref: '#/components/schemas/NotificationRequestInfo'
          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
    EmailDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
            minLength: 1
      required:
      - body
      - subject
    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
    DeliveryMethodNotificationTemplate:
      type: object
      discriminator:
        propertyName: method
      properties:
        enabled:
          type: boolean
        body:
          type: string
          minLength: 1
        method:
          type: string
      required:
      - body
      - method
    NotificationDeliveryMethodConfig:
      discriminator:
        propertyName: method
      properties:
        method:
          type: string
      required:
      - method
    NotificationRequestConfig:
      type: object
      properties:
        sendingDelayInSec:
          type: integer
          format: int32
          maximum: 604800
    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
    NotificationInfo:
      type: object
      discriminator:
        propertyName: type
      properties:
        dashboardId:
          $ref: '#/components/schemas/DashboardId'
        stateEntityId:
          $ref: '#/components/schemas/EntityId'
        type:
          type: string
      required:
      - type
    MobileAppDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
            minLength: 1
          additionalConfig:
            $ref: '#/components/schemas/JsonNode'
      required:
      - body
      - subject
    MicrosoftTeamsDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
          themeColor:
            type: string
          button:
            $ref: '#/components/schemas/Button'
      required:
      - body
    MobileAppNotificationDeliveryMethodConfig:
      allOf:
      - $ref: '#/components/schemas/NotificationDeliveryMethodConfig'
      - type: object
        properties:
          firebaseServiceAccountCredentialsFileName:
            type: string
          firebaseServiceAccountCredentials:
            type: string
            minLength: 1
      required:
      - firebaseServiceAccountCredentials
    SlackNotificationDeliveryMethodConfig:
      allOf:
      - $ref: '#/components/schemas/NotificationDeliveryMethodConfig'
      - type: object
        properties:
          botToken:
            type: string
            minLength: 1
      required:
      - botToken
    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
    NotificationPref:
      type: object
      properties:
        enabled:
          type: boolean
        enabledDeliveryMethods:
          type: object
          additionalProperties:
            type: boolean
      required:
      - enabledDeliveryMethods
    TenantId:
      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:
          - TENANT
          example: TENANT
      required:
      - entityType
      - id
    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
    SlackDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      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
    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
    WebDeliveryMethodNotificationTemplate:
      allOf:
      - $ref: '#/components/schemas/DeliveryMethodNotificationTemplate'
      - type: object
        properties:
          subject:
            type: string
            minLength: 1
          additionalConfig:
            $ref: '#/components/schemas/JsonNode'
      required:
      - body
      - subject
    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
    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
    NotificationRequestStats:
      type: object
      properties:
        sent:
          type: object
          additionalProperties:
            type: object
            properties:
              opaque:
                type: integer
                format: int32
              acquire:
                type: integer
                format: int32
              release:
                type: integer
                format: int32
                writeOnly: true
              andIncrement:
                type: integer
                format: int32
              andDecrement:
                type: integer
                format: int32
              plain:
                type: integer
                format: int32
        errors:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: string
        totalErrors:
          type: object
          properties:
            opaque:
              type: integer
              format: int32
            acquire:
              type: integer
              format: int32
            release:
              type: integer
              format: int32
              writeOnly: true
            andIncrement:
              type: integer
              format: int32
            andDecrement:
              type: integer
              format: int32
            plain:
              type: integer
              format: int32
        error:
          type: string
    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
    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/NotificationTemplat

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