Push Notifications
Push notification system to alert users about detected threats in real-time.
Features
Real-time Notifications
Instant delivery
iOS & Android Support
APNs and FCM
Priority by Severity
Critical alerts first
Notification History
Complete tracking
Register Device
POST /notifications/devicesRequest Example
{
"user_id": "usr_123456",
"device_id": "device_abc123",
"platform": "ios",
"push_token": "apns_or_fcm_token_here",
"app_version": "1.0.0",
"language": "es"
}Response Example
{
"registration_id": "reg_xyz789",
"device_id": "device_abc123",
"platform": "ios",
"status": "active",
"registered_at": "2025-01-14T19:00:00Z"
}Send Notification
POST /notifications/sendRequest Example
{
"user_id": "usr_123456",
"notification": {
"title": "⚠️ Security Alert",
"body": "Phishing attempt detected in your email",
"category": "security_alert",
"priority": "high",
"data": {
"alert_type": "phishing",
"alert_id": "alert_abc123"
}
},
"options": {
"send_to_all_devices": true,
"badge_count": 1,
"sound": "alert.wav"
}
}Notification Categories
security_alert
highGeneral security alert
phishing_detected
highPhishing detected in email/SMS
fraud_alert
criticalFraudulent transaction
darkweb_alert
highNew leak detected
vpn_status
normalVPN connection status
refund_status
normalRefund update
system
lowSystem notifications
Notification History
GET /notifications/history?user_id=usr_123456&limit=50Query Parameters: user_id, limit (max 100), offset, category, unread_only