HTTP monitor
Monitor websites and APIs with status code, content, and response time checks.
The HTTP monitor is the most common monitor type. It sends a periodic HTTP request to a URL and verifies the status code and, optionally, the response content, and measures the response time. It is the default choice for websites, REST APIs, GraphQL endpoints, and health-check routes.
When to use
- Public website: Is
https://example.comup and returning 200? - REST API: Does
/api/v1/healthreturn{"status":"ok"}? - Third-party integration: Is your webhook proxy correctly forwarding upstream requests?
- Login page: Returns 200 and still contains "Sign in"?
- CDN edge: Are your edge nodes serving the cached content you expect?
Supported request methods
| Method | When it is used |
|---|---|
GET | Default. If you fill in a request body while GET is selected, the check is sent as POST |
POST, PUT, PATCH, DELETE, OPTIONS | The method you choose is sent, with the request body if there is one |
HEAD | Only the headers are requested; no request body is sent |
Every check sends a User-Agent: UptimeWarden/1.0.0 header. You add extra headers in the monitor's detail page under Configure → Request → HTTP options → Custom headers. The method you choose in the HTTP method list on the same page is the one sent. No Content-Type is added for a body; if you need one, enter it as a custom header. If you set a Host custom header, the request is sent with that Host value while the connection still goes to the address in the URL. Use it to test a specific virtual host on an IP address or behind a load balancer.
Creating a monitor
-
On the Monitors page choose Add monitor → type: Website & API (HTTP)
-
Core fields:
- Display name: e.g.
Production API - Health - URL:
https://api.example.com/health - Check interval: The fastest interval depends on your plan; see the pricing page for current values
- Display name: e.g.
-
Open the Alert settings section:
- Timeout (sec): maximum time to wait for a response (default 30s, min 5s, max 300s)
- Expected HTTP status codes: comma-separated list. Each entry is a single code (
204), a range (200-299) or a class (2xx), for example200,201,204or2xx,304. The form pre-fills200. If you leave the field empty, any 2xx is accepted.
-
Save with Start monitoring.
Custom headers, the request body and content validation are not on the create form. You set them in the monitor's detail page under Configure → Request → HTTP options:
- Custom headers (optional): API keys, accepted MIME type, etc.
Authorization: Bearer eyJhbGc... X-API-Version: 2024-01 Accept: application/json - Request body (optional): when filled in, the request is automatically sent as POST. You can write JSON, form-data, or plain text.
Status code validation
Any response that matches your expected list is up. Anything outside the list (500, 503, 404, network errors, timeouts) is down.
Each entry in the list can be one of:
| Entry | Accepts | Example |
|---|---|---|
| Single code | That code only | 204 |
| Range | Every code between the two ends, both included | 200-299 |
| Class | The whole hundred group (1xx to 5xx) | 2xx |
Separate entries with commas, for example 200,204,301-308. When the list has at least one valid entry, the list is authoritative on its own: if you write only 200, a 204 response is down. If the list is empty, or none of its entries is valid, any 2xx is accepted. Numbers outside 100-599 and spellings that are not recognised are ignored.
Common patterns:
- API health:
200, or2xxif the endpoint may also return204 - Any successful response will do:
2xx - Checking that an
httpaddress redirects tohttps:301or3xx(see Redirect handling below) - CDN cache validators:
200,304
Content validation
Status codes are not always enough, a server can return 200 along with an HTML error page. UptimeWarden supports four ways to validate the response body. The setting is under Configure → Request → HTTP options → Content validation:
| Type | Use case | Example |
|---|---|---|
| Text | Body must contain this text (substring) | "status":"ok" |
| Regex | Regex pattern match | ^(OK|HEALTHY)$ |
| JSON | Body must be valid JSON. If Expected content is a JSON object or array, the body must contain those values | {"status":"ok"} |
| XML | Body must look like XML and, optionally, contain a given text | <status>ok</status> |
Content validation runs only on responses that come back with an expected status code. If the status code is not in the list, the check goes down without looking at the body.
The Case sensitive toggle applies to text, XML and regex validation. It also applies to the JSON type when Expected content is plain text. Matching a JSON object or array is always case-sensitive.
JSON type. The body must first be valid JSON. If Expected content is empty, nothing else is checked. If it is filled in and is a JSON object or array, the body must contain it: every key you wrote in an object must be present in the body with a matching value, and every element you wrote in an array must match some element of the body's array. Whitespace, key order and extra fields in the body do not matter. So with {"status":"ok"} expected, {"status":"ok","version":"1.4.2"} is up and {"status":"degraded"} is down. If Expected content is not a JSON object or array (a plain word, say), it is searched for as a substring of the body, like the text type, except that whitespace outside quoted strings does not matter: "status": "ok" matches both {"status":"ok"} and {"status" : "ok"}. Spaces inside a quoted string still have to match. A simple JSON schema (type, required, properties) can be set only through the API, in the contentValidation.schema field; the UI has no field for it.
XML type. The body must start with < (leading whitespace does not count) and contain a >. UptimeWarden does not parse the XML end to end. If Expected content is filled in, it is searched for as a substring of the body.
A rule saved without a type is treated as a text rule. If you send a type the engine does not know through the API (anything other than text, regex, json or xml), the check goes down with an "unsupported content validation type" error. The check does not pass a rule it cannot apply.
A regex is matched against the first 1 MB of the response body and must finish within 1 second (the hint in the UI says 5 s; 1 s is what applies); a pattern that takes longer fails the check with "Regex execution error". Patterns with heavy nested repetition, such as (a+)+, are the usual cause.
Example. JSON API health check:
GET /api/health → 200
{"status": "ok", "version": "1.4.2"}
To catch a {"status":"degraded"} response, use the JSON type and expect {"status":"ok"}. When asserting that a phrase is absent with a regex, mind line breaks: . does not cross a newline, so a pattern like ^(?!.*Database error).* only inspects the first line of a multi-line body.
Authentication
Custom header (recommended)
The Custom headers section is how you attach authentication headers to the monitored request. Headers you define here are sent on every check, for example Authorization: Bearer <token> (JWTs or API keys), X-API-Key, or signed headers.
Basic Auth / Bearer Token fields
The Basic auth (username/password) and Bearer token fields under Authentication are not currently applied as an Authorization header on the monitored request, despite the UI text "Token will be sent as Authorization: Bearer". To check an endpoint behind authentication, enter the credential as an Authorization header in the Custom headers section above.
Redirect handling
UptimeWarden follows redirects automatically, up to a maximum of 10 hops. If you turn Follow redirects off, redirects are not followed and the 3xx response itself is compared against your expected list. A chain longer than 10 hops fails the check with "too many redirects". The status code of the final destination is compared against your expected list.
The one exception is asserting on the redirect itself. If your expected list contains a 3xx code and no 2xx code (for example 301 or 3xx), UptimeWarden does not follow the redirect and evaluates the redirect response. If you add a 2xx code as well (200,301), redirects are followed and the final page is judged, so a redirect that leads to a dead page does not read as up.
SSL verification
For HTTPS URLs, certificates are validated strictly by default (invalid, expired, or self-signed certs cause a down state). Lab environments can turn the Strict SSL verification switch under Configure → Security & location off, but never disable it in production.
Note: The HTTP monitor's own check only confirms the certificate is valid right now. However, for every active HTTP monitor with an
https://URL a separate background job also reads the certificate's remaining lifetime and opens a warning as expiry approaches; see SSL Monitor for the details.
Response time and body reading
The response time is the time from sending the request to receiving the response headers (time to first byte). DNS resolution, connection setup, the TLS handshake and redirect hops are included. Downloading the body is not. A large response that downloads slowly does not raise the response time if the server sent its headers quickly.
Body reading is capped too:
- Without content validation: the status code and headers have already decided the check. At most the first 1 MiB of the body is read and discarded, then the connection is closed, so a large file is not downloaded in full on every check. The body of a
text/event-streamresponse is not read at all. - With content validation: validation runs on at most the first 10 MiB of the body.
Response time threshold
The Response time threshold (ms) setting under Configure → Reliability gives you a third state:
- Response at or under the threshold → up
- Response above the threshold → recorded as a slow check (
high_response) - Timeout → down
A high response time alert fires only after N slow checks in a row, where N is the same number of consecutive checks that confirms a recovery (default 3). A single slow spike stays in your results and charts but does not notify anyone. If the slowness goes on, the alert goes out on the Nth slow check, at most N−1 check intervals after the first one, and the incident starts at the first slow check.
This surfaces creeping latency before it becomes an outage.
Creating a monitor via API
curl -X POST https://app.uptimewarden.online/api/v1/monitors \
-H "Authorization: Bearer $UW_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API",
"url": "https://api.example.com/health",
"type": "http",
"interval": 60,
"timeout": 30
}'
The response is 201 Created and includes the new monitor's ID. name, url and type are required. The v1 create endpoint accepts every field the dashboard uses (expected status codes, custom headers, content validation, tags, and so on); a field it does not recognise returns 400. If you omit expectedStatusCodes, the field stays empty and any 2xx is accepted; to accept only 200, send "expectedStatusCodes": "200".
Plan limits and interval
The shortest check interval you can pick depends on your plan, and the form locks faster intervals behind an "upgrade" prompt. See the pricing page for current plan limits; your account's exact values appear on the billing pages.
FAQ
Q: My page returns 200 but says "Database error" in the body, the monitor still shows up. A: Add a content validation rule that asserts your healthy banner is present (text type). Asserting that a phrase is absent with a regex is not reliable on multi-line bodies.
Q: I want to monitor an endpoint behind a login.
A: Add the credential as an Authorization header in the Custom headers section (it is sent on every check). UptimeWarden sends a single request, for multi-step flows, a Heartbeat monitor combined with an external script is cleaner.
Q: I do not want my POST checks to write a row in my database every minute.
A: Use a dry-run or ?ping mode in your API, or hit an idempotent endpoint. Health endpoints should always be free of side effects.
Related topics
- SSL Monitor: certificate expiry tracking
- Monitor Settings: every form field explained
- Multi-Location Consensus
- Notification Channels