Monitors

Update a monitor

Changed on
patch/monitors/{id}

Request

  • Base URL
    https://api.uptimerobot.com/v3
  • URL
    https://api.uptimerobot.com/v3/monitors/{id}
  • Auth
    HTTP bearer

Path parameters

idnumber required

Request body

friendlyNamestring

Friendly name of the monitor

urlstring

URL of the monitor. For DNS monitors: DNS server IP or hostname. Not required for Heartbeat monitor

type'HTTP' | 'KEYWORD' | 'PING' | 'PORT' | 'HEARTBEAT' | 'DNS' | 'API' | 'UDP' | 'VISUAL_COMPARISON' | 'DEPENDENCY'
portnumber

Required for Port and UDP monitors

portAlertCondition'CLOSED' | 'OPEN'

Alerting condition for Port monitors. Only valid when type is Port; defaults to CLOSED when omitted.

keywordType'ALERT_EXISTS' | 'ALERT_NOT_EXISTS'

Required for Keyword monitor

keywordCaseType0 | 1

Required for Keyword monitor

keywordValuestring nullable

Required for Keyword monitor

intervalnumber

Interval of check in seconds. Heartbeat monitors support at most 2678400 seconds (31 days).

timeoutnumber

Timeout of check in seconds. Only for Http, Keyword and Port monitors

gracePeriodnumber

Grace period of check in seconds. Only for Heartbeat monitor

httpUsernamestring

Username for HTTP Basic authentication

httpPasswordstring

Password for HTTP Basic authentication

httpMethodType'HEAD' | 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'QUERY' nullable

HTTP method to use for the request. For HTTP and Keyword monitors it defaults to HEAD if omitted; API monitors default to GET and do not allow HEAD

authType'NONE' | 'HTTP_BASIC' | 'DIGEST' | 'BEARER'

Authentication method to use for the request. Only applicable for HTTP and Keyword monitors

postValueDataobject

Data to be sent in the request. Not applicable for HTTP method type = HEAD. Can be JSON string or string

postValueType'KEY_VALUE' | 'RAW_JSON'

Type of data payload to be sent in the request. Affects what data is accepted by "postValueData" field

customHttpHeadersobject

Custom HTTP headers to be sent in the request. Must be sent as JSON object with key-value pairs. The serialized JSON must not exceed 3000 characters

successHttpResponseCodesstring[]

Success HTTP response codes. Can contain specific codes or ranges like 2xx. Default is [2xx, 3xx]

checkSSLErrorsboolean

Whether to check for SSL and domain expiration errors

tagNamesstring[]

Tags to be assigned to the monitor

maintenanceWindowsIdsnumber[]

Maintenance windows to be assigned to the monitor

domainExpirationReminderboolean

Whether to send a notification when the domain is about to expire

sslExpirationReminderboolean

Whether to send a notification when the SSL certificate is about to expire

followRedirectionsboolean

Whether to follow redirections

responseTimeThresholdnumber

Response time threshold in milliseconds. When provided, the value is applied to all active regions as regionData.THRESHOLD. Always returns 0 — use regionData.THRESHOLD for per-region control.

regionalData'na' | 'eu' | 'as' | 'oc'

Region for monitoring: na (North America), eu (Europe), as (Asia), oc (Oceania). Note: If both regionalData and regionData are provided, regionData takes priority.

groupIdnumber

Monitor group ID to assign the monitor to. Use 0 for the default group.

customFieldsobject

Custom key-value metadata for the monitor. Max 20 keys. Keys: alphanumeric + underscore + hyphen, max 64 chars. Values: max 255 chars. Paid plans only.

Example request

{
  "friendlyName": "My monitor",
  "url": "http://test.com",
  "type": "HTTP",
  "portAlertCondition": "CLOSED",
  "keywordType": "ALERT_EXISTS",
  "interval": 60,
  "timeout": 30,
  "gracePeriod": 300,
  "httpUsername": "admin",
  "httpPassword": "password",
  "httpMethodType": "HEAD",
  "authType": "NONE",
  "assignedAlertContacts": [
    {
      "alertContactId": 12345,
      "threshold": 5,
      "recurrence": 30
    }
  ],
  "successHttpResponseCodes": [
    "2xx",
    "3xx"
  ],
  "tagNames": [
    "tag1",
    "tag2"
  ],
  "maintenanceWindowsIds": [
    123,
    234
  ],
  "regionalData": "na",
  "regionData": {
    "THRESHOLD": {
      "na": 5000,
      "eu": 6000,
      "as": 7000,
      "oc": 8000
    }
  },
  "groupId": 10,
  "customFields": {
    "environment": "production",
    "team": "platform"
  },
  "config": {
    "sslExpirationPeriodDays": [
      7,
      14,
      30
    ],
    "apiAssertions": {
      "logic": "AND",
      "checks": [
        {
          "property": "$.data.status",
          "comparison": "equals"
        }
      ]
    },
    "ipVersion": "ipv4Only",
    "applicationErrorRetries": 1,
    "dependency": {
      "providerUrlname": "stripe",
      "trackedComponentIds": [
        555,
        556
      ]
    }
  }
}

Response

typeunknown required
intervalnumber required
sslBrandstring nullable required
checkSSLErrorsboolean required
sslExpirationReminderboolean nullable required
domainExpirationReminderboolean nullable required
followRedirectionsboolean required
authTypeunknown required
httpUsernamestring
httpPasswordstring
customHttpHeadersobject nullable required
httpMethodTypeunknown required
successHttpResponseCodesstring[] required
timeoutnumber nullable required
postValueType'KEY_VALUE' | 'RAW_JSON' nullable required
portnumber nullable required
portAlertConditionunknown
gracePeriodnumber nullable required
keywordValuestring nullable required
keywordTypeunknown required
responseTimeThresholdnumber required
heartbeatUrlstring nullable required

Complete heartbeat ping URL for HEARTBEAT monitors; null for every other type

idnumber required
friendlyNamestring required
statusunknown required
urlstring nullable required
currentStateDurationnumber required
lastIncidentIdstring nullable required
userIdnumber required
apiKeystring nullable required
groupIdnumber nullable
customFieldsobject nullable

Changes

    • warning

      added the new 027-016 enum value to the response property for the response status

    • warning

      added the new 004-048 enum value to the response property for the response status

    • warning

      added the new 011-034 enum value to the response property for the response status

    • warning

      added the new 031-001 enum value to the response property for the response status

    • warning

      added the new 031-002 enum value to the response property for the response status

    • warning

      added the new 031-003 enum value to the response property for the response status

    • warning

      added the new 031-004 enum value to the response property for the response status

    • warning

      added the new 031-005 enum value to the response property for the response status