MonitorsDns monitors
Update DNS Monitor
Updates a DNS monitor.
PATCH /api/dns-monitors/:dnsMonitorPublicId
Notes:
- Readonly users may only change
status. - Global supporters cannot update DNS monitors.
- If you send
customerId, it accepts either the internal numeric ID or the customerpublicIdUUID.
Request Body (example)
{
"customerId": "6764e84f-f02a-43e6-a46d-cecaec556723",
"status": "maintenance",
"name": "Primary DNS Monitor",
"hostname": "claas.sh",
"checkInterval": 30,
"timeoutSeconds": 30,
"dnsConfig": {
"rrtypes": ["A"],
"matchMode": "exact",
"expectedValues": {
"A": ["76.76.21.21"]
},
"triggerOn": {
"resolveError": true,
"mismatch": true
}
}
}If you send dnsConfig, it must include rrtypes, matchMode, and at least one expectedValues entry for every RR type listed.
Example (cURL)
BASE_URL="https://uptimeify.io"
TOKEN="<your-api-token>"
curl -X PATCH \
"$BASE_URL/api/dns-monitors/11111111-1111-4111-8111-111111111111" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"customerId":"6764e84f-f02a-43e6-a46d-cecaec556723","status":"maintenance","name":"Primary DNS Monitor","hostname":"claas.sh","checkInterval":30,"timeoutSeconds":30,"dnsConfig":{"rrtypes":["A"],"matchMode":"exact","expectedValues":{"A":["76.76.21.21"]},"triggerOn":{"resolveError":true,"mismatch":true}}}'Common errors
400 DNS monitor ID is required400 Invalid status400 Invalid Customer identifier400 Expected values are required for RR type <TYPE>401 Unauthorized403 Forbidden404 Customer not found
Response
Returns the updated DNS monitor object. See Error Codes for error responses.