Uptime Monitoring API
Monitor endpoint availability, response times, and receive instant alerts when your services go down. Track uptime percentages and performance metrics over time.
Overview
The Uptime Monitoring API allows you to set up HTTP/HTTPS endpoint monitoring with customizable check intervals, timeout thresholds, and alerting rules. Monitor response times and track historical uptime data.
Uptime monitoring is available on Pro plans and above. View pricing for details.
Monitoring Features
HTTP/HTTPS Checks
Monitor any HTTP endpoint with custom headers
Response Time Tracking
Track latency and performance trends
Content Validation
Verify response contains expected content
Instant Alerts
Email, webhook, Slack, Discord notifications
Endpoints
List Monitors
Retrieve a list of all uptime monitors in your account with their current status.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| status string | Optional | Filter by status: up, down, paused |
| page integer | Optional | Page number (default: 1) |
| per_page integer | Optional | Items per page, max 100 (default: 20) |
Example Request
curl -X GET "https://myssl.info/api/v1/uptime/monitors" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"monitors": [
{
"id": 1,
"name": "Production API",
"url": "https://api.example.com/health",
"method": "GET",
"status": "up",
"check_interval": 60,
"last_check": "2025-01-13T15:00:00Z",
"last_response_time_ms": 145,
"uptime_24h": 99.98,
"uptime_7d": 99.95,
"uptime_30d": 99.92,
"is_active": true
},
{
"id": 2,
"name": "Marketing Website",
"url": "https://www.example.com",
"method": "GET",
"status": "up",
"check_interval": 300,
"last_check": "2025-01-13T14:55:00Z",
"last_response_time_ms": 320,
"uptime_24h": 100.0,
"uptime_7d": 99.99,
"uptime_30d": 99.97,
"is_active": true
}
],
"summary": {
"total": 2,
"up": 2,
"down": 0,
"paused": 0
},
"pagination": {
"page": 1,
"per_page": 20,
"total": 2,
"pages": 1
}
}
Create Monitor
Create a new uptime monitor for an HTTP/HTTPS endpoint.
Request Body
| Parameter | Type | Description |
|---|---|---|
| name string Required | Body | Friendly name for the monitor |
| url string Required | Body | Full URL to monitor (http:// or https://) |
| method string | Body | HTTP method: GET (default), POST, HEAD |
| check_interval integer | Body | Check interval in seconds: 60, 300, 600, 1800, 3600 (depends on tier) |
| timeout integer | Body | Request timeout in seconds (default: 30, max: 60) |
| expected_status_codes array[integer] | Body | Expected HTTP status codes (default: [200, 201, 204]) |
| expected_content string | Body | String that must be present in response body |
| headers object | Body | Custom HTTP headers to send with request |
| body string | Body | Request body (for POST requests) |
| alert_threshold integer | Body | Number of consecutive failures before alerting (default: 2) |
| follow_redirects boolean | Body | Follow HTTP redirects (default: true) |
| verify_ssl boolean | Body | Verify SSL certificate (default: true) |
Example Request
curl -X POST "https://myssl.info/api/v1/uptime/monitors" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API Health Check",
"url": "https://api.example.com/health",
"method": "GET",
"check_interval": 60,
"timeout": 10,
"expected_status_codes": [200],
"expected_content": "\"status\":\"healthy\"",
"headers": {
"X-API-Key": "internal-monitoring-key"
},
"alert_threshold": 3
}'
Example Response
{
"monitor": {
"id": 3,
"name": "Production API Health Check",
"url": "https://api.example.com/health",
"method": "GET",
"status": "pending",
"check_interval": 60,
"timeout": 10,
"expected_status_codes": [200],
"expected_content": "\"status\":\"healthy\"",
"alert_threshold": 3,
"is_active": true,
"created_at": "2025-01-13T15:30:00Z"
},
"message": "Monitor created successfully. First check will run shortly."
}
Get Monitor Details
Retrieve detailed information about a specific monitor including its configuration and recent checks.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id integer Required | Path | The unique monitor ID |
Example Request
curl -X GET "https://myssl.info/api/v1/uptime/monitors/1" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"monitor": {
"id": 1,
"name": "Production API",
"url": "https://api.example.com/health",
"method": "GET",
"status": "up",
"check_interval": 60,
"timeout": 30,
"expected_status_codes": [200],
"expected_content": null,
"headers": {},
"alert_threshold": 2,
"follow_redirects": true,
"verify_ssl": true,
"is_active": true,
"created_at": "2024-12-01T00:00:00Z",
"updated_at": "2025-01-13T15:00:00Z",
"statistics": {
"uptime_24h": 99.98,
"uptime_7d": 99.95,
"uptime_30d": 99.92,
"avg_response_time_24h_ms": 142,
"avg_response_time_7d_ms": 148,
"total_checks_24h": 1440,
"successful_checks_24h": 1437,
"failed_checks_24h": 3
},
"last_check": {
"timestamp": "2025-01-13T15:00:00Z",
"status": "up",
"response_time_ms": 145,
"status_code": 200
},
"recent_incidents": [
{
"id": 42,
"started_at": "2025-01-10T03:15:00Z",
"resolved_at": "2025-01-10T03:18:00Z",
"duration_seconds": 180,
"cause": "Connection timeout"
}
]
}
}
Update Monitor
Update the configuration of an existing monitor.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id integer Required | Path | The unique monitor ID |
Example Request
curl -X PUT "https://myssl.info/api/v1/uptime/monitors/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"check_interval": 300,
"timeout": 15,
"alert_threshold": 5
}'
Example Response
{
"monitor": {
"id": 1,
"name": "Production API",
"check_interval": 300,
"timeout": 15,
"alert_threshold": 5,
"updated_at": "2025-01-13T15:35:00Z"
},
"message": "Monitor updated successfully"
}
Pause Monitor
Temporarily pause monitoring for a specific endpoint. Useful during maintenance windows.
Example Request
curl -X POST "https://myssl.info/api/v1/uptime/monitors/1/pause" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"monitor": {
"id": 1,
"status": "paused",
"paused_at": "2025-01-13T15:40:00Z"
},
"message": "Monitor paused successfully"
}
Resume Monitor
Resume monitoring for a paused endpoint.
Example Request
curl -X POST "https://myssl.info/api/v1/uptime/monitors/1/resume" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"monitor": {
"id": 1,
"status": "up",
"resumed_at": "2025-01-13T16:00:00Z"
},
"message": "Monitor resumed successfully"
}
Delete Monitor
Delete an uptime monitor and all its associated check history.
Warning: This action is irreversible. All check history and incident data will be permanently deleted.
Example Request
curl -X DELETE "https://myssl.info/api/v1/uptime/monitors/1" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"message": "Monitor deleted successfully",
"deleted_monitor_id": 1
}
Get Check History
Retrieve the check history for a monitor with response times and status codes.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| from_date string | Optional | Start date (ISO 8601 format) |
| to_date string | Optional | End date (ISO 8601 format) |
| status string | Optional | Filter by result: success, failure |
| page integer | Optional | Page number (default: 1) |
| per_page integer | Optional | Items per page, max 1000 (default: 100) |
Example Request
curl -X GET "https://myssl.info/api/v1/uptime/monitors/1/checks?per_page=50" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"monitor_id": 1,
"checks": [
{
"timestamp": "2025-01-13T15:00:00Z",
"status": "success",
"response_time_ms": 145,
"status_code": 200
},
{
"timestamp": "2025-01-13T14:59:00Z",
"status": "success",
"response_time_ms": 152,
"status_code": 200
},
{
"timestamp": "2025-01-13T14:58:00Z",
"status": "failure",
"response_time_ms": null,
"status_code": null,
"error": "Connection timeout"
}
],
"pagination": {
"page": 1,
"per_page": 50,
"total": 1440,
"pages": 29
}
}
Get Incidents
Retrieve the incident history for a monitor. An incident is created when consecutive checks fail.
Example Request
curl -X GET "https://myssl.info/api/v1/uptime/monitors/1/incidents" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"monitor_id": 1,
"incidents": [
{
"id": 42,
"status": "resolved",
"started_at": "2025-01-10T03:15:00Z",
"resolved_at": "2025-01-10T03:18:00Z",
"duration_seconds": 180,
"cause": "Connection timeout",
"affected_checks": 3,
"alerts_sent": [
{
"type": "email",
"sent_at": "2025-01-10T03:15:30Z"
},
{
"type": "webhook",
"sent_at": "2025-01-10T03:15:31Z"
}
]
},
{
"id": 41,
"status": "resolved",
"started_at": "2025-01-05T14:22:00Z",
"resolved_at": "2025-01-05T14:25:00Z",
"duration_seconds": 180,
"cause": "HTTP 503 Service Unavailable",
"affected_checks": 3,
"alerts_sent": []
}
],
"summary": {
"total_incidents_30d": 2,
"total_downtime_30d_seconds": 360,
"mttr_seconds": 180
},
"pagination": {
"page": 1,
"per_page": 20,
"total": 2,
"pages": 1
}
}
Monitor Statuses
Understanding monitor status values:
| Status | Description |
|---|---|
| up | Endpoint is responding successfully |
| down | Endpoint is not responding or returning errors |
| degraded | Endpoint responding but with high latency |
| paused | Monitoring is temporarily disabled |
| pending | Waiting for first check to complete |
Error Codes
Uptime-specific error codes:
| Code | Message | Description |
|---|---|---|
| 400 | Invalid URL | URL must be a valid HTTP/HTTPS URL |
| 400 | Invalid interval | Check interval must be one of: 60, 300, 600, 1800, 3600 |
| 403 | Feature not available | Uptime monitoring requires Pro plan or above |
| 403 | Monitor limit reached | You've reached your plan's monitor limit |
| 404 | Monitor not found | The specified monitor ID does not exist |
| 409 | URL already monitored | This URL is already being monitored |