K
PUT/v1/monitors/{monitor_uuid}

Update a monitor

Updates a monitor.

Request

Path Parameters
uuidstringrequired
The unique identifier of the monitor to update
Example:"mon_3GhAQMYGEQuyUH"
Bodyapplication/json
namestringoptional
Pronounceable name of the monitor
urlstringoptional
The URL of your website or host
protocolenum<string>optional
Type of monitor
Available options:
httpporticmp
regionsarray<string>optional
Array of region names to monitor from
Available options:
sanfrancisconyclondonparisfrankfurtseoulmumbaibangaloresaopaulocaliforniavirginiasydneytorontoamsterdamsingaporetokyobahrain
check_frequencynumberoptional
Check frequency in seconds
Available options:
1020306012018030060018003600216004320086400
http_methodenum<string>optional
HTTP method for the request
Available options:
GETPOSTPUTHEADDELETEPATCHOPTIONS
request_bodystringoptional
Request body for POST, PUT, PATCH requests
request_headersarray<object>optional
Array of objects with name and value for custom headers
follow_redirectsbooleanoptional
Whether to follow HTTP redirects
portnumberoptional
Port number to check. Required if protocol is port
expected_status_codestringoptional
Expected HTTP status code
Example:"2xx"
required_keywordstringoptional
Triggers downtime if body response is missing this keyword
pausedbooleanoptional
Whether the monitor should be paused
alerts_waitnumberoptional
Minutes to wait before sending alerts. Use -1 to disable alerts.
Available options:
-101235103060
escalation_policystringoptional
Policy UUID to link. Send null or "none" to unlink.
Example:"policy_123abc"

Response

Returns the updated monitor object.

RequestcURL
curl -X PUT https://api.hyperping.io/v1/monitors/mon_3GhAQMYGEQuyUH \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Website",
    "url": "https://acme.com",
    "regions": ["paris", "frankfurt", "amsterdam", "london"],
    "http_method": "GET",
    "check_frequency": 30,
    "request_headers": [
      { "name": "X-Request-Header", "value": "Header value" }
    ],
    "protocol": "http"
  }'
200 OKJSON
{
  "name": "Website",
  "url": "https://acme.com",
  "paused": false,
  "regions": [
    "paris",
    "frankfurt",
    "amsterdam",
    "london"
  ],
  "http_method": "GET",
  "check_frequency": 30,
  "request_headers": [
    {
      "name": "X-Request-Header",
      "value": "Header value"
    }
  ],
  "protocol": "http",
  "port": null,
  "follow_redirects": true,
  "expected_status_code": "2xx",
  "request_body": "",
  "projectUuid": "0109c1f0-b521-44f4-9681-9046aa6f51d8",
  "uuid": "mon_3GhAQMYGEQuyUH",
  "status": "up",
  "ssl_expiration": 90,
  "alerts_wait": 0,
  "escalation_policy": {
    "uuid": "policy_EGy0NOiHLLYiva",
    "name": "On-Call DevOps"
  }
}