curl -X POST "https://kodostatus.com/api/heartbeat/hb_abc123" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"status": "up",
"response_time_ms": 1523,
"message": "Backup completed successfully"
}'
# Just ping without body
curl -X POST "https://kodostatus.com/api/heartbeat/hb_abc123" \
-H "X-API-Key: your_api_key"
// At the end of your cron job
await fetch('https://kodostatus.com/api/heartbeat/hb_abc123', {
method: 'POST',
headers: {
'X-API-Key': process.env.KODO_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: 'up',
response_time_ms: Date.now() - startTime
})
});
import requests
requests.post(
'https://kodostatus.com/api/heartbeat/hb_abc123',
headers={'X-API-Key': 'your_api_key'},
json={'status': 'up', 'message': 'Job completed'}
)
{
"success": true,
"recorded_at": "2024-01-15T10:30:00Z",
"monitor_status": "up"
}
Heartbeat
Send Heartbeat
Send a heartbeat ping. If not received within the expected interval, the service is marked as down.
POST
/
heartbeat
/
{monitorId}
curl -X POST "https://kodostatus.com/api/heartbeat/hb_abc123" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"status": "up",
"response_time_ms": 1523,
"message": "Backup completed successfully"
}'
# Just ping without body
curl -X POST "https://kodostatus.com/api/heartbeat/hb_abc123" \
-H "X-API-Key: your_api_key"
// At the end of your cron job
await fetch('https://kodostatus.com/api/heartbeat/hb_abc123', {
method: 'POST',
headers: {
'X-API-Key': process.env.KODO_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: 'up',
response_time_ms: Date.now() - startTime
})
});
import requests
requests.post(
'https://kodostatus.com/api/heartbeat/hb_abc123',
headers={'X-API-Key': 'your_api_key'},
json={'status': 'up', 'message': 'Job completed'}
)
{
"success": true,
"recorded_at": "2024-01-15T10:30:00Z",
"monitor_status": "up"
}
This endpoint requires API key authentication via the
X-API-Key or Authorization: Bearer header.Path Parameters
string
required
The heartbeat monitor ID
Body Parameters
string
default:"up"
Status to report:
up, down, degradedinteger
Execution time in milliseconds
string
Optional status message
Response
boolean
Whether the heartbeat was recorded
string
ISO 8601 timestamp
string
Current monitor status
curl -X POST "https://kodostatus.com/api/heartbeat/hb_abc123" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"status": "up",
"response_time_ms": 1523,
"message": "Backup completed successfully"
}'
# Just ping without body
curl -X POST "https://kodostatus.com/api/heartbeat/hb_abc123" \
-H "X-API-Key: your_api_key"
// At the end of your cron job
await fetch('https://kodostatus.com/api/heartbeat/hb_abc123', {
method: 'POST',
headers: {
'X-API-Key': process.env.KODO_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: 'up',
response_time_ms: Date.now() - startTime
})
});
import requests
requests.post(
'https://kodostatus.com/api/heartbeat/hb_abc123',
headers={'X-API-Key': 'your_api_key'},
json={'status': 'up', 'message': 'Job completed'}
)
{
"success": true,
"recorded_at": "2024-01-15T10:30:00Z",
"monitor_status": "up"
}