Skip to content

Incident routes: create, get

The Incident Verbs create, get as api.sb routes, with inputs, result, refusals and an example.

Reference for Incident, one group of Incident routes.

Incident.create

Creates an Incident. Verb page.

Text
POST /{namespace}/incidents

Body, as JSON: the inputs. Emits Incident.created.

Inputs

InputTypeRequiredDescription
byWorkerThe Worker that performed it.
forPartyThe Party it was done on behalf of.
viastringThe Interface or request it arrived through.
onstringThe Action or Event that caused it, such as the failed attempt a retry follows.
thingstringThe record, at the Version the Action was decided against.
inputjsonThe input it was called with.
createdAtdatetimeWhen it was called.
reservedmoneyThe most this Action may cost, held against its Limits from the check until it settles, billed misses included.
duedatetimeWhen the Task is due.
priorityintegerIts rank in the inbox, highest first.
recurrencestringThe schedule a recurring duty repeats on.
kindstringOne of bug, request, or question.
advisorystringFor a vulnerability: the public advisory it matches, with the affected package and range.
severitystringrequiredOne of minor, major, or critical.
detectedAtdatetimerequiredWhen monitoring or a Customer first reported it.
resolvedAtdatetimeWhen service was restored.
personalDatabooleanTrue when the Incident exposed personal data, which starts the breach-notice clock.
monitorMonitorA failing internal Monitor opens an Incident, which names the Monitor that saw it first.

Returns

OutputTypeRequiredDescription
incidentIncidentrequiredThe Incident.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/incidents \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"severity":"minor","detectedAt":"2026-10-22T12:00:00Z"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "incident": {
    "$id": "https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0",
    "$type": "Incident",
    "status": "pending",
    "mode": "try",
    "severity": "minor",
    "detectedAt": "2026-10-22T12:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Incident.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Incident.get

Returns one Incident by id. Verb page.

Text
GET /{namespace}/incidents/{id}

Path: id. Query: the other inputs. Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Incident.
atstringA time or Version name: the record as it stood then. Unset: as it stands now.

Returns

OutputTypeRequiredDescription
incidentIncidentrequiredThe Incident.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "$type": "Incident",
  "$id": "https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0",
  "incident": {
    "$id": "https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0",
    "$type": "Incident",
    "status": "pending",
    "mode": "try",
    "severity": "minor",
    "detectedAt": "2026-10-22T12:00:00Z"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0",
    "up": "https://api.sb/leaseline.app/incidents"
  },
  "actions": {
    "acknowledge": "https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0/acknowledge",
    "resolve": "https://api.sb/leaseline.app/incidents/incident_2XOYkIEno0/resolve"
  }
}