Skip to main content

Overview

Update one or more settings of a monitor. Send only the fields you want to change; everything else keeps its current value. The updated monitor is returned.
A monitor’s type is fixed when it is created, with one exception: HTTP and KEYWORD can switch to each other. Any other change is rejected with VALIDATION_ERROR and details.field set to type. To monitor the same target another way, create a new monitor and delete the old one.
  • HTTP to KEYWORD needs at least one keyword, either in keyword_config.keywords or already stored on the monitor. Without one, the request fails with VALIDATION_ERROR and details.field set to keyword_config.
  • KEYWORD to HTTP removes the monitor’s keywords, even if the request has no keyword_config.
  • Send "keyword_config": { "method": "GET", "keywords": [] } to remove every keyword from an HTTP monitor. A KEYWORD monitor cannot have an empty list; change its type to HTTP in the same request to remove its keywords.

Authentication

Your role must be allowed to edit monitors, otherwise INSUFFICIENT_PERMISSIONS (403).

Path parameters

Request body

All fields are optional. Validation rules match Create Monitor; the type-specific objects are described there. The defaults listed on Create Monitor apply only when a monitor is created. On update, a field you leave out keeps its current value, also inside http_config, keyword_config, tcp_config, dns_config, icmp_config, ssl_monitoring and domain_monitoring. The fields marked required in those objects (for example tcp_config.port or ssl_monitoring.enabled) must still be sent whenever you include the object.

Clearing a value

Send null to remove a stored value; leaving the field out keeps it. This works for the request body (body or http_config.body / keyword_config.body), custom headers (headers or http_config.headers / keyword_config.headers), the slow-response alert threshold (http_config.slow_response_threshold_ms / keyword_config.slow_response_threshold_ms, which turns the slow-response alert off) and the ICMP icmp_config.ttl (IP time-to-live; a cleared TTL falls back to the system default).
An empty object (headers: {}) or empty string (body: "") is accepted for backward compatibility and is stored the same as null. On a KEYWORD monitor, keyword_config can carry the same request fields as http_config (method, headers, body, follow_redirects, max_redirects, expected_status_codes). If both objects send the same field, http_config wins. Domain expiry monitoring is re-checked against the monitor as it will be after the update, but only when the request touches domain_monitoring, target or type. Enabling it on a monitor whose target is not a publicly registered domain returns VALIDATION_ERROR with details.field set to domain_monitoring. A plan limit is only enforced for what the request changes. A monitor that was configured on a higher plan keeps its settings after a downgrade, and you can still edit unrelated fields.

Response

200 OK

The monitor object has the same shape as in Get Monitor.

Errors

Changing the monitor type

HTTP status 400.

All errors

Example