# Check results

The `result` field on [Check](/docs/api/resources/#check) resources is tool-specific. Read the full result from `GET /checks/{uuid}` or site detail. The site-list endpoint returns only [compact summaries](/docs/api/resources/#compact-check-summaries). Examples below abbreviate optional metadata.

## Status check

HTTP reachability check (`type: "status"`).

| Field | Type | Description |
|-------|------|-------------|
| `up` | boolean | `true` when HTTP status is 2xx or 3xx |
| `code` | integer | Status code; `0` on connection failure |
| `url` | string | Requested URL |
| `effective_url` | string | Final URL after redirects |
| `response_time` | float | Total time in milliseconds |
| `redirected` | boolean | Whether redirects occurred |
| `redirect_count` | integer | Number of redirects |
| `redirects` | string[] | Redirect chain; present only when redirects occurred |
| `error` | string | Connection or validation failure message. Present only when the request could not complete (`code` is `0`) - an HTTP error status such as 500 is a completed request and has no `error`. |

### Example (up)

```json
{
  "up": true,
  "code": 200,
  "url": "https://example.com",
  "effective_url": "https://example.com",
  "response_time": 142.37,
  "redirected": false,
  "redirect_count": 0
}
```

<span id="example-down-http-error-status"></span>

### Example (down - HTTP error status)

A 5xx response still completes, so there is no `error` field - only `up: false` and the status `code`.

```json
{
  "up": false,
  "code": 500,
  "url": "https://example.com",
  "effective_url": "https://example.com",
  "response_time": 523.12,
  "redirected": false,
  "redirect_count": 0
}
```

<span id="example-down-connection-failure"></span>

### Example (down - connection failure)

When the request cannot complete, `code` is `0` and `error` describes the failure.

```json
{
  "up": false,
  "code": 0,
  "url": "https://example.com",
  "effective_url": "https://example.com",
  "response_time": 2003.41,
  "redirected": false,
  "redirect_count": 0,
  "error": "cURL error 28: Operation timed out after 5000 milliseconds"
}
```

## SSL check

TLS certificate inspection on port 443 (`type: "ssl"`).

| Field | Type | Description |
|-------|------|-------------|
| `domain` | string | Domain checked |
| `ip` | string | Resolved IP address |
| `is_valid` | boolean | `true` only when the certificate is current, matches the hostname, and chains to a trusted root |
| `failure_type` | string \| null | Why validation failed: `expired`, `hostname_mismatch`, `untrusted_chain`, `no_certificate`, or `connection_failed`; `null` when valid |
| `failure_message` | string \| null | Human-readable failure reason; `null` when valid |
| `issuer` | string | Issuing CA organization |
| `issued_to` | string | Certificate common name (CN) |
| `valid_from` | string \| null | Start datetime; `null` when no certificate was read |
| `valid_to` | string \| null | Expiry datetime; `null` when no certificate was read |
| `days_left` | integer | Days until expiry (`0` when no certificate) |
| `subject` | string | Subject CN |
| `serial_number` | string | Certificate serial number |
| `fingerprint` | string | Certificate hash |
| `verified` | boolean | Whether certificate-chain verification succeeded |
| `info` | object \| null | Additional certificate metadata (`null` when no certificate) |

> **Note** — `valid_from` and `valid_to` are certificate datetimes in `YYYY-MM-DD HH:MM:SS` form (no timezone offset), unlike the ISO 8601 timestamps on resource objects.

### Example (valid)

```json
{
  "domain": "example.com",
  "ip": "93.184.216.34",
  "is_valid": true,
  "failure_type": null,
  "failure_message": null,
  "issuer": "Let's Encrypt",
  "issued_to": "example.com",
  "valid_from": "2026-04-01 00:00:00",
  "valid_to": "2026-07-01 00:00:00",
  "days_left": 35,
  "subject": "example.com",
  "serial_number": "03A1B2C3D4E5F6...",
  "fingerprint": "a1b2c3d4",
  "verified": true,
  "info": {}
}
```

### Example (expired)

```json
{
  "domain": "example.com",
  "ip": "93.184.216.34",
  "is_valid": false,
  "failure_type": "expired",
  "failure_message": "The SSL certificate has expired.",
  "issuer": "Let's Encrypt",
  "issued_to": "example.com",
  "valid_from": "2025-12-08 00:00:00",
  "valid_to": "2026-03-08 00:00:00",
  "days_left": -81,
  "subject": "example.com",
  "serial_number": "03A1B2C3D4E5F6...",
  "fingerprint": "a1b2c3d4",
  "verified": true,
  "info": {}
}
```

## DNS check

DNS lookup results (`type: "dns"`).

| Field | Type | Description |
|-------|------|-------------|
| `records` | object | Keys: record types (`A`, `AAAA`, `MX`, ...) with record arrays |
| `resolver_observations` | object | Per-resolver lookup results used to detect inconsistencies between DNS resolvers |
| `is_cloudflare` | boolean | Whether the monitored domain appears to use Cloudflare DNS or proxying |
| `ip_enrichment` | object | Public IP enrichment keyed by IP address |
| `hosting_provider` | object \| null | Detected hosting provider from enriched IP data |
| `reputation` | object | Domain and IP reputation details |

> **Note** — Record shapes vary by type. Each entry includes `host`, `ttl`, `type`, and type-specific fields such as `ip` for A/AAAA.

### Example

```json
{
  "records": {
    "A": [
      {
        "host": "example.com",
        "ttl": 300,
        "type": "A",
        "ip": "203.0.113.10"
      }
    ],
    "MX": [
      {
        "host": "example.com",
        "ttl": 3600,
        "type": "MX",
        "priority": 10,
        "target": "mail.example.com"
      }
    ]
  },
  "is_cloudflare": false
}
```

## Broken links check

Site crawl for failing links (`type: "broken-links"`).

| Field | Type | Description |
|-------|------|-------------|
| `found` | integer | Count of broken links |
| `crawled` | integer | Pages crawled |
| `urls` | array | Broken URL details |
| `crawl` | object | Crawl metadata (finish reason, limits, duration, JS rendering) |

### URL object

Each item in the `urls` array includes:

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | The broken link URL |
| `source` | string | Page where the link was found |
| `status` | integer | HTTP status code returned for the link |

> **Note** — Only links whose status is **not** `200`, `301`, `302`, or `303` are counted as broken.

<span id="example-2"></span>

### Broken-link example

```json
{
  "found": 2,
  "crawled": 12,
  "urls": [
    {
      "url": "https://example.com/missing-page",
      "status": 404,
      "source": "https://example.com/blog"
    },
    {
      "url": "https://example.com/broken-image.jpg",
      "status": 404,
      "source": "https://example.com/about"
    }
  ]
}
```

The displayed result describes the crawl. Incident evaluation applies your broken-link thresholds and filters. A crawl can stop at its time or URL limit; inspect `crawl` metadata before assuming it covered every page.

## Performance check

Lighthouse-based performance audit (`type: "performance"`).

Sitepulse uses Lighthouse lab tests in a headless browser to measure page loading and identify performance problems. Google PageSpeed Insights can also supply real-user metrics from the Chrome User Experience Report (CrUX), where enough eligible traffic data is available for the page or origin.

| Field | Type | Description |
|-------|------|-------------|
| `response_time` | float | Direct GET response time (ms) |
| `url` | string | Audited URL |
| `speed_metrics` | object | Lighthouse output |

### Speed metrics object

| Field | Type | Description |
|-------|------|-------------|
| `performance_score` | integer \| null | 0–100 score |
| `core_web_vitals` | object | Lighthouse lab metric entries such as LCP, CLS, FCP, Speed Index, TTI, and TBT; individual entries can be `null` |
| `real_user_metrics` | object or empty array | CrUX field measurements for the page, supplied only by Google PageSpeed Insights when available |
| `origin_metrics` | object or empty array | CrUX field measurements for the origin, supplied only by Google PageSpeed Insights when available |
| `opportunities` | array | Failed audits with savings hints |

Metric entries include `value`, `display_value`, `score`, `title`, and `description`, which can be `null`. Time measurements such as LCP, FCP, TTI, and Speed Index use milliseconds; CLS is unitless. An unavailable metric is not a zero value. Field measurements can be absent when there is insufficient data.

<span id="example-3"></span>

### Performance example

```json
{
  "response_time": 420.5,
  "url": "https://example.com",
  "speed_metrics": {
    "performance_score": 87,
    "core_web_vitals": {
      "lcp": {
        "value": 2400,
        "display_value": "2.4 s",
        "score": 0.92
      },
      "cls": {
        "value": 0.05,
        "display_value": "0.05",
        "score": 0.95
      }
    },
    "opportunities": [
      {
        "title": "Eliminate render-blocking resources",
        "description": "Reduce resources that delay the initial render.",
        "score": 0,
        "display_value": "450 ms",
        "estimated_savings": { "bytes": null, "ms": 450 }
      }
    ]
  }
}
```

## Errors

When `status` is `failed`, the check may include an `error` field which can be:

- A simple error string
- A structured object with `message`, `code`, and `data` keys

Use `error` together with `result` to diagnose failures.

<span id="example-4"></span>

### Failed check example

```json
{
  "uuid": "...",
  "type": "ssl",
  "status": "failed",
  "result": null,
  "error": {
    "message": "Error fetching site SSL details",
    "code": 0,
    "data": "Connection timed out after 10 seconds"
  },
  "completed_at": "2026-05-28T14:30:00+00:00"
}
```

## Polling check runs

### Queue checks

`POST /sites/{site}/checks` returns `202` with check records in `pending` status.

### Poll for completion

Poll `GET /checks/{uuid}` while `data.status` is `pending`, leaving time between requests and respecting the [rate limit](/docs/api/requests-responses/#rate-limits). `completed`, `failed`, and `skipped` are terminal.

### Read results

Read `data.result` when completed, and `data.error` for a failed execution. A completed check can still report an unhealthy site, such as an HTTP `500` response.

A `202` response accepts the request; it does not guarantee completion. Use the returned status, not an assumed duration, to decide when to read the result.

## Check status values

| Status | Description |
|--------|-------------|
| `pending` | Queued or currently running |
| `completed` | Execution completed; inspect the result for site health |
| `failed` | Finished with error |
| `skipped` | Not run due to configuration |

## See also

- [Endpoints - Checks](/docs/api/endpoints/#checks)
- [Using check tools](/docs/guide/checks/)
