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

incident_id
string
required
UUID of the incident to update

Request Body

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

Response

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

Example Requests

Update Status to Resolved

cURL
curl -X PATCH "https://api.aurora.example.com/api/incidents/123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json" \
  -H "Cookie: session_token=YOUR_SESSION_TOKEN" \
  -d '{
    "status": "resolved"
  }'

Update Aurora Status and Summary

cURL
curl -X PATCH "https://api.aurora.example.com/api/incidents/123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json" \
  -H "Cookie: session_token=YOUR_SESSION_TOKEN" \
  -d '{
    "auroraStatus": "complete",
    "summary": "Root cause identified: Memory leak in payment-service v2.3.1. Fix deployed in v2.3.2."
  }'

Update Active Tab

cURL
curl -X PATCH "https://api.aurora.example.com/api/incidents/123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json" \
  -H "Cookie: session_token=YOUR_SESSION_TOKEN" \
  -d '{
    "activeTab": "chat"
  }'

Example Response

{
  "success": true,
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Response Codes

200
Success
Successfully updated incident
400
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
404
Not Found
Incident not found or does not belong to the authenticated user
500
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

status
Must be one of: investigating, analyzed, merged, resolved
auroraStatus
Must be one of: idle, running, complete, error
activeTab
Must be one of: thoughts, chat
summary
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

Build docs developers (and LLMs) love