---
title: "Write an incident's postmortem"
method: PUT
path: "/incidents/{incident}/postmortem"
tags: ["Incidents"]
---

# Write an incident's postmortem

`PUT /incidents/{incident}/postmortem`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/incidents/{incident}/postmortem`
- Auth: HTTP bearer

Creates the postmortem, or replaces its content.

## Path parameters

- `incident` string, uuid, required

## Request body

- SavePostmortem: An incident's postmortem.
  - `content` string, required: The whole postmortem, in Markdown; replaces the current one
  - `published` boolean: Mark it as published (final), or as a draft again. Leave out to keep its state

## Response `200`

The saved postmortem.

- IncidentPostmortem: An incident's postmortem: what happened, why, and what changes.
  - `content` string, nullable, required: The postmortem, in Markdown
  - `published` boolean, required: Whether it is marked as published (final). It is not shown on status pages
  - `updated_at` string, date-time, required: When it last changed

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `404`: `RESOURCE_NOT_FOUND`: there is no such resource in this team.
- `422`: `VALIDATION_FAILED`: the request is invalid; `details.errors` lists the fields.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
