Healthchecks

HTTP / HTTPS Health Checks

Monitor REST APIs, websites, and web services. Configure methods, headers, bodies, expected status codes, and response validation.

Overview

HTTP health checks are the most versatile monitoring type in Uptimy. They allow you to send fully customizable HTTP requests to any endpoint and validate the response against your expected criteria. Whether you're monitoring a simple website, a REST API, or a complex web service, HTTP checks give you complete control over request configuration and response validation.

Supported HTTP Methods

Uptimy supports all standard HTTP methods, enabling you to monitor any type of API endpoint:

  • GET — Retrieve resources and verify response content
  • POST — Test API endpoints that accept data submissions
  • PUT — Validate update endpoints with request bodies
  • DELETE — Monitor deletion endpoints for availability
  • PATCH — Check partial update endpoints
  • HEAD — Lightweight checks that only retrieve headers
  • OPTIONS — Verify CORS configuration and allowed methods

Request Configuration

Enter the Endpoint URL on the form. The method, expected status code, proxy, headers and bodies are under Advanced settings.

Request Headers

Add any number of headers under Request headers. This is essential for APIs that require authentication tokens, content-type specifications, or custom identifiers.

Example Headers
{
  "Authorization": "Bearer your-api-token",
  "Content-Type": "application/json",
  "X-Custom-Header": "monitoring-check"
}

Request Body

For any method other than GET and HEAD, you can send a JSON body in Request Body (JSON). This allows you to test endpoints that expect specific payloads.

Example Request Body
{
  "action": "health_check",
  "timestamp": "2025-01-01T00:00:00Z"
}

Expected Status Code

Define the HTTP status code you expect from a healthy response. By default, Uptimy expects a 200 OK response. You can change this to another status code, such as 201 or 204, depending on your endpoint's behavior. Choose Any to accept every status code and only check the response body.

Redirects are followed, up to 10 of them, and the status code of the final response is the one compared. To check a page that redirects, expect the status of the page it ends on.

Expected Response Body

Go beyond status code validation by checking the actual response body. In Expected Response Body (JSON), provide a JSON object of the fields you expect. Every field in it must be in the JSON response with the same value. Nested objects are matched the same way, so you list only the fields you care about. Values are compared as text, so 200 and "200" match each other. For example, {"status": "ok"} passes when the response's status field equals "ok". This is useful for verifying that your API returns the correct data, not just a successful status code.

Response Body Validation

Use response body validation to catch situations where your server returns a 200 OK but serves an error page or unexpected content. A simple field check like {"status": "ok"} can prevent false positives.

Proxy Support

Route your HTTP checks through a proxy server in Proxy URL (Optional), written as [username:password@]host:port. Uptimy supports three proxy types:

  • HTTP Proxy — Standard HTTP proxy for unencrypted traffic
  • HTTPS Proxy — Encrypted proxy connection for secure requests
  • SOCKS5 Proxy — Versatile proxy protocol supporting any TCP traffic

Response Data

Every HTTP check execution captures detailed response data for analysis and debugging:

FieldDescription
Status CodeThe actual HTTP status code returned by the server
Content LengthSize of the response body in bytes
Content TypeThe MIME type of the response (e.g., application/json)
Response Body SnippetThe first 500 bytes of the response body, kept when the status code isn't the expected one

Performance Breakdown

Uptimy provides a detailed request performance breakdown so you can identify exactly where latency occurs in the request lifecycle:

MetricDescription
DNS LookupTime spent resolving the domain name to an IP address
TCP ConnectionTime to establish the TCP connection with the server
TLS HandshakeTime to complete the SSL/TLS handshake (HTTPS only)
Time to First Byte (TTFB)Time from sending the request to receiving the first response byte
Content TransferTime to download the full response body

Diagnosing Slow Responses

The performance breakdown helps you pinpoint whether slowness is caused by DNS resolution, network latency, server processing time, or large response payloads. Use this data to optimize your infrastructure and improve response times.

Example Configuration

HTTP is healthcheck type 1. This is its config as the API and uptimyctl take it. The interval and timeout aren't part of it: they are set on the check itself, as intervalSeconds and timeoutSeconds.

HTTP check config
{
  "method": "GET",
  "uri": "https://api.example.com/health",
  "headers": {
    "Authorization": "Bearer token123"
  },
  "expectedStatusCode": 200,
  "expectedResponseBody": { "status": "ok" }
}

Timeouts

Set your timeout value to be comfortably above your expected response time. If your API typically responds in 2 seconds, a 5 to 10 second timeout avoids false alerts from occasional slow responses while still catching genuine outages.