Stream real-time notifications via SSE
Notifications
Stream real-time notifications via SSE
Server-Sent Events (SSE) endpoint for real-time notification delivery.
Connect with EventSource to receive push notifications instantly.
Event types:
connected— Sent once on connection with{ "unread_count": N }notification— Full notification object pushed in real-time: heartbeat— SSE comment sent every 30s to keep the connection alive
Example (JavaScript):
const es = new EventSource('/api/v1/notifications/stream', {
headers: { 'Authorization': 'Bearer <jwt>' }
});
es.addEventListener('connected', (e) => {
const { unread_count } = JSON.parse(e.data);
});
es.addEventListener('notification', (e) => {
const notification = JSON.parse(e.data);
// Show toast, update badge, etc.
});
Architecture: Uses the cache Pub/Sub for instant delivery with automatic fallback to DB polling (5s interval) if the cache is unavailable.
GET
Stream real-time notifications via SSE
Documentation Index
Fetch the complete documentation index at: https://docs.cyberun.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
User session JWT (Bearer ). Must be paired with the X-Team-ID
request header on team-scoped endpoints so the server knows which
team's resources to operate on.
Response
SSE stream established
The response is of type string.
