Notifications API
Manage email notifications and alert history via the CuliUptime API. CuliUptime currently supports email notifications for monitor downtime and recovery events.
🔔 Active Notifications​
Get Active Notifications​
Get currently active (unresolved) notifications.
Request:
GET /api/v1/notifications/active
Example:
curl -X GET \
-b "session_cookie=YOUR_SESSION" \
https://uptime.culiops.net/api/v1/notifications/active
Response:
{
"data": [
{
"id": 456,
"monitor_id": 123,
"type": "downtime",
"message": "Monitor 'My Website' is offline",
"status": "active",
"started_at": "2024-01-15T10:00:00Z",
"notification_method": "email",
"acknowledged": false
}
],
"meta": {
"count": 1,
"timestamp": "2024-01-15T10:30:00Z"
}
}
📋 Recent Notifications​
Get Recent Notifications​
Get recent notifications (last 24 hours).
Request:
GET /api/v1/notifications/recent
Example:
curl -X GET \
-b "session_cookie=YOUR_SESSION" \
https://uptime.culiops.net/api/v1/notifications/recent
Response:
{
"data": [
{
"id": 457,
"monitor_id": 123,
"type": "recovery",
"message": "Monitor 'My Website' is back online",
"status": "resolved",
"started_at": "2024-01-15T09:00:00Z",
"resolved_at": "2024-01-15T09:05:00Z",
"duration": 300,
"notification_method": "email",
"acknowledged": true
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 25,
"has_next": false
}
}
📜 Notification History​
List All Notifications​
Get paginated notification history with filtering options.
Request:
GET /api/v1/notifications
Parameters:
page
- Page number (default: 1)limit
- Items per page (default: 50, max: 100)monitor_id
- Filter by specific monitortype
- Filter by notification type (downtime
,recovery
)status
- Filter by status (active
,resolved
)since
- Filter notifications since date (ISO 8601)
Example:
# Get notifications for specific monitor
curl -X GET \
-b "session_cookie=YOUR_SESSION" \
"https://uptime.culiops.net/api/v1/notifications?monitor_id=123&limit=25"
Response:
{
"data": [
{
"id": 458,
"monitor_id": 123,
"type": "downtime",
"message": "Monitor 'My Website' is offline - HTTP 500 error",
"status": "resolved",
"started_at": "2024-01-14T15:30:00Z",
"resolved_at": "2024-01-14T15:45:00Z",
"duration": 900,
"notification_method": "email",
"acknowledged": true,
"error_details": {
"status_code": 500,
"response_time": null,
"error_message": "Internal Server Error"
}
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 156,
"pages": 7,
"has_next": true,
"has_prev": false
}
}
🎯 Individual Notifications​
Get Notification Details​
Get detailed information about a specific notification.
Request:
GET /api/v1/notifications/{id}
Example:
curl -X GET \
-b "session_cookie=YOUR_SESSION" \
https://uptime.culiops.net/api/v1/notifications/456
Response:
{
"data": {
"id": 456,
"monitor_id": 123,
"monitor_name": "My Website",
"monitor_url": "https://example.com",
"type": "downtime",
"message": "Monitor 'My Website' is offline",
"status": "active",
"started_at": "2024-01-15T10:00:00Z",
"resolved_at": null,
"duration": 1800,
"notification_method": "email",
"acknowledged": false,
"email_sent_at": "2024-01-15T10:01:00Z",
"error_details": {
"status_code": null,
"response_time": null,
"error_message": "Connection timeout after 30 seconds"
}
}
}
✅ Notification Actions​
Acknowledge Notification​
Mark a notification as acknowledged (for active notifications).
Request:
POST /api/v1/notifications/{id}/acknowledge
Example:
curl -X POST \
-b "session_cookie=YOUR_SESSION" \
https://uptime.culiops.net/api/v1/notifications/456/acknowledge
Response:
{
"message": "Notification acknowledged successfully",
"data": {
"id": 456,
"acknowledged": true,
"acknowledged_at": "2024-01-15T10:30:00Z"
}
}
Resolve Notification​
Mark a notification as resolved (for active notifications).
Request:
POST /api/v1/notifications/{id}/resolve
Example:
curl -X POST \
-b "session_cookie=YOUR_SESSION" \
https://uptime.culiops.net/api/v1/notifications/456/resolve
Response:
{
"message": "Notification resolved successfully",
"data": {
"id": 456,
"status": "resolved",
"resolved_at": "2024-01-15T10:30:00Z"
}
}
📧 Notification Types​
Downtime Notifications​
Sent when a monitor fails checks and goes offline:
- Trigger: Monitor check fails (HTTP error, timeout, etc.)
- Email Content: Monitor details, error information, timestamp
- Status:
active
until monitor recovers
Recovery Notifications​
Sent when a monitor comes back online after downtime:
- Trigger: Monitor check succeeds after being offline
- Email Content: Monitor details, downtime duration, recovery timestamp
- Status:
resolved
automatically
🎯 Notification Object Structure​
{
"id": 456,
"monitor_id": 123,
"monitor_name": "My Website",
"monitor_url": "https://example.com",
"type": "downtime|recovery",
"message": "Human-readable notification message",
"status": "active|resolved",
"started_at": "2024-01-15T10:00:00Z",
"resolved_at": "2024-01-15T10:05:00Z",
"duration": 300,
"notification_method": "email",
"acknowledged": false,
"acknowledged_at": null,
"email_sent_at": "2024-01-15T10:01:00Z",
"error_details": {
"status_code": 500,
"response_time": 1500,
"error_message": "HTTP 500 Internal Server Error"
}
}
Field Descriptions:
duration
- Seconds between started_at and resolved_at (null if active)acknowledged
- User has acknowledged the notificationnotification_method
- Currently only "email" supportederror_details
- Technical details about the monitor failure
CuliUptime's notification system ensures you're immediately alerted to service disruptions and kept informed of recovery status.