{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Cannot transition from closed to open. Incident is in final state and cannot be modified.", "details": { "fromStatus": "closed", "toStatus": "open", "validTransitions": [] } }}
Incidents
Update Incident Status
Update incident status with state machine validation
Update the status of an incident through its lifecycle. This endpoint enforces strict state transition rules to maintain incident workflow integrity. It’s the primary way to acknowledge, resolve, and close incidents.
The incident status follows a strict forward-only state machine:
Current Status
Valid Transitions
Notes
open
acknowledged, resolved
Can acknowledge or directly resolve
acknowledged
resolved, closed
Can resolve or close directly
resolved
closed
Can only close after resolution
closed
(none)
Terminal state - no further transitions
Backward transitions are not allowed. The state machine enforces forward-only progression. Once an incident moves to a later state, it cannot return to a previous state. Same-state transitions (e.g., open to open) are also rejected.
Invalid transitions will result in a 400 Bad Request error with the valid transitions listed.
{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Cannot transition from closed to open. Incident is in final state and cannot be modified.", "details": { "fromStatus": "closed", "toStatus": "open", "validTransitions": [] } }}
# Close directly from acknowledged state (e.g., false positive)PUT /api/incidents/{id}/status{"status": "closed", "note": "False positive - no action needed"}
# This will fail - cannot go from open directly to closedPUT /api/incidents/{id}/status{"status": "closed"}# Response: 400 Bad Request# "Cannot transition incident from 'open' to 'closed'. Valid transitions: acknowledged, resolved"
# This will fail - closed is a terminal statePUT /api/incidents/{id}/status{"status": "open"}# Response: 400 Bad Request# "Cannot transition incident from 'closed' to 'open'. Incident is in final state and cannot be modified."