EvoHub Docs Sign in

On-Call API › Postmortems

Write an incident's postmortem (PUT)

Use with AI
View as MarkdownThis page as plain text, for pasting into an AI tool Open in ClaudeAsk Claude questions about this page Open in ChatGPTAsk ChatGPT questions about this page
Connect to Cursor / VS Code / ClaudeSearch and read these docs from your AI tool (MCP server)

MCP server URL

https://docs-dev.evohub.io/mcp

Claude Code

claude mcp add --transport http evohub-docs-docs https://docs-dev.evohub.io/mcp

Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector, and paste the URL above.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docs-dev.evohub.io/mcp"
      ]
    }
  }
}

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}

VS Code — .vscode/mcp.json

{
  "servers": {
    "evohub-docs-docs": {
      "type": "http",
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}
PUT/api/v1/incidents/{id}/postmortem

Creates the incident's postmortem, or replaces every field of the existing one: a field left out is stored empty. status defaults to draft on creation. Setting it to published records published_at the first time and, when the incident is on a status page, posts the postmortem there. The caller becomes the author. POST and PUT do the same thing.

Permission (API-key scope): oncall:postmortem:write.

Authorization

Any one of:

Parameters

Path parameters

  • id string required
    The incident's id.
    Example: 2e7f9a1b-3c4d-4e5f-8a9b-0c1d2e3f4a5b

Request body required

Content type: application/json

Type: PostmortemWrite

Every field is written as sent; one left out is stored empty.

  • status PostmortemStatus
    One of: draft in_review published
  • summary string
  • root_cause string
  • contributing_factors string
  • timeline string
  • action_items string
  • lessons_learned string

Responses

200

The postmortem.

Content type: application/json

Type: object

  • data Postmortem required
    Show Postmortem properties
    • id string
    • org_id string
    • incident_id string
    • author_id string
    • status PostmortemStatus
      One of: draft in_review published
    • summary string
    • root_cause string
    • contributing_factors string
    • timeline string
    • action_items string
    • lessons_learned string
    • published_at string (date-time)
    • created_at string (date-time)
    • updated_at string (date-time)
  • success boolean required
    Value: true

400

The body is not valid JSON (INVALID_BODY).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

401

No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

403

The key lacks the scope this endpoint needs (FORBIDDEN).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

404

No incident with this id in your organization (NOT_FOUND).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

429

Too many requests (RATE_LIMITED). Wait Retry-After seconds.

Headers

  • Retry-After integer
    Seconds to wait.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

500

Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

Example request

curl -X PUT 'https://evohub.io/api/v1/incidents/2e7f9a1b-3c4d-4e5f-8a9b-0c1d2e3f4a5b/postmortem' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "status": "draft",
  "summary": "Payments timed out for 42 minutes.",
  "timeline": "08:01 first alert; 08:43 rollback complete.",
  "root_cause": "A connection pool limit was lowered in the v2.15.0 release.",
  "action_items": "Alert on pool saturation; load test pool changes.",
  "lessons_learned": "Configuration changes need the same review as code.",
  "contributing_factors": "No alert on pool saturation."
}'

Last updated