EvoHub Docs Sign in

Uptime API › Monitors

Update, pause or resume a monitor

Use with AI
View as MarkdownThis page as plain text, for pasting into an AI tool Open in ClaudeAsk Claude questions about this page Open in ChatGPTAsk ChatGPT questions about this page
Connect to Cursor / VS Code / ClaudeSearch and read these docs from your AI tool (MCP server)

MCP server URL

https://docs-dev.evohub.io/mcp

Claude Code

claude mcp add --transport http evohub-docs-docs https://docs-dev.evohub.io/mcp

Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector, and paste the URL above.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docs-dev.evohub.io/mcp"
      ]
    }
  }
}

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}

VS Code — .vscode/mcp.json

{
  "servers": {
    "evohub-docs-docs": {
      "type": "http",
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}
PATCH/api/v1/monitors/{id}

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.
  • assertions replaces the whole list; [] clears it.
  • degraded_threshold_ms: 0 and sla_target: 0 clear those settings.
  • url is checked against the type only when url or type is 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 heartbeat gets a ping_token; an existing heartbeat keeps its token.

Requires the uptime:monitor:write scope.

Authorization

Any one of:

Parameters

Path parameters

  • id string required
    The monitor's ID.
    Example: mon_8c1d0b52-6f3e-4a7d-9b21-0e5c4f7a3d19

Request body required

Content type: application/json

Type: UpdateMonitorRequest

Every field is optional; only the fields sent change. Rules are those of CreateMonitorRequest.

  • name string
    Min length: 1 · Max length: 255
  • team_id string
    "" moves the monitor to the whole organization.
  • type MonitorType
    One of: http keyword tcp icmp heartbeat
  • url string
  • interval_seconds integer
    Minimum: 15 · Maximum: 2592000
  • timeout_seconds integer
    Minimum: 1 · Maximum: 60
  • grace_seconds integer
    Minimum: 0 · Maximum: 86400
  • locations array of string
    Max items: 5
  • keyword string
  • expected_status integer
    Minimum: 100 · Maximum: 599
  • is_active boolean
    false pauses the monitor, true resumes it.
  • failure_threshold integer
    Minimum: 1 · Maximum: 10
  • http_method string
    One of: GET POST PUT PATCH DELETE HEAD OPTIONS
  • http_headers object | array of object
    Replaces 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 optional value per entry.

    One of:

    • object
      Other keys: string
    • array of object
      • name string required
      • value string
  • http_body string
  • http_auth_user string
  • http_auth_password string
    Omit it to keep the stored password; "" removes it.
    Write-only
  • check_ssl boolean
  • ssl_expiry_threshold_days integer
    Minimum: 1 · Maximum: 365
  • tags array of string
    Replaces all tags.
    Max items: 20
  • group_id string
  • response_time_threshold_ms integer
    Minimum: 1
  • oncall_policy_id string
  • re_alert_minutes integer
    Minimum: 1 · Maximum: 1440
  • assertions array of Assertion
    Replaces the whole list; [] clears it.
    Max items: 10
    Show Assertion properties
    • type string required
      One of: status_code body json header
    • field string
      Max length: 1024
    • operator string required
      One of: in contains not_contains equals not_equals exists
    • value string
      Max length: 1024
  • degraded_threshold_ms integer
    0 clears it.
    Minimum: 0 · Maximum: 60000
  • alert_on_degraded boolean
  • sla_target number
    0 clears it.
    Minimum: 0 · Maximum: 100

Responses

200

The monitor as saved.

Content type: application/json

Type: MonitorEnvelope

  • data Monitor
    Show Monitor properties
    • id string
      Starts with mon_.
    • org_id string
    • team_id string
      The owning team, or "" for the whole organization.
    • name string
    • url string
      The target; "" for a heartbeat monitor. Shown with credentials masked: userinfo becomes ****:****@ and the values of token, key, secret, password, sig, signature, auth, api_key and access_token query parameters (any case, or a name ending in _ or - plus one of them) become ****. Checks use the URL as entered.
    • type MonitorType
      One of: http keyword tcp icmp heartbeat
    • interval_seconds integer
      How often it is checked; for a heartbeat, how often a ping is expected.
    • timeout_seconds integer
    • locations array of string
      Probe locations. Empty means EvoHub chooses.
    • keyword string
      Text a keyword monitor looks for in the body.
    • expected_status integer
      The status code an HTTP check expects when there are no status_code assertions.
    • is_active boolean
      false while paused: no checks and no alerts.
    • failure_threshold integer
      Failed checks in a row before the monitor is down.
    • consecutive_failures integer
    • last_checked_at string (date-time)
    • last_status MonitorStatus
      One of: up down degraded unknown
    • silenced_until string (date-time)
      Present on the list while a silence window mutes the monitor; when it ends.
    • http_method string
    • http_headers array of object
      The request headers by name, sorted. A header's value is never returned, since it often carries a token. has_value says whether one is stored.
      • name string
      • has_value boolean
    • http_body string
    • http_auth_user string
    • has_http_auth_password boolean
      Whether a Basic Auth password is stored. The password itself is never returned.
    • check_ssl boolean
      Warn before the TLS certificate expires.
    • ssl_expiry_threshold_days integer
      Days before expiry to warn.
    • ssl_expiry_days integer
      Days until the certificate expires, from the last check.
    • tags array of string
    • group_id string
    • response_time_threshold_ms integer
    • oncall_policy_id string
      The On-Call escalation policy its alerts go to.
    • re_alert_minutes integer
      Minutes between repeat alerts while down.
    • grace_seconds integer
      Heartbeat only. How late a ping may be.
    • ping_token string
      Heartbeat only. The job calls https://evohub.io/ping/{ping_token}.
    • last_ping_at string (date-time)
      Heartbeat only.
    • created_at string (date-time)
    • updated_at string (date-time)
    • assertions array of Assertion
      Show Assertion properties
      • type string required
        One of: status_code body json header
      • field string
        Max length: 1024
      • operator string required
        One of: in contains not_contains equals not_equals exists
      • value string
        Max length: 1024
    • degraded_threshold_ms integer | null
      A passing check slower than this is degraded.
    • alert_on_degraded boolean
      Raise a lower-severity alert while degraded.
    • consecutive_degraded integer
    • sla_target number | null
      The uptime percentage the monitor is held to, e.g. 99.9.
    • last_failure_reason string
    • last_failure_at string (date-time)
    • uptime_percent object
      Uptime percentage per window. A single monitor carries 24h, 7d, 30d and 90d; the list carries only 30d. null for a window with no checks. Absent for heartbeat monitors.
      Other keys: number | null
    • sla_breached_30d boolean
      The 30-day uptime is below sla_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.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: MONITOR_NOT_FOUND
    • message string required
      Example: monitor not found
    • request_id string

401

No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: MONITOR_NOT_FOUND
    • message string required
      Example: monitor not found
    • request_id string

403

The key lacks uptime:monitor:write (FORBIDDEN), or team_id names a team the caller is not in (NOT_IN_TEAM).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: MONITOR_NOT_FOUND
    • message string required
      Example: monitor not found
    • request_id string

404

The monitor does not exist, or belongs to a team the caller cannot see (MONITOR_NOT_FOUND).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: MONITOR_NOT_FOUND
    • message string required
      Example: monitor not found
    • request_id string

429

Too many requests (RATE_LIMITED). Wait for Retry-After seconds.

Headers

  • Retry-After integer
    Seconds to wait before retrying.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: MONITOR_NOT_FOUND
    • message string required
      Example: monitor not found
    • request_id string

500

Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: MONITOR_NOT_FOUND
    • message string required
      Example: monitor not found
    • request_id string

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
}'

Last updated