---
title: "Set the uptime check's HTTP options"
method: PUT
path: "/v1/domains/{id}/http"
tags: ["Domains"]
---

# Set the uptime check's HTTP options

`PUT /v1/domains/{id}/http`

## Request

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

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.

## Path parameters

- `id` string, required

## Request body

- object: How the uptime check requests the website and what counts as up.
  - `path` string: 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`.
  - `headers` object: 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.
  - `expectedStatuses` integer[]: Status codes that count as up. Empty keeps the default rule: 2xx and 3xx are up, 4xx warns, 5xx is down.
  - `bodyContains` string: Text the response body must contain, checked against the first 2 MB. Empty leaves the body unread.
  - `maxResponseMs` integer: 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.

## Response `200`

The uptime monitor after the first probe.

- object: One scheduled check of one subject against one website.
  - `id` string, required: Opaque identifier.
  - `organizationId` string, required: Opaque identifier.
  - `domainId` string, required: Opaque identifier.
  - `subject` 'http' | 'certificate' | 'dns' | 'registration' | 'keyword' | 'content' | 'port', required: Which check a monitor, rule or history row is about.
  - `enabled` boolean, required: Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config.
  - `intervalMs` number, required
  - `nextCheck` number, required: Unix ms.
  - `lastChecked` number, required
  - `status` 'checking' | 'ok' | 'warn' | 'crit' | 'unknown', required
  - `summary` string, required
  - `detail` unknown, required
  - `config` union, required: Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere.
    - KeywordConfig: What a keyword check looks for, and on which page.
      - `type` 'keyword', required
      - `keyword` string, required
      - `mode` 'present' | 'absent', required: What the page is expected to do with the text. `present`: it must contain the text, so the check fails when the text disappears (a login button, a product name). `absent`: it must not contain the text, so the check fails when the text appears ("Database error", "Out of stock").
      - `caseSensitive` boolean, required
      - `path` string, required
    - ContentConfig: Which page, which element, and what kind of change a content check watches.
      - `type` 'content', required
      - `path` string, required
      - `selector` string, required
      - `mode` 'text' | 'number' | 'decrease' | 'increase', required: What the content check compares between probes. `text`: the selected text, so any change alerts. `number`: the first number in the selection, so a change to it alerts. `decrease`: only when that number goes down (a price drop). `increase`: only when it goes up.
    - HttpConfig: How the uptime check requests the website and what counts as up. Absent on a website probed at its root over GET.
      - `type` 'http', required
      - `path` string, required
      - `method` 'GET' | 'HEAD' | 'POST', required: How the uptime probe requests the page. `HEAD` skips the body, so it cannot be combined with `bodyContains`.
      - `headers` object, required
      - `expectedStatuses` number[], required
      - `bodyContains` string, required
      - `maxResponseMs` number, required
    - PortConfig: Which host and TCP ports a port check connects to.
      - `type` 'port', required
      - `host` string, required: Empty means the website's own hostname.
      - `ports` number[], required
  - `lastError` string, nullable, required
  - `consecutiveFailures` number, required
  - `failingSince` number, nullable, required

## Other responses

- `400`: The request body or parameters are invalid. `error` names the first problem.
- `401`: The API key is missing, invalid, or revoked.
- `403`: The key's role does not allow this action.
- `404`: No such resource in this organization.
- `429`: The key's rate limit was exceeded. Honour `Retry-After`.

---

[API](https://skmtc.dev/upcheck/apis/upcheck-api.md) · [All operations](https://skmtc.dev/upcheck/apis/upcheck-api/llms.txt) · [OpenAPI document](https://skmtc.dev/upcheck/apis/upcheck-api/revisions/56f55512eb8a?raw)
