Skip to content
betterstack-alchemyUnofficial

Incidents.StatusPageSubscriber

Kind ResourceType id BetterStack.Incidents.StatusPageSubscriberSource src/Incidents/StatusPageSubscriber.tsOffline only Tested against the offline mock only: the lifecycle runs against the offline mock only (test/Incidents/StatusPageSubscriber.test.ts).

An e-mail address subscribed to a Better Stack StatusPage’s updates: for the whole page, or only for some of its StatusPageResources (statusPageResourceIds). Better Stack sends this address e-mail whenever the page posts a status report or update, so subscribe only addresses that expect it. A subscriber created through the API is confirmed at once (no confirmation e-mail round trip).

statusPageResourceIds changes in place; removing it from the config follows the whole page again. email can’t be changed and statusPageId (the parent) and teamId replace the subscriber; an e-mail change that only differs in case is the same address, so the old subscription is removed before the new one is made.

Deleting it unsubscribes the address (“The subscriber stops getting updates and is marked as unsubscribed”); subscribing the same address again brings the old subscriber back with its ID. An existing subscription of the same address on the page is adopted with --adopt.

The on-call mailbox follows the API only

const page = yield* BetterStack.Incidents.StatusPage("status", {
companyName: "Acme Cloud",
timezone: "UTC",
});
const api = yield* BetterStack.Incidents.StatusPageResource("api-item", {
statusPageId: page.id,
resourceType: "Monitor",
resourceId: monitor.id,
publicName: "Public API",
});
yield* BetterStack.Incidents.StatusPageSubscriber("oncall", {
statusPageId: page.id,
email: "oncall@acme.example.com",
statusPageResourceIds: [api.id],
});

By e-mail on a page

const existing = BetterStack.Incidents.StatusPageSubscriber.lookup({
statusPageId: "123",
email: "oncall@acme.example.com",
});

email string required

Subscriber e-mail address.

statusPageId string required

statusPageResourceIds string[]

Status page resources to follow. An empty list follows the whole page. Every ID must be a resource of this page other than a third-party service. Get the IDs via List status page resources.

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.

id string always set

The status_page_subscriber's id.

statusPageId string always set

The status page the subscriber follows.

confirmedAt string | null

When the subscription was confirmed, or null while it waits for the subscriber to confirm it. A subscriber created through the API is confirmed at once.

createdAt string

When the subscriber was created.

email string

Subscriber e-mail address.

statusPageResourceIds string[]

The status page resources the subscriber follows (as strings, like the props); empty when it follows the whole page.

updatedAt string

When the subscriber was last updated.

StatusPageSubscriber.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.

statusPageId string required

The status page's id.

teamId string

Team whose token selects the page, such as t123. Defaults to the credentials' team.