Skip to main content

PATCH /api/incidents/

Updates specific fields of an incident. Only the fields provided in the request body will be updated.

Authentication

Requires user authentication via cookies or headers. The user_id is extracted from the request.

Path Parameters

string
required
UUID of the incident to update

Request Body

All fields are optional. Only include the fields you want to update.
string
Update the incident status. Must be one of: investigating, analyzed, merged, resolvedWhen set to resolved, automatically triggers postmortem generation.
string
Update Aurora’s RCA analysis status. Must be one of: idle, running, complete, error
string
Update the incident summary. Maximum length: 10,000 characters
string
Update the active tab in the UI. Must be one of: thoughts, chat

Response

Returns a success object with the incident ID.
boolean
required
Whether the update was successful
string
required
UUID of the updated incident

Example Requests

Update Status to Resolved

cURL

Update Aurora Status and Summary

cURL

Update Active Tab

cURL

Example Response

Response Codes

Success
Successfully updated incident
Bad Request
  • Missing user_id (authentication failed)
  • Invalid incident ID format (not a valid UUID)
  • Missing request body
  • Invalid field value (e.g., invalid status)
  • Summary too long (max 10,000 characters)
  • No valid fields to update
Not Found
Incident not found or does not belong to the authenticated user
Internal Server Error
Failed to update incident

Automatic Behaviors

Status Transitions

When status is set to analyzed:
  • The analyzed_at timestamp is automatically set to the current time (if not already set)
When status is set to resolved (and previous status was not resolved):
  • The analyzed_at timestamp is set if not already set
  • A background task is automatically triggered to generate a postmortem document
  • The postmortem can be retrieved via the postmortems API

Updated Timestamp

  • The updated_at timestamp is automatically updated on every PATCH request

Validation Rules

Must be one of: investigating, analyzed, merged, resolved
Must be one of: idle, running, complete, error
Must be one of: thoughts, chat
Maximum length: 10,000 characters

Notes

  • This is a PATCH endpoint, not PUT - only provided fields are updated
  • The endpoint uses Row Level Security (RLS) to ensure users can only update their own incidents
  • Setting status to resolved triggers postmortem generation asynchronously
  • You cannot manually set analyzed_at - it’s automatically managed based on status
  • The updated_at field is always updated, even if only metadata changes