Skip to main content
Flashduty Status Pages provide widgets: a snippet you can paste into any website’s HTML to show your live service status on your own site, help center, or internal system. The widget runs as a Web Component (<flashduty-status-widget>) with styles isolated from the host page, so neither side affects the other.
Widgets are only available for public status pages. The Widget settings page is not available for internal status pages.

Two forms

Both forms support theme (Auto / Light / Dark) and language (中文 / English). The badge additionally supports size options, and the banner supports position options.

Generate the embed code in the console

1

Open the Widget settings

Go to your status page detail view and choose Settings → Widget. The page has three tabs: Status Badge, Event Banner, and API.
2

Configure appearance

On each tab, adjust the theme, language, size (badge), or position (banner); the live preview updates as you go. The preview is for visualization only and never modifies the real status page. For the banner, you can also switch among three preview scenarios: Operational / Incident / Scheduled maintenance.
3

Copy the embed code

Click Copy code and paste the snippet into your website’s HTML. The script version in the embed code always matches what your status page deployment actually serves — no manual maintenance needed.

Embed code examples

The script tag carries integrity (SRI) and crossorigin="anonymous" attributes — copy the whole snippet, not just the <flashduty-status-widget> tag. Replace https://status.example.com in the examples with your actual status page URL (the code generated in the console already contains the real URL).

Attribute reference

<flashduty-status-widget> supports the following attributes:

Behavior

Data refresh

  • The widget polls the status endpoint every 30 seconds by default (the interval is delivered by the API’s poll_after_seconds field), with random jitter so large numbers of visitors don’t all request at once
  • Requests carry the If-None-Match (ETag) conditional header; when data hasn’t changed, the server returns 304 without re-sending the body
  • Polling pauses while the page is hidden (background tab) and refreshes immediately when the page becomes visible again
  • Failed requests retry with exponential backoff (starting at 5 seconds, capped at 5 minutes)

Stale data

The API declares a freshness window via max_stale_seconds (120 seconds by default). If data can’t be validated within that window:
  • The badge switches to an “unknown” state and shows when the data was last confirmed
  • The banner does not render without valid data
  • The banner picks what to show by priority: ongoing incident > in-progress maintenance > scheduled maintenance starting within 24 hours; when multiple events exist, the banner shows “N more”
  • Visitors can dismiss the banner with ×. The dismissal is remembered for the current browser session, keyed by “event ID + last updated time” — when the event has new progress (a status change or a new timeline update), the banner reappears
  • Set show-upcoming-maintenance="false" to disable the 24-hour advance display of scheduled maintenance

Status values and colors

Components set to hidden on the status page never appear in widget data — the snapshot only contains incidents and maintenance for components visible to the public.

Public API: summary.json

If you prefer not to use the ready-made Web Component, call the JSON snapshot endpoint built into every public status page and render or integrate the data yourself. The console’s Widget → API tab shows the exact URL.
  • Public access: no authentication, no API key
  • Cross-origin: responses carry Access-Control-Allow-Origin: *, so browsers can call it directly; GET, HEAD, and OPTIONS (preflight) are supported
  • Caching: responses include Cache-Control: public, max-age=30, s-maxage=30, stale-while-revalidate=120, stale-if-error=3600 and an ETag — send If-None-Match and receive 304 when nothing changed
  • Freshness: the X-Status-Validated-At response header records when the snapshot was last successfully validated against the backend; use it to judge whether data is stale
This endpoint is designed for low-frequency polling from browsers. In high-traffic scenarios, proxy the requests through your own server and cache the responses — don’t let large numbers of clients hit this URL directly.

Response fields

The response is a single JSON object whose schema_version is currently fixed at "1.0": Elements of ongoing_incidents: Elements of in_progress_maintenances and scheduled_maintenances:

Example response

Error responses

Widgets are enabled by default — no configuration needed. In self-hosted deployments, an administrator can turn the feature off globally with the deploy.widgetEnabled switch (the API then returns 404).