Incidents.AcknowledgeIncident
Acknowledge an ongoing incident from running code
(acknowledge_incident), which pauses its escalation: nobody further down
the escalation policy is alerted. acknowledgedBy credits a person (an
e-mail) or any text; it defaults to API with an API token.
Notifies. Nobody new; it stops the escalation. Connected integrations
(Slack, …) show the acknowledgement. A resolved incident answers
Conflict.
Credential. These operations need an API token: Better Stack has no
narrower credential for them (no per-incident or per-page token, no
scopes). The host receives the ApiToken you pass — explicitly,
never the deployer’s own — under the name you give it (Redacted, a
secret on every host), plus <name>_TEAM_ID when you give a team.
The token can do everything it can do in the Uptime API, so use a
team-scoped Uptime API token (Settings → API tokens) rather than a
global one, and bind it only into hosts that need it.
Provide AcknowledgeIncidentHttp on the host’s implementation.
From a Cloud.Service
Section titled “From a Cloud.Service”Bind it with an explicit token
export default class Api extends BetterStack.Cloud.Service<Api>()( "Api", { server: Box, main: import.meta.url, port: 3000 }, Effect.gen(function* () { const acknowledge = yield* BetterStack.Incidents.AcknowledgeIncident(IncidentsToken); return { fetch: Effect.gen(function* () { yield* acknowledge({ id: "123", acknowledgedBy: "bot@example.com" }); return HttpServerResponse.text("acknowledged"); }).pipe(Effect.orDie), }; }).pipe(Effect.provide(BetterStack.Incidents.AcknowledgeIncidentHttp)),) {}On any Alchemy host
Section titled “On any Alchemy host”The token and ids are bound through RuntimeContext, so the same
yield* BetterStack.Incidents.AcknowledgeIncident(…) works in a Cloudflare Worker or a
Lambda Function, where the token becomes the host’s secret.