Smart Notifications
Multi-channel notification system with routing based on event types and severity. Supports Email, Telegram, WhatsApp, and Webhooks with acknowledgment tracking.
Notification Channels
Email SMTP
Send notifications via any SMTP provider (Gmail, Outlook, AWS SES, etc.)
- HTML & text support
- Attachment support
- Custom templates
Telegram Bot
Send messages via Telegram Bot API to users or groups
- Bot token authentication
- Group/channel support
- Markdown formatting
WhatsApp Business
WhatsApp Business API integration for official business messaging
- Template messages
- Session-based messaging
- Rich media support
Webhook
Send events to external systems with HMAC-signed payloads
- HMAC SHA-256 signing
- Custom headers
- Retry logic
Event Types
| Event Type | Description | Default Severity |
|---|---|---|
| obligation_due | Obligation approaching due date | medium |
| obligation_overdue | Obligation past due date | high |
| ssl_expiry | SSL certificate expiring soon | high |
| ssl_failure | SSL check failed | critical |
| digest | Daily/weekly summary digest | low |
Notification Flow
Notification Statuses
Queued
Waiting to be processed
Processing
Currently being sent
Sent
Successfully delivered
Failed
Delivery failed, will retry
Dead Letter
Max retries exceeded
Acknowledged
User acknowledged receipt
Retry & Dead Letter
Failed notifications are automatically retried with exponential backoff. After max retries, they move to dead letter for manual review.
• Retry schedule: 1min, 5min, 15min, 30min, 1hour
• Max retries: 5 attempts
• Dead letter: Manual review and replay
• Cron job: /api/cron/retries every 5 minutes
Acknowledgment Tracking
Users can acknowledge notifications to confirm receipt. This creates an audit trail and prevents repeated alerts for the same issue.
// Acknowledge notification
POST /api/notifications/:id/acknowledge
{
"note": "Received, will renew certificate this week"
}
// Response includes:
// - ackByUserId
// - ackAt timestamp
// - ackNote