Skip to main content

Notifications API

Notifications endpoints exposed by the Devotel CPaaS API Base path: /api/v1/notifications Endpoint count: 12

List notifications

GET /api/v1/notifications/
Returns the authenticated user’s in-app notifications for the current tenant, newest first, with cursor pagination. Backs the dashboard notification-center bell feed. Optional unread_only, kind, severity, source_pillar, and category query filters narrow the feed; a malformed filter value degrades to no filter rather than failing the read.

List notification digest recipients

GET /api/v1/notifications/digest/recipients
Returns every member of the organization together with their digest opt-in state and display details (email, name, role), so an admin can see and manage who receives the periodic digest.

Get notification digest settings

GET /api/v1/notifications/digest/settings
Returns the organization’s notification digest configuration: whether periodic digests are enabled, the send frequency (daily or weekly), and which categories are included (an empty list means all categories). Organizations that have not configured a digest yet receive safe defaults.

List notifications across all product pillars

GET /api/v1/notifications/global
Returns the authenticated user’s cross-pillar notification feed for the current tenant, newest first, with cursor pagination. Extends the standard list with optional since and until ISO-8601 time-window bounds so the global notification center can request ranges like the last 24 hours or this week without walking the cursor backwards. The same pillar and category filters as the list endpoint apply.

Stream notifications in real time (SSE)

GET /api/v1/notifications/stream
Opens a Server-Sent Events stream that pushes new notifications to the authenticated user as they occur, so the dashboard bell updates without polling. Browsers authenticate with a one-time token from POST /api/v1/notifications/sse-token passed as ?ot=<token> (EventSource cannot send headers); server-side callers may pass ?token=<api-key>. The stream emits periodic heartbeats and enforces a per-tenant concurrent-connection cap.

Preview the next notification digest

POST /api/v1/notifications/digest/preview
Computes the digest payload the organization would receive right now: aggregate activity counts and highlights over the configured lookback window, without sending anything. Owner or admin only. Pass an optional ?hours= (1-168) query parameter to override the lookback window. Takes no request body.

Mark all notifications as read

POST /api/v1/notifications/read-all
Marks every unread notification for the authenticated user (current tenant) as read in a single call and returns how many rows were updated. Backs the notification center’s mark-all-as-read action. Takes no request body.

Mint a one-time SSE stream token

POST /api/v1/notifications/sse-token
Exchanges the caller’s session for a short-lived, single-use token that authenticates the GET /api/v1/notifications/stream connection, since browsers cannot set Authorization headers on EventSource. Open the stream with ?ot=<token>. When the token store is unavailable the endpoint instead returns 200 with ot: null and a fallback hint so the client can connect using the legacy ?token= credential. Takes no request body.

Mark a notification as read

PUT /api/v1/notifications/{id}/read
Marks a single notification, addressed by its path id, as read for the authenticated user and returns the updated notification. Idempotent: re-marking an already-read notification succeeds without changing state. Returns 404 when the id does not belong to the caller. Takes no request body.
string
required

Update notification digest settings

PUT /api/v1/notifications/digest/settings
Updates the organization’s notification digest configuration. Owner or admin only. Provide any subset of enabled, frequency (daily or weekly), and categories; at least one field is required. Returns the full updated settings.
boolean
Whether periodic digests are sent for the organization.
string (enum: daily|weekly)
How often the digest is sent.
string (enum: billing|security|messaging|campaigns|agents|system)[]
Categories to include in the digest. An empty array includes all categories.

Update a digest recipient’s opt-in

PATCH /api/v1/notifications/digest/recipients/{user_id}
Toggles whether a specific organization member, addressed by their path user_id, receives the notification digest. Owner or admin only. Returns 404 when the user is not a member of the organization.
string
required
boolean
required
Whether this member receives the notification digest.

Dismiss a notification

DELETE /api/v1/notifications/{id}
Permanently dismisses (deletes) a single notification, addressed by its path id, for the authenticated user. Backs the per-row dismiss control in the notification center. Returns 404 when the id does not belong to the caller. Takes no request body.
string
required