Incidents.StatusPage
A Better Stack status page: a public or private page that shows your
users the health of your services, with incident history, maintenance and
subscriptions. What it shows is organized in StatusPageSections,
each listing StatusPageResources (monitors, heartbeats, groups, …).
Every prop updates in place except organizationId and teamId, which
replace the page. subdomain defaults to a generated unique name. The
password (with passwordEnabled: true) is never returned by the API:
changes are detected against the previous deploy’s props, and removing it
clears it. Removing other nullable props (customDomain, companyUrl,
logos, customCss, announcement, statusPageGroupId, …) clears them;
ipAllowlist and navigationLinks keep their last value when removed.
The API’s update-only sections (all sections and resources in one
request) is not a prop here: manage them with StatusPageSection and
StatusPageResource, so each one is created, changed and deleted on
its own.
Creating a status page
Section titled “Creating a status page”A public page for a product, with its own domain
const status = yield* BetterStack.Incidents.StatusPage("status", { companyName: "Acme Cloud", companyUrl: "https://acme.example.com", subdomain: "acme-cloud-status", customDomain: "status.acme.example.com", timezone: "UTC", design: "v2", theme: "system", subscribable: true, automaticReports: true,});Showing monitors in sections
Section titled “Showing monitors in sections”A website section and an API section
const website = yield* BetterStack.Incidents.Monitor("website", { url: "https://acme.example.com", monitorType: "status",});const api = yield* BetterStack.Incidents.Monitor("api", { url: "https://api.acme.example.com/health", monitorType: "status",});const page = yield* BetterStack.Incidents.StatusPage("status", { companyName: "Acme Cloud", timezone: "UTC",});const core = yield* BetterStack.Incidents.StatusPageSection("core", { statusPageId: page.id, name: "Core services", position: 0,});yield* BetterStack.Incidents.StatusPageResource("website-item", { statusPageId: page.id, statusPageSectionId: core.id, resourceType: "Monitor", resourceId: website.id, publicName: "Website", widgetType: "history",});yield* BetterStack.Incidents.StatusPageResource("api-item", { statusPageId: page.id, statusPageSectionId: core.id, resourceType: "Monitor", resourceId: api.id, publicName: "Public API", widgetType: "response_times",});A private page
Section titled “A private page”Password-protected, hidden from search engines
yield* BetterStack.Incidents.StatusPage("internal", { companyName: "Acme internal", timezone: "UTC", passwordEnabled: true, password: Redacted.make(process.env.STATUS_PAGE_PASSWORD ?? ""), hideFromSearchEngines: true,});companyName string required
Company name shown on the page.
timezone string required
Time zone the page shows times in, as a Rails time zone name such as Tokyo or an IANA ID such as Europe/Prague. Returned as the Rails name.
announcement string | null
Announcement banner text.
announcementEmbedCss string | null
Your own CSS for the announcement on the embeddable widget.
announcementEmbedLink string | null
Link the announcement points to on the embeddable widget. Defaults to the status page.
announcementEmbedVisible boolean
Whether the embeddable widget shows the announcement.
automaticReports boolean
Whether status page reports are created automatically for new incidents.
companyUrl string | null
Company website URL.
contactUrl string | null
URL visitors can use to get in touch, such as a support page or a mailto: address like mailto:support@example.com.
customCss string | null
Custom CSS added to the page.
customDomain string | null
A host name you own to serve the page from, such as status.example.com. Point its CNAME record to statuspage.betteruptime.com.
customJavascript string | null
Custom JavaScript added to the page.
darkLogoRemoteUrl string | null
The URL the dark mode logo was fetched from. Send null to remove the logo. When you send this and dark_logo_url, dark_logo_url is used.
darkLogoUploadId string
The logo shown in dark mode, as the ID of a file upload. Send it instead of dark_logo_url. Must be a image/jpeg, image/png, image/webp or image/gif image.
darkLogoUrl string | null
The logo shown in dark mode. Responses return the URL of the stored logo. Accepts the URL of an image under 20 MB, and we fetch the logo from it. Send null to remove the logo.
design "v1" | "v2" | string
Page design.
faviconRemoteUrl string | null
The URL the favicon was fetched from. Accepts the URL of an image under 20 MB, and we fetch the favicon from it. Send null to remove the favicon.
faviconUploadId string
The favicon, as the ID of a file upload. Send it instead of favicon_remote_url. Must be a image/jpeg, image/png, image/gif, image/svg+xml or image/x-icon image.
googleAnalyticsId string | null
Your Google Analytics ID, such as G-XXXXXXXX. Must start with G-, UA- or GTM-.
hideFromSearchEngines boolean
Whether to hide the page from search engines with a noindex tag.
history number
Number of days of history the page shows, from 7 to 365.
ipAllowlist string[]
IP addresses or CIDR ranges allowed to view the page. Entries starting with # are comments. Send [] to let anyone view it.
layout "vertical" | "horizontal" | string
Header layout of the page. Only the v2 design uses it.
logoRemoteUrl string | null
The URL the light mode logo was fetched from. Send null to remove the logo. When you send this and logo_url, logo_url is used.
logoUploadId string
The logo shown in light mode, as the ID of a file upload. Send it instead of logo_url. Must be a image/jpeg, image/png, image/webp or image/gif image.
logoUrl string | null
The logo shown in light mode. Responses return the URL of the stored logo. Accepts the URL of an image under 20 MB, and we fetch the logo from it. Send null to remove the logo.
minIncidentLength number
Shortest incident the page shows, in seconds. 0 shows every incident. Must be less than a year.
organizationId string
The ID of the organization the page belongs to, such as 123. Get the ID from organization_id in List teams. Required on create when you sign in with OAuth and can access more than one organization.
password string | Redacted<string> | null
Password visitors enter to view the page. Never returned. Setting a password also turns on password_enabled, unless password_enabled is set too. An empty password removes the password and turns protection off.
passwordEnabled boolean
Whether visitors need a password to view the page. Off unless you turn it on or set password.
published boolean
Whether the page is published and publicly visible. An unpublished page is a draft. Publishing a draft fails when the organization already has as many published status pages as its plan allows.
requireSso boolean
Whether visitors must sign in with SSO to view the page. Needs SSO set up for your organization, and can't be on together with password_enabled.
statusPageGroupId string | null
The ID of the status page group the page belongs to. Get the ID via List status page groups.
subdomain string
Subdomain of the page's default address (see publicUrl). Must be unique across Better Stack, up to 63 characters of letters, digits, dashes and underscores. Defaults to a unique lowercase name generated from the stack, stage and logical id, kept across updates.
subscribable boolean
Whether visitors can subscribe to updates.
teamId string
Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.
theme "light" | "dark" | "system" | string
Color theme. Only the v2 design uses it.
treatNotMonitoredAsOperational boolean
Whether the days a resource wasn't monitored show as operational in its history and count toward its uptime, instead of showing as not monitored.
whitelabeled boolean
Whether to remove Better Stack branding from the page.
Attributes
Section titled “Attributes”id string always set
The status_page's id.
aggregateState "maintenance" | "operational" | "degraded" | "downtime"
The page's overall status.
announcement string | null
Announcement banner text.
announcementEmbedCss string | null
Your own CSS for the announcement on the embeddable widget.
announcementEmbedLink string | null
Link the announcement points to on the embeddable widget.
announcementEmbedVisible boolean
Whether the embeddable widget shows the announcement.
automaticReports boolean
Whether status page reports are created automatically for new incidents.
companyName string
Company name shown on the page.
companyUrl string | null
Company website URL.
contactUrl string | null
URL visitors can use to get in touch, such as a support page or a mailto: address like mailto:support@example.com.
createdAt string
When the status page was created.
customCss string | null
Custom CSS added to the page.
customDomain string | null
A host name you own to serve the page from, such as status.example.com. Point its CNAME record to statuspage.betteruptime.com.
customJavascript string | null
Custom JavaScript added to the page.
darkLogoRemoteUrl string | null
The URL the dark mode logo was fetched from.
darkLogoUrl string | null
The logo shown in dark mode. Responses return the URL of the stored logo.
design "v1" | "v2"
Page design.
faviconRemoteUrl string | null
The URL the favicon was fetched from.
faviconUrl string | null
The icon browsers show in the page's tab, as the URL of the stored favicon. Only the v2 design shows it.
googleAnalyticsId string | null
Your Google Analytics ID, such as G-XXXXXXXX. Must start with G-, UA- or GTM-.
hideFromSearchEngines boolean
Whether to hide the page from search engines with a noindex tag.
history number
Number of days of history the page shows, from 7 to 365.
ipAllowlist string[]
IP addresses or CIDR ranges allowed to view the page. Entries starting with # are comments.
layout "vertical" | "horizontal"
Header layout of the page. Only the v2 design uses it.
logoRemoteUrl string | null
The URL the light mode logo was fetched from.
logoUrl string | null
The logo shown in light mode. Responses return the URL of the stored logo.
minIncidentLength number
Shortest incident the page shows, in seconds. 0 shows every incident.
organizationId string
The ID of the organization the page belongs to, such as 123. Get the ID from organization_id in List teams.
passwordEnabled boolean
Whether visitors need a password to view the page. Off unless you turn it on or set password.
publicUrl string
The address visitors open the page at. The custom_domain when the page has one, otherwise the betterstack.com subdomain.
published boolean
Whether the page is published and publicly visible. An unpublished page is a draft. Publishing a draft fails when the organization already has as many published status pages as its plan allows.
requireSso boolean
Whether visitors must sign in with SSO to view the page. Needs SSO set up for your organization, and can't be on together with password_enabled.
sections StatusPageSectionsItem[]
The page's sections and their resources, in display order. Only an update accepts it. Sending it replaces the whole structure, and sections and resources are matched by id. A section or resource without an id is created, and one you leave out is removed from the page. Removing a resource doesn't change the monitor or other resource it shows. An attribute you leave out of a resource keeps its value. Leave sections out to keep the structure as it is.
statusPageGroupId string | null
The ID of the status page group the page belongs to. Get the ID via List status page groups.
subdomain string
Subdomain of the page's default address. Must be unique across Better Stack, up to 63 characters of letters, digits, dashes and underscores.
subscribable boolean
Whether visitors can subscribe to updates.
theme "light" | "dark" | "system"
Color theme. Only the v2 design uses it.
timezone string
Time zone the page shows times in, as a Rails time zone name such as Tokyo or an IANA ID such as Europe/Prague. Returned as the Rails name.
treatNotMonitoredAsOperational boolean
Whether the days a resource wasn't monitored show as operational in its history and count toward its uptime, instead of showing as not monitored.
updatedAt string
When the status page was last updated.
whitelabeled boolean
Whether to remove Better Stack branding from the page.
Lookup
Section titled “Lookup”StatusPage.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
id string required
The status page's id.
teamId string
Team whose token selects the page, such as t123. Defaults to the credentials' team.