Notifications

Notifications inform users of queue, billing, and system events.

The notifications model

Properties

  • Name
    id
    Type
    string
    Description

    Notification UUID.

  • Name
    read
    Type
    boolean
    Description

    Whether the user has read it.

  • Name
    message
    Type
    string
    Description

    Notification text.


GET/api/notifications

List notifications

Recent notifications for current user.

Request

GET
/api/notifications
curl -X GET http://localhost:3000/api/notifications \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "read": false,
      "message": "Queue #12 admitted to Room 1",
      "createdAt": "2026-10-05T06:30:00.000Z",
      "type": "QUEUE"
    }
  ]
}

GET/api/notifications/unread-count

Unread count

Badge count.

Request

GET
/api/notifications/unread-count
curl -X GET http://localhost:3000/api/notifications/unread-count \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "count": 3
}

POST/api/notifications/:id/read

Mark read

Mark single notification read.

Request

POST
/api/notifications/:id/read
curl -X POST http://localhost:3000/api/notifications/:id/read \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "read": true
}

POST/api/notifications/read-all

Mark all read

Clear unread state.

Request

POST
/api/notifications/read-all
curl -X POST http://localhost:3000/api/notifications/read-all \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "updated": 3
}

GET/api/notifications/stream

SSE stream

Server-sent events for live updates.

Request

GET
/api/notifications/stream
curl -X GET http://localhost:3000/api/notifications/stream \
  -H "Authorization: Bearer YOUR_JWT"

Response

event: message
data: (SSE JSON payload with notification id and type)

Was this page helpful?