Skip to content
bynhDocs

Update a monitor

PATCH/workspaces/{workspace}/status/monitors/{monitor}

Changes only the fields you send. Changing the address, type or interval schedules a fresh check straight away.

Authentication

Send an API token as a bearer token. This endpoint needs a read and write token, made by an editor, admin or owner. Create one in My account → API tokens; see scopes and roles.

Authorization: Bearer 42|bynh_pat_•••••••Header

Path parameters

  • workspacestringRequired

    Your workspace slug, e.g. dokan.

  • monitorintegerRequired

    Monitor id.

Request body

application/json
  • namestringmax 80

    “Give the monitor a name, like “Checkout API”.”

  • typeenum

    Check type. One of http, keyword, tcp, heartbeat.

  • urlstring, nullableRequiredmax 2048

    Must match ^https?://\S+$. Private and internal addresses are refused at save time.

  • hoststring, nullableRequiredmax 253

    Host name or IP, no scheme or path.

  • portinteger, nullableRequired

    1–65535.

  • methodenumdefault GET

    HTTP method. One of HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS.

  • expected_statusesstring

    1–20 codes (200) or classes (2xx). Default ["2xx","3xx"].

  • keywordstring, nullableRequiredmax 200

    Word or phrase to look for.

  • keyword_absentbooleandefault false

    Up when the keyword is absent.

  • request_headersstring

    Up to 20. name matches ^[A-Za-z0-9-]{1,64}$ and can’t be host, content-length, transfer-encoding, connection, upgrade, te, trailer, proxy-authorization or keep-alive; value max 1000.

  • request_bodystring, nullablemax 10000

    Must be valid JSON when body_is_json is true.

  • body_is_jsonbooleandefault false

    Send the body as JSON.

  • auth_typeenumdefault none

    none clears the stored username and secret. One of none, bearer, basic.

  • auth_usernamestring, nullablemax 120

    Basic auth user.

  • auth_secretstring, nullablemax 2000

    Token or password. Write-only; an empty value keeps the stored one.

  • follow_redirectsbooleandefault true

  • verify_sslbooleandefault true

  • ssl_remindersbooleandefault true

    Email before the TLS certificate expires.

  • timeout_secondsintegerdefault 10

    1–60.

  • interval_secondsenumdefault 60

    Check interval. One of 60, 300, 900, 1800, 3600, 43200, 86400.

  • failure_thresholdintegerdefault 2

    1–10 failed checks before it’s down.

  • slow_after_msinteger, nullable

    100–60000.

  • alert_emailbooleandefault true

    Email the team when it goes down or recovers.

  • incident_modeenumdefault draft

    When it goes down, open a draft incident or post one straight away. One of draft, publish.

  • tagsstring

    Up to 10, each max 32; stored lower-case and de-duplicated.

  • metastring

    Up to 20; key max 40, value max 200.

  • show_response_timebooleandefault false

    Show response time on the public status page.

  • pageobject

    Status page placement: show (boolean, required with page), name (max 80; defaults to the monitor name), component_id (existing component), group_id (existing group). show: false takes it off the page and removes an unused component.

Response

200 OK

Monitor detail.

  • idintegerMonitor id.
  • namestringName.
  • typeenumCheck type. One of http, keyword, tcp, heartbeat.
  • type_labelstringLocalized (HTTPS, Keyword, Port, Heartbeat).
  • targetstringURL without scheme, host:port, or “every 5 minutes” for heartbeats (localized).
  • statusenumCurrent state. One of pending, up, slow, down, paused.
  • status_labelstringLocalized.
  • status_changed_atstring|nullISO 8601.
  • uptime_90dnumber|nullAverage of daily uptime percentages over checked days.
  • response_msinteger|nullLast response time.
  • slow_after_msinteger|nullSlow threshold.
  • interval_secondsintegerCheck interval.
  • last_checked_atstring|nullISO 8601.
  • last_errorstring|nullLast failure summary.
  • tagsarray<string>Lower-case tags.
  • component{id, name, group_id}|nullStatus page component it drives.
  • barsarray90 entries, oldest first: {day: YYYY-MM-DD, uptime: percent 0–100 with 3 decimals or null if not checked that day, incident_minutes: integer}.
  • paused_atstring|nullISO 8601.
  • consecutive_failuresintegerFailures in a row.
  • last_status_codeinteger|nullLast HTTP status.
  • last_heartbeat_atstring|nullHeartbeats only.
  • created_atstringISO 8601.
  • ssl{expires_at, days_left, issuer}|nullTLS certificate seen on the last check.
  • statsobjectincidents_90d, downtime_minutes_90d, response_median_ms and response_p95_ms (last 24 hours).
  • configobjecturl, host, port, method, expected_statuses (default ["2xx","3xx"]), keyword, keyword_absent, request_headers [{name, value}], request_body, body_is_json, auth_type, auth_username, has_secret, secret_hint (last 4 characters, editors only), follow_redirects, verify_ssl, ssl_reminders, timeout_seconds, failure_threshold, alert_email, incident_mode, meta [{key, value}], show_response_time, heartbeat_path. The secret itself is never returned.
  • component_detail{id, name, group, group_id}|nullIts status page component.
  • recent_checks[]objectLast 20 checks: id, checked_at, ok, slow, in_maintenance, status_code, response_ms, error.
  • incidents[]IncidentLast 10 incidents on this monitor or its component (without updates).
  • maintenance[]MaintenanceUp to 5 open windows on its component.

