Uptime API › Monitors
Update, pause or resume a monitor
Changes only the fields you send. To pause a monitor send
{"is_active": false}; to resume it, {"is_active": true}.
team_id:""moves the monitor to the whole organization; a team must be one the caller is in.assertionsreplaces the whole list;[]clears it.degraded_threshold_ms: 0andsla_target: 0clear those settings.urlis checked against the type only whenurlortypeis sent. The masked URL a read returns can be sent back: each****keeps the stored userinfo or parameter value, so editing another part of the URL keeps its credentials.- A monitor changed to
heartbeatgets aping_token; an existing heartbeat keeps its token.
Requires the uptime:monitor:write scope.
Authorization
Parameters
Path parameters
idstring requiredThe monitor's ID.
Request body required
Every field is optional; only the fields sent change. Rules are those of CreateMonitorRequest.
namestringteam_idstring""moves the monitor to the whole organization.typeMonitorTypeurlstringinterval_secondsintegertimeout_secondsintegergrace_secondsintegerlocationsarray of stringkeywordstringexpected_statusintegeris_activebooleanfalsepauses the monitor,trueresumes it.failure_thresholdintegerhttp_methodstringhttp_headersobject | array of objectReplaces the header set. A header left out is removed. A header sent with an empty value keeps its stored value (names match case-insensitively), and any other value replaces it. Because of that, a monitor read from the API can be sent back unchanged. Accepts the object form, or the response's list form with an optionalvalueper entry.- object
- array of object
namestring requiredvaluestring
http_bodystringhttp_auth_userstringhttp_auth_passwordstringOmit it to keep the stored password;""removes it.check_sslbooleanssl_expiry_threshold_daysintegertagsarray of stringReplaces all tags.group_idstringresponse_time_threshold_msintegeroncall_policy_idstringre_alert_minutesintegerassertionsarray of AssertionReplaces the whole list;[]clears it.Show Assertion properties
typestring requiredfieldstringoperatorstring requiredvaluestring
degraded_threshold_msinteger0clears it.alert_on_degradedbooleansla_targetnumber0clears it.
Responses
200
The monitor as saved.
dataMonitorShow Monitor properties
idstringStarts withmon_.org_idstringteam_idstringThe owning team, or""for the whole organization.namestringurlstringThe target;""for a heartbeat monitor. Shown with credentials masked: userinfo becomes****:****@and the values oftoken,key,secret,password,sig,signature,auth,api_keyandaccess_tokenquery parameters (any case, or a name ending in_or-plus one of them) become****. Checks use the URL as entered.typeMonitorTypeinterval_secondsintegerHow often it is checked; for a heartbeat, how often a ping is expected.timeout_secondsintegerlocationsarray of stringProbe locations. Empty means EvoHub chooses.keywordstringText akeywordmonitor looks for in the body.expected_statusintegerThe status code an HTTP check expects when there are nostatus_codeassertions.is_activebooleanfalsewhile paused: no checks and no alerts.failure_thresholdintegerFailed checks in a row before the monitor is down.consecutive_failuresintegerlast_checked_atstring (date-time)last_statusMonitorStatussilenced_untilstring (date-time)Present on the list while a silence window mutes the monitor; when it ends.http_methodstringhttp_headersarray of objectThe request headers by name, sorted. A header's value is never returned, since it often carries a token.has_valuesays whether one is stored.namestringhas_valueboolean
http_bodystringhttp_auth_userstringhas_http_auth_passwordbooleanWhether a Basic Auth password is stored. The password itself is never returned.check_sslbooleanWarn before the TLS certificate expires.ssl_expiry_threshold_daysintegerDays before expiry to warn.ssl_expiry_daysintegerDays until the certificate expires, from the last check.tagsarray of stringgroup_idstringresponse_time_threshold_msintegeroncall_policy_idstringThe On-Call escalation policy its alerts go to.re_alert_minutesintegerMinutes between repeat alerts while down.grace_secondsintegerHeartbeat only. How late a ping may be.ping_tokenstringHeartbeat only. The job callshttps://evohub.io/ping/{ping_token}.last_ping_atstring (date-time)Heartbeat only.created_atstring (date-time)updated_atstring (date-time)assertionsarray of AssertionShow Assertion properties
typestring requiredfieldstringoperatorstring requiredvaluestring
degraded_threshold_msinteger | nullA passing check slower than this is degraded.alert_on_degradedbooleanRaise a lower-severity alert while degraded.consecutive_degradedintegersla_targetnumber | nullThe uptime percentage the monitor is held to, e.g. 99.9.last_failure_reasonstringlast_failure_atstring (date-time)uptime_percentobjectUptime percentage per window. A single monitor carries24h,7d,30dand90d; the list carries only30d.nullfor a window with no checks. Absent for heartbeat monitors.sla_breached_30dbooleanThe 30-day uptime is belowsla_target. Absent without a target or 30-day data, and for heartbeat monitors.
400
The body is not JSON (INVALID_JSON) or a field breaks a rule (VALIDATION_ERROR), as for creating a monitor.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks uptime:monitor:write (FORBIDDEN), or team_id names a team the caller is not in (NOT_IN_TEAM).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
404
The monitor does not exist, or belongs to a team the caller cannot see (MONITOR_NOT_FOUND).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X PATCH 'https://evohub.io/api/v1/monitors/mon_8c1d0b52-6f3e-4a7d-9b21-0e5c4f7a3d19' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"is_active": false
}'