//Real-time Notifications
Headless Notification Center
Deliver real-time engagement to your users without managing WebSockets or notification tables. ButtrBase provides a complete Headless Notification Center.
1. Sending a Notification
You can send targeted notifications to specific users or entire organizations.
await client.notifications.send({
user_uuid: 'user-123',
title: 'Report Ready',
body: 'Your Q1 performance report is now available for download.',
action_url: '/dash/reports/123',
channels: ['in_app', 'email']
});
2. Rendering the "Bell Icon"
Use the SDK to fetch the user's notification feed. ButtrBase tracks the "Seen" and "Read" status for every individual message.
const feed = await client.notifications.list({ status: 'unread' });
// Render your bell icon with feed.length