Rate limits

This endpoint counts toward your general limit of 120 requests a minute. When you go over, wait for the number of seconds in Retry-After.

Errors

401The token is missing, wrong, revoked or expired.
403The token is read-only (message: “This token is read-only. Create a read and write token to make changes.”). Or: The token’s owner is a viewer (“Viewers can read everything but can’t change it.”), or the workspace’s editing is paused (a billing message, e.g. “Your trial has ended, so editing is paused. …”).
404The token belongs to another workspace, or its owner is no longer a member.
422Messages from lang/en/status.php monitor_rules, e.g. “Enter the address to check, like https://example.com/health.”, “Use an address that starts with https:// or http://.”, “Pick one of the listed intervals.”, “The checker sets that header itself. Remove it.”, or a blocked address (private network), or “The body isn’t valid JSON. Fix it, or turn off “Send as JSON”.”

Every error is JSON with a message. See Errors.

Next →Pause a monitor
curl -X PATCH "https://api.bynh.io/api/v1/workspaces/dokan/status/monitors/1" \
  -H "Authorization: Bearer $BYNH_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "interval_seconds": 300,
    "tags": [
      "payments",
      "critical"
    ]
  }'

Response200 OK

application/json
{
  "data": {
    "id": 4,
    "name": "Checkout API",
    "type": "http",
    "type_label": "HTTPS",
    "target": "api.dokan.sa/health",
    "status": "up",
    "status_label": "Up",
    "status_changed_at": "2026-09-28T02:14:00+00:00",
    "uptime_90d": 99.982,
    "response_ms": 182,
    "slow_after_ms": 1500,
    "interval_seconds": 300,
    "last_checked_at": "2026-10-01T07:59:01+00:00",
    "last_error": null,
    "tags": [
      "payments"
    ],
    "component": {
      "id": 2,
      "name": "Checkout",
      "group_id": 1
    },
    "bars": [
      {
        "day": "2026-07-04",
        "uptime": 100,
        "incident_minutes": 0
      },
      {
        "day": "2026-10-01",
        "uptime": 99.931,
        "incident_minutes": 1
      }
    ],
    "paused_at": null,
    "consecutive_failures": 0,
    "last_status_code": 200,
    "last_heartbeat_at": null,
    "created_at": "2026-02-11T09:30:00+00:00",
    "ssl": {
      "expires_at": "2026-12-20T23:59:59+00:00",
      "days_left": 80,
      "issuer": "Amazon RSA 2048 M02"
    },
    "stats": {
      "incidents_90d": 1,
      "downtime_minutes_90d": 6,
      "response_median_ms": 176,
      "response_p95_ms": 342
    },
    "config": {
      "url": "https://api.dokan.sa/health",
      "host": null,
      "port": null,
      "method": "GET",
      "expected_statuses": [
        "2xx"
      ],
      "keyword": null,
      "keyword_absent": false,
      "request_headers": [],
      "request_body": null,
      "body_is_json": false,
      "auth_type": "none",
      "auth_username": null,
      "has_secret": false,
      "secret_hint": null,
      "follow_redirects": true,
      "verify_ssl": true,
      "ssl_reminders": true,
      "timeout_seconds": 10,
      "failure_threshold": 2,
      "alert_email": true,
      "incident_mode": "draft",
      "meta": [],
      "show_response_time": true,
      "heartbeat_path": null
    },
    "component_detail": {
      "id": 2,
      "name": "Checkout",
      "group": "Storefront",
      "group_id": 1
    },
    "recent_checks": [
      {
        "id": 889120,
        "checked_at": "2026-10-01T07:59:01+00:00",
        "ok": true,
        "slow": false,
        "in_maintenance": false,
        "status_code": 200,
        "response_ms": 182,
        "error": null
      }
    ],
    "incidents": [],
    "maintenance": []
  }
}

Examples use Dokan, a sample workspace. Responses are shortened where lists are long.