Notifications API

In-app notification management with unread badge.

All endpoints are prefixed with /api/notifications. Auth required.


Endpoints

MethodPathDescription
GET/notificationsList notifications
POST/notifications/read/:idMark as read
POST/notifications/read-allMark all as read
DELETE/notificationsClear all

Request/Response

GET /notifications

Params: unread (optional boolean filter)

{
  "notifications": [
    {
      "id": "n_1690000000000",
      "type": "info",
      "title": "Backup Complete",
      "message": "System backup completed successfully",
      "timestamp": "2026-07-28T12:00:00Z",
      "read": false
    }
  ],
  "unreadCount": 3,
  "total": 25
}

Notification Types

TypeDescription
infoGeneral information
errorError occurred
warningWarning message
successOperation succeeded

Storage

  • File: data/notifications.json
  • Max entries: 500 (oldest trimmed from front)
  • Newest-first ordering

Part of NexusPanel API Reference

← Back to Documentation