Uptimeify Docs
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 customer publicId UUID.

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 required
  • 400 Invalid status
  • 400 Invalid Customer identifier
  • 400 Expected values are required for RR type <TYPE>
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Customer not found

Response

Returns the updated DNS monitor object. See Error Codes for error responses.

On this page