Embed your status
Show the live state of a status page on your own site, in a README or in an email, with one line of code. No API key needed.
Badge
Add the script where you want the badge to appear. Replace my-page with the slug of your status page and the host with your own domain if you self-host.
<script src="https://openuptime.app/embed.js" data-slug="my-page" async></script>
<noscript><a href="https://openuptime.app/status/my-page">System status</a></noscript>The <noscript> line is optional: visitors without JavaScript get a plain link to the status page instead of nothing. Tip: it also works as a standalone link if you do not want the script at all.
It renders a small pill with a coloured dot and the current state, links to the status page and refreshes every minute. The badge lives in a Shadow DOM, so your site's CSS cannot break it.
Banner
The banner sits at the top of the page and only appears while something is degraded or down.
<script src="https://openuptime.app/embed.js" data-slug="my-page" data-mode="banner" async></script>Script options
data-slug: the status page slug (required).data-mode:badge(default) orbanner.data-lang:enorzh-CN. Defaults to the page'slang.data-theme:light,darkor unset to follow the visitor's system.data-target: a CSS selector. The badge is placed inside that element instead of next to the script tag.data-always: set totrueto keep the banner visible when everything is operational.
SVG badge
For a README, an email or anywhere JavaScript does not run, use the image. It is cached for a minute.
<img src="https://openuptime.app/api/public/status/my-page/badge.svg" alt="status">[](https://openuptime.app/status/my-page)Add ?lang=zh for Chinese text.
JSON
Build your own widget from the summary endpoint. It allows cross-origin reads from any site and is cached for 30 seconds.
curl https://openuptime.app/api/public/status/my-page/summary
{
"slug": "my-page",
"title": "My Product",
"overall": "operational", # operational | degraded | outage
"label": "All systems operational",
"url": "https://openuptime.app/status/my-page",
"updatedAt": "2026-10-11T08:00:00.000Z"
}The full board, with every component and incident, is at /api/public/status/my-page. Incident history is at /api/public/status/my-page/incidents and an RSS feed at /api/public/status/my-page/rss.xml.
Feeds and calendar
- RSS:
/api/public/status/my-page/rss.xmllists the latest 50 incidents and maintenance windows. Titles start with[Incident]or[Maintenance], and the status page links to the feed so readers can find it. - Calendar:
/api/public/status/my-page/maintenance.icsis an iCalendar feed of maintenance windows. Subscribe to it from any calendar app. - llms.txt:
/api/public/status/my-page/llms.txtis a short plain-text summary of the page for people and AI agents. See MCP for the read-only tools.
Subscribers
Visitors subscribe by email and confirm from a link (double opt-in). Every email carries an unsubscribe link and the one-click unsubscribe headers mail apps use. When a page has several components, a subscriber can tick the ones they care about; with none ticked they get everything. Someone who lost their confirmation link enters their address again and gets it re-sent; an address that is already confirmed is not mailed again. If you set a reminder in the editor (24 hours by default, 0 to turn off), confirmed subscribers get one email before a maintenance window starts. Maintenance window names are public: they show on the page, in the RSS and calendar feeds and in subscriber emails, so keep them free of anything private.
Uptime bar colors
In the editor, Uptime and notifications sets where a day turns from green to amber and from amber to red. The defaults are 99.9% and 98%. The amber value must be lower than the green one.
The status page editor has an Embed card that generates these snippets for you.
嵌入状态
一行代码,把状态页的实时状态显示到你自己的网站、README 或邮件里。无需 API Key。
徽章
把脚本放在想显示徽章的位置。把 my-page 换成你的状态页 slug;自托管时把域名换成你自己的。
<script src="https://openuptime.app/embed.js" data-slug="my-page" async></script>
<noscript><a href="https://openuptime.app/status/my-page">服务状态</a></noscript><noscript> 那一行是可选的:没有启用 JavaScript 的访客会看到一个指向状态页的普通链接,而不是空白。如果不想用脚本,直接放这个链接也可以。
它会渲染一个带彩色圆点和当前状态的小标签,点击跳转到状态页,每分钟自动刷新。徽章在 Shadow DOM 中渲染,不会被你站点的 CSS 影响。
横幅
横幅显示在页面顶部,只在有服务降级或中断时才出现。
<script src="https://openuptime.app/embed.js" data-slug="my-page" data-mode="banner" async></script>脚本参数
data-slug:状态页 slug(必填)。data-mode:badge(默认)或banner。data-lang:en或zh-CN,默认取页面的lang。data-theme:light、dark,不设置则跟随访客系统。data-target:CSS 选择器。徽章会放进该元素,而不是脚本标签旁边。data-always:设为true时,一切正常也始终显示横幅。
SVG 徽章
README、邮件等无法运行 JavaScript 的地方,请使用图片,缓存 1 分钟。
<img src="https://openuptime.app/api/public/status/my-page/badge.svg" alt="status">[](https://openuptime.app/status/my-page)加上 ?lang=zh 显示中文。
JSON
也可以用摘要接口自己做组件。该接口允许任意站点跨域读取,缓存 30 秒。
curl https://openuptime.app/api/public/status/my-page/summary
{
"slug": "my-page",
"title": "My Product",
"overall": "operational", # operational | degraded | outage
"label": "所有系统运行正常",
"url": "https://openuptime.app/status/my-page",
"updatedAt": "2026-10-11T08:00:00.000Z"
}包含全部组件和事件的完整数据在 /api/public/status/my-page,事件历史在 /api/public/status/my-page/incidents,RSS 在 /api/public/status/my-page/rss.xml。
订阅源与日历
- RSS:
/api/public/status/my-page/rss.xml列出最近 50 条事件和维护窗口,标题以[Incident]或[Maintenance]开头;状态页的 head 中带有该订阅源的链接,阅读器可自动发现。 - 日历:
/api/public/status/my-page/maintenance.ics是维护窗口的 iCalendar 订阅源,可在任何日历应用中订阅。 - llms.txt:
/api/public/status/my-page/llms.txt是供人和 AI 代理阅读的简短纯文本摘要。只读工具见 MCP。
订阅者
访客通过邮箱订阅,并在邮件链接中确认(双重确认)。每封邮件都带退订链接和邮件应用使用的一键退订头。页面有多个组件时,订阅者可以只勾选关心的组件;一个都不勾则接收全部。确认链接丢失的人再次输入邮箱,就会重新收到;已确认的邮箱不会再收到邮件。如果在编辑界面设置了提醒(默认 24 小时,填 0 关闭),已确认的订阅者会在维护窗口开始前收到一封邮件。维护窗口的名称是公开的:会显示在状态页、RSS 和日历订阅源以及订阅者邮件中,请勿在其中写入私密内容。
可用率条颜色
在编辑界面的 可用率与通知 中,可以设置某天从绿色变为琥珀色、再变为红色的阈值,默认分别是 99.9% 和 98%。琥珀色阈值必须低于绿色阈值。
状态页编辑界面的 嵌入 卡片会自动生成这些代码。
Last updated 2026-10-17最后更新:2026-10-17