Incident methods: create, get
The Incident Verbs create, get as typed SDK methods, with inputs, result, refusals and an example.
Reference for Incident, one group of Incident methods.
Incident.create
Creates an Incident. Verb page.
interface IncidentVerbs {
create(input: IncidentCreateInput, options?: SB.CallOptions): SB.Call<Incident>
}Emits Incident.created.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
by | Worker | The Worker that performed it. | |
for | Party | The Party it was done on behalf of. | |
via | string | The Interface or request it arrived through. | |
on | string | The Action or Event that caused it, such as the failed attempt a retry follows. | |
thing | string | The record, at the Version the Action was decided against. | |
input | json | The input it was called with. | |
createdAt | datetime | When it was called. | |
reserved | money | The most this Action may cost, held against its Limits from the check until it settles, billed misses included. | |
due | datetime | When the Task is due. | |
priority | integer | Its rank in the inbox, highest first. | |
recurrence | string | The schedule a recurring duty repeats on. | |
kind | string | One of bug, request, or question. | |
advisory | string | For a vulnerability: the public advisory it matches, with the affected package and range. | |
severity | string | required | One of minor, major, or critical. |
detectedAt | datetime | required | When monitoring or a Customer first reported it. |
resolvedAt | datetime | When service was restored. | |
personalData | boolean | True when the Incident exposed personal data, which starts the breach-notice clock. | |
monitor | Monitor | A failing internal Monitor opens an Incident, which names the Monitor that saw it first. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
incident | Incident | required | The Incident. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const incident = await $.Incident.create({ severity: 'minor', detectedAt: '2026-10-22T12: 00: 00Z' })Incident.get
Returns one Incident by id. Verb page.
interface IncidentVerbs {
get(input: IncidentGetInput, options?: SB.CallOptions): SB.Call<Incident>
}Reads only: it emits no Event.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Incident. |
at | string | A time or Version name: the record as it stood then. Unset: as it stands now. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
incident | Incident | required | The Incident. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const incident = await $.Incident.get({ id: 'incident_2XOYkIEno0' })