curl -X PATCH "https://kodostatus.com/api/v1/domain-monitors/dom_abc123" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"alert_days": 90,
"enabled": true
}'
const response = await fetch('https://kodostatus.com/api/v1/domain-monitors/dom_abc123', {
method: 'PATCH',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alert_days: 90,
enabled: true
})
});
const domain_monitor = await response.json();
{
"id": "dom_abc123",
"domain": "example.com",
"alert_days": 90,
"enabled": true,
"last_checked_at": "2024-01-15T10:30:00Z",
"registration": {
"registrar": "Cloudflare, Inc.",
"expiry_date": "2025-01-15T00:00:00Z",
"days_until_expiry": 365
},
"updated_at": "2024-01-15T11:00:00Z"
}
Domain Monitors
Update Domain Monitor
Update an existing domain expiration monitor
PATCH
/
domain-monitors
/
{id}
curl -X PATCH "https://kodostatus.com/api/v1/domain-monitors/dom_abc123" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"alert_days": 90,
"enabled": true
}'
const response = await fetch('https://kodostatus.com/api/v1/domain-monitors/dom_abc123', {
method: 'PATCH',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alert_days: 90,
enabled: true
})
});
const domain_monitor = await response.json();
{
"id": "dom_abc123",
"domain": "example.com",
"alert_days": 90,
"enabled": true,
"last_checked_at": "2024-01-15T10:30:00Z",
"registration": {
"registrar": "Cloudflare, Inc.",
"expiry_date": "2025-01-15T00:00:00Z",
"days_until_expiry": 365
},
"updated_at": "2024-01-15T11:00:00Z"
}
Path Parameters
string
required
The unique identifier of the domain monitor to update
Request Body
All fields are optional.number
Days before expiration to trigger alerts
boolean
Enable or disable the monitor
string
Link to a service, or
null to unlinkarray
Update notification channel IDs
Response
Returns the updated domain monitor object.curl -X PATCH "https://kodostatus.com/api/v1/domain-monitors/dom_abc123" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"alert_days": 90,
"enabled": true
}'
const response = await fetch('https://kodostatus.com/api/v1/domain-monitors/dom_abc123', {
method: 'PATCH',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alert_days: 90,
enabled: true
})
});
const domain_monitor = await response.json();
{
"id": "dom_abc123",
"domain": "example.com",
"alert_days": 90,
"enabled": true,
"last_checked_at": "2024-01-15T10:30:00Z",
"registration": {
"registrar": "Cloudflare, Inc.",
"expiry_date": "2025-01-15T00:00:00Z",
"days_until_expiry": 365
},
"updated_at": "2024-01-15T11:00:00Z"
}