Communication

Embedding status

Embed your status page's live state as an SVG badge, or build your own view on the public JSON API.

In the app: Status Pages › status page › Badge

You want the answer to "is it up?" right where customers already are: your README, your homepage, your docs. There are two ways to do that:

  • The status badge: a small SVG image you embed with one <img> tag or one line of Markdown. No script, nothing to build.
  • The public status API: a read-only JSON snapshot of the page, for when you want to draw your own view.

The status badge

Every public status page has a badge at:

GET /api/public/status/:slug/badge.svg

For a page with the slug acme-status:

https://app.uptimewarden.online/api/public/status/acme-status/badge.svg

The quickest way to get the snippets is the Badge section when you edit a published status page: it shows a live preview and copies the Markdown, the HTML or the raw URL for you.

Snippets

Markdown (GitHub, GitLab, most docs tools):

[![Acme status](https://app.uptimewarden.online/api/public/status/acme-status/badge.svg)](https://app.uptimewarden.online/public-status/acme-status)

HTML:

<a href="https://app.uptimewarden.online/public-status/acme-status">
  <img src="https://app.uptimewarden.online/api/public/status/acme-status/badge.svg" alt="Acme status">
</a>

If your page is on a verified custom domain, link to that domain instead (https://status.acme.com). The badge URL itself works on either host.

Parameters

ParameterValuesDefaultWhat it does
metricstatus, uptimestatusWhat the right-hand side shows.
labelany text, up to 30 charactersstatus or uptimeThe left-hand text. Control characters are dropped and spaces collapsed.
styleflat, flat-squareflatRounded or square corners.

An unknown metric or style answers 400.

Examples:

/api/public/status/acme-status/badge.svg?metric=uptime
/api/public/status/acme-status/badge.svg?label=api&style=flat-square

What metric=status shows

The badge reads the same data and the same rules as the public page:

ValueColourWhen
OperationalgreenEvery component is up and nothing is open.
DegradedamberA component is slow or has a certificate warning; up to a quarter of components are down; or an incident is open (a minor notice, or any incident opened by a monitor).
Partial outageredMore than a quarter of components are down, or a major incident is open.
Major outageredMore than half of the components are down, or a critical incident is open.
MaintenanceamberA component is inside a maintenance window, or a maintenance notice is open, and nothing above applies.
UnknowngreyA component has not been checked yet and nothing above applies.

A component inside its maintenance window does not count as down: planned work is not an outage. When several of these apply, the worst one wins.

What metric=uptime shows

The uptime of all the page's monitors over the last 30 days, the same figure as GET /api/status/:id/system?days=30. It follows the product's display rule: 100% only when it really is 100; anything below is cut (never rounded) to two decimals, with trailing zeros dropped. So 99.996 shows as 99.99% and 99.70 as 99.7%.

Green from 99% up, amber from 95%, red below that. The badge says no data when there were no checks in the window, and n/a when you turned off Show uptime on the page: the badge never publishes what the page itself hides.

Caching and limits

  • A badge is cached for 60 seconds (Cache-Control: public, max-age=60, s-maxage=60) and carries an ETag. A change on your page reaches the badge within about a minute. Image proxies such as GitHub's may keep it a little longer.
  • Requests are served from the same cache as the public page, so embedding a badge on a busy site does not load your monitors.
  • Each client IP can fetch up to 600 badges per minute.

Visibility

The badge follows the page's own visibility. For a draft page, a password-protected page, or a slug that does not exist, the endpoint answers 404 with a grey unknown badge. The three cases look exactly alike, so the badge reveals nothing about a page you have not published.

A password-protected page has no working badge: an <img> cannot send the page password, and putting the password in a URL would publish it in every README that embeds it. Remove the password if you want a badge.

Security

The response is image/svg+xml with X-Content-Type-Options: nosniff and Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'. The badge contains no script and loads nothing else. Your label is escaped before it is drawn.

The public status API

Every public status page exposes a JSON snapshot at:

GET /api/public/status/:slug

Where :slug is the slug you set when creating the page. No authentication is required for public pages. The same payload powers our in-product status page UI.

Example:

curl https://app.uptimewarden.online/api/public/status/acme-status | jq

Response shape (abbreviated):

{
  "page": {
    "slug": "acme-status",
    "domain": "status.acme.com",
    "title": "Acme Status",
    "description": "Live status for the Acme platform",
    "logoUrl": "https://...",
    "theme": { "primaryColor": "#3b82f6", "darkMode": false },
    "allowSubscriptions": true,
    "showHistory": true,
    "historyDays": 30
  },
  "monitors": [
    {
      "monitor": {
        "name": "API Gateway",
        "type": "http",
        "status": "up",
        "responseTime": 142,
        "uptime": 100,
        "lastCheckedAt": "2026-04-27T08:30:00.000Z"
      }
    }
  ],
  "incidents": [
    {
      "title": "Elevated latency on API",
      "severity": "minor",
      "status": "monitoring",
      "startedAt": "2026-04-27T07:15:00.000Z",
      "updates": [
        { "message": "Investigating root cause", "status": "investigating", "createdAt": "2026-04-27T07:15:00.000Z" }
      ]
    }
  ],
  "passwordProtected": false
}

The endpoint is cached for a few seconds, so polling it does not overload our servers.

Password-protected pages

If the page is password-protected, the endpoint returns 401 until you supply the password via the x-status-page-password header:

GET /api/public/status/:slug
x-status-page-password: <shared-password>

Custom domains

When the page is mapped to a verified custom domain, you can hit the domain resolver instead, useful when you don't want to hardcode the slug:

GET /api/public/status/by-domain/current?domain=status.acme.com

The resolver returns the same payload, but only after the domain has reached the verified state.

Building your own view

If the badge does not fit your design, fetch the JSON on the server and draw your own view. The public status API is not set up to be called from another site's browser (it sends no CORS headers), so a browser fetch from your page is blocked. A server-side example:

status.ts
type Status = 'operational' | 'degraded' | 'outage' | 'unknown'

function deriveOverallStatus(monitors: Array<{ monitor: { status: string } }>): Status {
  if (!monitors.length) return 'unknown'
  const states = monitors.map((m) => m.monitor.status)
  if (states.every((s) => s === 'up')) return 'operational'
  if (states.every((s) => s === 'down')) return 'outage'
  return 'degraded'
}

export async function loadStatus(slug: string): Promise<Status> {
  const res = await fetch(`https://app.uptimewarden.online/api/public/status/${slug}`)
  if (!res.ok) return 'unknown'
  const data = await res.json()
  return deriveOverallStatus(data.monitors || [])
}

Render the result into your own page on the server, or hand it to the client from your own API. This example uses a simpler rule than the SVG badge (it ignores maintenance windows and open incidents); if you want the page's exact state, use the badge.

Per-monitor status trend

If you want to render a sparkline or last-N-days dots like the in-product page, fetch per-monitor history:

GET /api/public/status/:slug/monitors/:monitorPublicId/status-trend?days=30

The response is the same trend data the dashboard uses, cached server-side for only a few seconds.

Security and CORS

  • The public status API and the badge are read-only. There's no POST equivalent that mutates state.
  • The badge can be embedded from any site with an <img> tag. The JSON endpoint is not set up to be called from another site's browser (it sends no CORS headers); fetch the JSON from your own server.
  • If the page is set to private, the JSON endpoint returns 403 and the badge 404.
  • For password-protected pages, validation is per-request: the x-status-page-password header is the only way to authenticate (no cookie, no session). The badge does not accept it.

Bu sayfayı Türkçe okuyun