Domains

Set the uptime check's HTTP options

Turn the 5-minute uptime probe into an HTTP or API check: a path on the website, the method, request headers (a bearer token, an API key), the status codes that count as up, text the body must contain, and a response-time limit. Without options the probe requests the root over GET, with 2xx and 3xx up, 4xx a warning and 5xx down. A failing probe — the wrong status, missing text, or a response over the limit — is confirmed by a second probe before any rule fires; a response over the limit fires the http_slow trigger rather than http_down. Replaces any previous options and probes immediately.

put/v1/domains/{id}/http

Request

  • Base URL: https://api.upcheck.so
  • URL: https://api.upcheck.so/v1/domains/{id}/http
  • Auth: HTTP bearer

Path parameters

idstring required
Example:9b1d...

Opaque identifier.

Request body

pathstring

The page to request on the website's hostname. Defaults to /.

method'GET' | 'HEAD' | 'POST'

How the uptime probe requests the page. HEAD skips the body, so it cannot be combined with bodyContains.

headersobject

Request headers sent on every probe, for an API that needs a token or a tenant. Stored as given and shown to members of the organization, so prefer a key scoped to health checks.

expectedStatusesinteger[]

Status codes that count as up. Empty keeps the default rule: 2xx and 3xx are up, 4xx warns, 5xx is down.

bodyContainsstring

Text the response body must contain, checked against the first 2 MB. Empty leaves the body unread.

maxResponseMsinteger

A response slower than this many milliseconds fails the probe, and a rule with the http_slow trigger hears about it. 0 sets no limit.

Example request

{
  "path": "/checkout",
  "headers": {
    "Authorization": "Bearer hc_...",
    "Accept": "application/json"
  },
  "expectedStatuses": [
    200
  ],
  "bodyContains": "\"status\":\"ok\"",
  "maxResponseMs": 2000
}

Response

The uptime monitor after the first probe.

idstring required

Opaque identifier.

organizationIdstring required

Opaque identifier.

domainIdstring required

Opaque identifier.

subject'http' | 'certificate' | 'dns' | 'registration' | 'keyword' | 'content' | 'port' required

Which check a monitor, rule or history row is about.

enabledboolean required

Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config.

intervalMsnumber required
nextChecknumber required

Unix ms.

lastCheckednumber required
status'checking' | 'ok' | 'warn' | 'crit' | 'unknown' required
summarystring required
detailunknown required
lastErrorstring nullable required
consecutiveFailuresnumber required
failingSincenumber nullable required

Example response

{
  "id": "9b1d...",
  "organizationId": "9b1d...",
  "domainId": "9b1d..."
}

Changes

No recorded changes to this operation across all 1 revision of this API.