Analyses
POST /v1/analyses/{id}/postmortem
Generate a Markdown postmortem from a complete analysis
Generates a Markdown postmortem from a complete analysis. The output follows a standard SRE-style layout — title, timeline, root cause, impact, resolution — and is ready to paste into your team's incident document or PR description.
Authentication
API key with analysis:read permission.
Endpoint
POST /v1/analyses/{id}/postmortemPath parameters
| Param | Type | Notes |
|---|---|---|
id | UUID | The analysis id |
Request body
None. The postmortem is rendered from the analysis's stored result.
Response
200 OK
{
"success": true,
"data": {
"markdown": "# Connection Pool Exhaustion in checkout-api\n\n## Summary\n..."
}
}| Field | Type | Notes |
|---|---|---|
markdown | string | The postmortem in GitHub-flavored Markdown |
Error responses
| Status | error.code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | id is not a UUID |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Key lacks analysis:read |
| 404 | NOT_FOUND | No analysis with that id, or it has no result yet (still processing) |
Example
curl -X POST https://api.sigsentry.com/v1/analyses/ana_x1y2/postmortem \
-H "Authorization: Bearer ss_secret_..."Sections in the output
| Section | Sourced from |
|---|---|
| Title | The analysis summary, normalized |
| Timeline | The analysis's timeline field |
| Root cause | The structured root-cause description |
| Impact | Affected services and their roles |
| Resolution | Suggested actions, formatted as numbered steps |
| Detection method | How the analysis was triggered |
To rewrite the prose for flow and tone before exporting, use
/postmortem/polish (Pro+).
Idempotency
POST /v1/analyses/{id}/postmortem honors the Idempotency-Key
header — see Idempotency. Re-rendering the same
analysis returns equivalent content; treat the output as cacheable
on the analysis id.
