record_incident
Generated automatically from the published contract sources.
Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.
A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/actions/record_incident, with a bearer credential and the action's payload as the JSON body.
Contract description
Open a platform incident, or amend one by its id: close it, reopen it, append an update, or replace a field. Super-admin (platform operator) only. A backfilled closed incident is one call with its instants in the past; a repeated open request answers the row it repeats.
Access and action metadata
{
"name": "record_incident",
"resource": "account",
"tier": "reversible",
"clients": [
"bearer",
"browser_session"
],
"grant": "super_admin",
"summary": "Super-admin: record a platform incident by hand. With no `incident` member the request opens a row (`title`, `kind`, and `summary` required; `opened_at`, `first_failure_at`, and `closed_at` admitted in the past, so a backfilled closed incident is one call), a repeated open request answering the row it repeats; with `incident` it amends the named row — `closed_at` closes, `closed_at` null reopens, `update` appends, any other member replaces its field — refusing `incident_not_found` for a row the record does not hold and `invalid_request` for instants out of order or in the future, a text past its bound, or an update past the 200-entry bound.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"openWorldHint": false
}
}
MCP catalog entry
{
"name": "record_incident",
"tier": "reversible",
"scenario": "API-L0-12",
"summary": "Open a platform incident, or amend one by its id: close it, reopen it, append an update, or replace a field. Super-admin (platform operator) only. A backfilled closed incident is one call with its instants in the past; a repeated open request answers the row it repeats.",
"owners": []
}
request
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | The open form (no `incident`): title, kind, and summary required, the instants admitted in the past. The amend form (`incident`): every other member replaces its field, closed_at carries the state, update appends; a request with no member but incident is refused. Both forms refuse invalid_request naming the member for a wrong type, an instant that does not parse or lies in the future, closed_at before opened_at, first_failure_at after closed_at, a text past its bound, or an unknown component. Type: object Required fields: [] |
| / |
absent opens a row; present amends the row it names, refused incident_not_found where the record does not hold it Type: string |
| / |
required on the open form; the repeat rule compares it Type: string Maximum length: 200 |
| / |
required on the open form Type: string Allowed values: ["planned","unplanned"] |
| / |
required on the open form Type: string Maximum length: 4000 |
| / |
Type: ["string","null"] Maximum length: 4000 |
| / |
each a component name the record knows, from the current component list or the sampled record, or a watched subject of the conditions' grammar under a coded condition name. Empty is admitted, and the default on the open form; the first unknown name refuses invalid_request Type: array |
| / |
Type: string |
| / |
`operator` where absent on the open form; `automatic` is the prober's and `condition` the conditions pass's, each refused here, and an amend that would replace a condition incident's source is refused Type: string Allowed values: ["operator","backfill"] |
| / |
ISO 8601, in the past; the instant of the call where absent on the open form; the repeat rule compares it where given Type: string |
| / |
ISO 8601, in the past, not after closed_at; null where absent on the open form; the repeat rule compares it Type: ["string","null"] |
| / |
ISO 8601, in the past, not before opened_at: a value closes the row (a backfilled closed incident is one open call), null reopens it on the amend form. Absent on the open form leaves the row open, and a repeat compares against closed rows only where it is given Type: ["string","null"] |
| / |
amend form only: appended as an update carrying the operator's account and the instant; refused invalid_request at the 200-entry bound Type: string Maximum length: 4000 |
response
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["contract_version","incident","outcome","detail"] Additional properties: false |
| / |
Required value: 1 |
| / |
the row as it stands after the call Type: object Required fields: ["id","kind","state","opened_at","first_failure_at","closed_at","duration_ms","title","components","summary","cause","detection_source","author","updates","retirements"] |
| / |
Type: string |
| / |
Type: string Allowed values: ["planned","unplanned"] |
| / |
always what closed_at says Type: string Allowed values: ["open","closed"] |
| / |
when the incident opened, ISO 8601 in UTC Type: string |
| / |
the first failed minute the incident covers, ISO 8601 in UTC, or null Type: ["string","null"] |
| / |
when the incident closed, ISO 8601 in UTC, or null Type: ["string","null"] |
| / |
closed_at − opened_at; null while open Type: ["integer","null"] |
| / |
Type: string |
| / |
Type: array |
| / |
Type: string |
| / |
Type: string |
| / |
Type: ["string","null"] |
| / |
`automatic` is the prober's and `condition` the conditions pass's, one open per watched subject; a hand row is `operator` or `backfill` Type: string Allowed values: ["automatic","operator","backfill","condition"] |
| / |
the account that opened the row, or `platform` for the pass's own Type: string |
| / |
the appended updates, oldest first, bounded at 200 entries Type: array |
| / |
Type: object Required fields: ["at","author","text"] |
| / |
the update's instant, ISO 8601 in UTC Type: string |
| / |
Type: string |
| / |
Type: string |
| / |
component to the instant of the pass that recorded its retirement Type: object |
| / |
Type: string |
| / |
`repeated` answers the row an open request repeats, nothing written Type: string Allowed values: ["opened","repeated","amended"] |
| / |
Type: string |
Complete payload contract
{
"request": {
"type": "object",
"required": [],
"properties": {
"incident": {
"type": "string",
"description": "absent opens a row; present amends the row it names, refused incident_not_found where the record does not hold it"
},
"title": {
"type": "string",
"maxLength": 200,
"description": "required on the open form; the repeat rule compares it"
},
"kind": {
"type": "string",
"enum": [
"planned",
"unplanned"
],
"description": "required on the open form"
},
"summary": {
"type": "string",
"maxLength": 4000,
"description": "required on the open form"
},
"cause": {
"type": [
"string",
"null"
],
"maxLength": 4000
},
"components": {
"type": "array",
"items": {
"type": "string"
},
"description": "each a component name the record knows, from the current component list or the sampled record, or a watched subject of the conditions' grammar under a coded condition name. Empty is admitted, and the default on the open form; the first unknown name refuses invalid_request"
},
"detection_source": {
"type": "string",
"enum": [
"operator",
"backfill"
],
"description": "`operator` where absent on the open form; `automatic` is the prober's and `condition` the conditions pass's, each refused here, and an amend that would replace a condition incident's source is refused"
},
"opened_at": {
"type": "string",
"description": "ISO 8601, in the past; the instant of the call where absent on the open form; the repeat rule compares it where given"
},
"first_failure_at": {
"type": [
"string",
"null"
],
"description": "ISO 8601, in the past, not after closed_at; null where absent on the open form; the repeat rule compares it"
},
"closed_at": {
"type": [
"string",
"null"
],
"description": "ISO 8601, in the past, not before opened_at: a value closes the row (a backfilled closed incident is one open call), null reopens it on the amend form. Absent on the open form leaves the row open, and a repeat compares against closed rows only where it is given"
},
"update": {
"type": "string",
"maxLength": 4000,
"description": "amend form only: appended as an update carrying the operator's account and the instant; refused invalid_request at the 200-entry bound"
}
},
"description": "The open form (no `incident`): title, kind, and summary required, the instants admitted in the past. The amend form (`incident`): every other member replaces its field, closed_at carries the state, update appends; a request with no member but incident is refused. Both forms refuse invalid_request naming the member for a wrong type, an instant that does not parse or lies in the future, closed_at before opened_at, first_failure_at after closed_at, a text past its bound, or an unknown component."
},
"response": {
"type": "object",
"required": [
"contract_version",
"incident",
"outcome",
"detail"
],
"properties": {
"contract_version": {
"const": 1
},
"incident": {
"type": "object",
"required": [
"id",
"kind",
"state",
"opened_at",
"first_failure_at",
"closed_at",
"duration_ms",
"title",
"components",
"summary",
"cause",
"detection_source",
"author",
"updates",
"retirements"
],
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"planned",
"unplanned"
]
},
"state": {
"type": "string",
"enum": [
"open",
"closed"
],
"description": "always what closed_at says"
},
"opened_at": {
"type": "string",
"description": "when the incident opened, ISO 8601 in UTC"
},
"first_failure_at": {
"type": [
"string",
"null"
],
"description": "the first failed minute the incident covers, ISO 8601 in UTC, or null"
},
"closed_at": {
"type": [
"string",
"null"
],
"description": "when the incident closed, ISO 8601 in UTC, or null"
},
"duration_ms": {
"type": [
"integer",
"null"
],
"description": "closed_at − opened_at; null while open"
},
"title": {
"type": "string"
},
"components": {
"type": "array",
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"cause": {
"type": [
"string",
"null"
]
},
"detection_source": {
"type": "string",
"enum": [
"automatic",
"operator",
"backfill",
"condition"
],
"description": "`automatic` is the prober's and `condition` the conditions pass's, one open per watched subject; a hand row is `operator` or `backfill`"
},
"author": {
"type": "string",
"description": "the account that opened the row, or `platform` for the pass's own"
},
"updates": {
"type": "array",
"items": {
"type": "object",
"required": [
"at",
"author",
"text"
],
"properties": {
"at": {
"type": "string",
"description": "the update's instant, ISO 8601 in UTC"
},
"author": {
"type": "string"
},
"text": {
"type": "string"
}
}
},
"description": "the appended updates, oldest first, bounded at 200 entries"
},
"retirements": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "component to the instant of the pass that recorded its retirement"
}
},
"description": "the row as it stands after the call"
},
"outcome": {
"type": "string",
"enum": [
"opened",
"repeated",
"amended"
],
"description": "`repeated` answers the row an open request repeats, nothing written"
},
"detail": {
"type": "string"
}
},
"additionalProperties": false
}
}
Shared contracts
- Refusals: every refusal, by surface, with its cause and its remedy
- schemas/wire_error.schema.json
- schemas/wire_errors.json
- schemas/action_payloads.json (includes shared shapes)
- management_api_contract.md