Badges

Public, edge-cached SVG badges. No auth required.

Uptime badge

GET /widgets/badge/uptime/{monitor_id_or_slug}

html
<img src="https://happyuptime.com/api/v1/widgets/badge/uptime/api-acme" />

Renders:

API uptime: 99.94%

windowstringquerydefault: 30d

24h, 7d, 30d, 90d.

stylestringquerydefault: flat

flat, flat-square, pill, minimal.

labelstringquerydefault: uptime

Custom label text.

colorstringquery

Hex color override. Defaults: green ≥99.9, yellow ≥99, red below.

Status badge

GET /widgets/badge/status/{monitor_id_or_slug}

html
<img src="https://happyuptime.com/api/v1/widgets/badge/status/api-acme" />

Renders API: up (or down/degraded), color-coded.

Response time badge

GET /widgets/badge/response-time/{monitor_id_or_slug}

html
<img src="https://happyuptime.com/api/v1/widgets/badge/response-time/api-acme?percentile=p95" />
percentilestringquerydefault: p50

p50, p95, p99.

windowstringquerydefault: 24h

1h, 24h, 7d.

Renders API: 287ms.

Status page badge

GET /widgets/badge/status-page/{slug}

Aggregate status for an entire status page (worst component wins).

Caching

All badges are cached at the edge for 60 seconds. Add ?ts=<timestamp> to bust cache during testing.

CORS

Access-Control-Allow-Origin: * on all badge endpoints — safe to embed cross-origin.

Ask a question... ⌘I