> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/developer-docs/rest-api/api-reference/incident-postmortems.md).

# Incident Postmortems

## GET /incidents/{id}/postmortems

> Get the postmortems of an incident.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.9-r.4"},"tags":[{"name":"Incident Postmortems"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"Postmortem":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"status":{"$ref":"#/components/schemas/PostmortemStatus"},"title":{"type":"string"},"editorialStatus":{"$ref":"#/components/schemas/PostmortemEditorialStatus"},"visibility":{"$ref":"#/components/schemas/PostmortemVisibility"},"markdownUrl":{"type":"string","format":"uri","description":"Location of the generated postmortem document."},"linkUrl":{"type":"string","format":"uri","description":"Link to an externally hosted postmortem document."},"markdownContent":{"type":"string","description":"This is an include field, it is not returned unless requested via the include query parameter"},"errorMessage":{"type":"string","readOnly":true,"description":"Set when the status is ERROR."},"creator":{"$ref":"#/components/schemas/User","readOnly":true},"incident":{"$ref":"#/components/schemas/Incident","description":"This is an include field, it is not returned unless requested via the include query parameter"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}},"PostmortemStatus":{"type":"string","readOnly":true,"description":"the generation status of the postmortem","enum":["NONE","REQUESTED","STARTED","CREATED","LINKED","ERROR"]},"PostmortemEditorialStatus":{"type":"string","enum":["AI_DRAFT","DRAFT","IN_REVIEW","PUBLISHED"]},"PostmortemVisibility":{"type":"string","enum":["NONE","PRIVATE","PUBLIC"]},"User":{"required":["email","firstName","lastName"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"timezone":{"$ref":"#/components/schemas/TimeZone"},"position":{"type":"string"},"department":{"type":"string"},"avatarUrl":{"type":"string","readOnly":true},"language":{"type":"string","enum":["de","en"]},"region":{"type":"string","enum":["DE","GB","CH","CN","IN","US","FR","ES","CA","IE"]},"role":{"$ref":"#/components/schemas/Role"},"shiftColor":{"type":"string","description":"Optional hex-color code for the user's shifts in schedules calendars"},"mutedUntil":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"createdAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"updatedAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"}}},"TimeZone":{"type":"string","enum":["Europe/Berlin","America/New_York","America/Los_Angeles","Asia/Istanbul"]},"Role":{"type":"string","enum":["STAKEHOLDER","GUEST","VIEWER","RESPONDER","USER","ADMIN"],"description":"The user's role."},"Incident":{"type":"object","required":["title"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true},"number":{"type":"integer","format":"int64","readOnly":true,"description":"Sequential number of the incident within the account."},"title":{"type":"string"},"summary":{"type":"string"},"status":{"$ref":"#/components/schemas/IncidentStatus"},"severity":{"type":"integer","format":"int32","minimum":1,"maximum":5,"description":"Optional severity in range 1..5."},"declaredAt":{"type":"string","format":"date-time","readOnly":true},"resolvedAt":{"type":"string","format":"date-time","readOnly":true},"declaredBy":{"$ref":"#/components/schemas/User"},"resolvedBy":{"$ref":"#/components/schemas/User"},"channel":{"$ref":"#/components/schemas/IncidentChannel"},"conferenceBridge":{"$ref":"#/components/schemas/ConferenceBridge"},"affectedServices":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"type":"object","properties":{"impact":{"$ref":"#/components/schemas/ServiceStatus"},"service":{"$ref":"#/components/schemas/ServiceNoIncludes"}}}},"responders":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"$ref":"#/components/schemas/IncidentResponder"}},"alertCount":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountJoined":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountTotal":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"}}},"IncidentStatus":{"type":"string","description":"the incident status","enum":["DECLARED","INVESTIGATING","IDENTIFIED","MONITORING","RESOLVED"]},"IncidentChannel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["SLACK","MS_TEAMS","GOOGLE_CHAT"]},"href":{"type":"string","format":"uri"},"groupId":{"type":"string"},"isPrivate":{"type":"boolean"}}},"ConferenceBridge":{"type":"object","properties":{"type":{"type":"string","enum":["ZOOM","GOOGLE_MEET","MS_TEAMS","CUSTOM"]},"href":{"type":"string","format":"uri"},"id":{"type":"string"},"dialIn":{"type":"string"}}},"ServiceStatus":{"type":"string","description":"the service status","enum":["OPERATIONAL","UNDER_MAINTENANCE","DEGRADED","PARTIAL_OUTAGE","MAJOR_OUTAGE"]},"ServiceNoIncludes":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"alias":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceStatus"},"description":{"type":"string"},"oneOpenIncidentOnly":{"type":"boolean"},"showUptimeHistory":{"type":"boolean"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"managedBy":{"$ref":"#/components/schemas/ManagedBy"},"publicStatus":{"$ref":"#/components/schemas/ServiceStatus"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Free-form key-value labels assigned to this service."},"iconUrl":{"type":"string"},"links":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLink"}},"createdBy":{"$ref":"#/components/schemas/ManagedBy"}}},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"ManagedBy":{"type":"object","readOnly":true,"description":"Present when this entity is managed outside of the ilert web app, for example through Terraform, Pulumi or the API. Read-only.","properties":{"type":{"type":"string","enum":["API","TERRAFORM","PULUMI","ILERT"]},"source":{"type":"string","description":"Identifier of the system managing this entity."}}},"ServiceLink":{"type":"object","properties":{"href":{"type":"string","format":"uri"},"text":{"type":"string"}}},"IncidentResponder":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"status":{"type":"string","readOnly":true,"enum":["ADDED","NOTIFIED","JOINED","DECLINED"]},"role":{"type":"string","enum":["INCIDENT_COMMANDER","COMMUNICATIONS_LEAD","ACCOUNTABLE_EXECUTIVE","LEGAL_LEAD","CUSTOMER_SUCCESS_LEAD","SUPPORT_LEAD","FINANCE_LEAD","RESPONDER"]},"notifiedAt":{"type":"string","format":"date-time","readOnly":true},"acceptedAt":{"type":"string","format":"date-time","readOnly":true},"declinedAt":{"type":"string","format":"date-time","readOnly":true},"pagedByUserId":{"type":"integer","format":"int64","readOnly":true}}}}},"paths":{"/incidents/{id}/postmortems":{"get":{"tags":["Incident Postmortems"],"summary":"Get the postmortems of an incident.","parameters":[{"name":"id","in":"path","description":"the id of the incident","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"the postmortems of the incident","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Postmortem"}}}}}}}}}}
```

## POST /incidents/{id}/postmortems

> Request the generation of a postmortem for an incident.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.9-r.4"},"tags":[{"name":"Incident Postmortems"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"PostmortemRequest":{"type":"object","properties":{"alerts":{"type":"array","description":"Alerts to take into account when generating the postmortem.","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}}},"deployments":{"type":"array","description":"Deployment events to take into account when generating the postmortem.","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}}},"channels":{"type":"array","description":"Chat channels whose transcript is taken into account when generating the postmortem.","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["SLACK","MS_TEAMS","GOOGLE_CHAT"]},"groupId":{"type":"string"},"isPrivate":{"type":"boolean"},"fromEpochSec":{"type":"integer","format":"int64"},"untilEpochSec":{"type":"integer","format":"int64"}}}},"impact":{"type":"string"},"rootCause":{"type":"string"},"actionItems":{"type":"string"},"chatTranscript":{"type":"string"},"visibility":{"$ref":"#/components/schemas/PostmortemVisibility"},"timezone":{"type":"string","description":"IANA timezone name used for dates in the generated document, for example Europe/Berlin."},"language":{"type":"string","description":"Language of the generated document, for example en or de."}}},"PostmortemVisibility":{"type":"string","enum":["NONE","PRIVATE","PUBLIC"]},"Postmortem":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"status":{"$ref":"#/components/schemas/PostmortemStatus"},"title":{"type":"string"},"editorialStatus":{"$ref":"#/components/schemas/PostmortemEditorialStatus"},"visibility":{"$ref":"#/components/schemas/PostmortemVisibility"},"markdownUrl":{"type":"string","format":"uri","description":"Location of the generated postmortem document."},"linkUrl":{"type":"string","format":"uri","description":"Link to an externally hosted postmortem document."},"markdownContent":{"type":"string","description":"This is an include field, it is not returned unless requested via the include query parameter"},"errorMessage":{"type":"string","readOnly":true,"description":"Set when the status is ERROR."},"creator":{"$ref":"#/components/schemas/User","readOnly":true},"incident":{"$ref":"#/components/schemas/Incident","description":"This is an include field, it is not returned unless requested via the include query parameter"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}},"PostmortemStatus":{"type":"string","readOnly":true,"description":"the generation status of the postmortem","enum":["NONE","REQUESTED","STARTED","CREATED","LINKED","ERROR"]},"PostmortemEditorialStatus":{"type":"string","enum":["AI_DRAFT","DRAFT","IN_REVIEW","PUBLISHED"]},"User":{"required":["email","firstName","lastName"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"timezone":{"$ref":"#/components/schemas/TimeZone"},"position":{"type":"string"},"department":{"type":"string"},"avatarUrl":{"type":"string","readOnly":true},"language":{"type":"string","enum":["de","en"]},"region":{"type":"string","enum":["DE","GB","CH","CN","IN","US","FR","ES","CA","IE"]},"role":{"$ref":"#/components/schemas/Role"},"shiftColor":{"type":"string","description":"Optional hex-color code for the user's shifts in schedules calendars"},"mutedUntil":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"createdAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"updatedAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"}}},"TimeZone":{"type":"string","enum":["Europe/Berlin","America/New_York","America/Los_Angeles","Asia/Istanbul"]},"Role":{"type":"string","enum":["STAKEHOLDER","GUEST","VIEWER","RESPONDER","USER","ADMIN"],"description":"The user's role."},"Incident":{"type":"object","required":["title"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true},"number":{"type":"integer","format":"int64","readOnly":true,"description":"Sequential number of the incident within the account."},"title":{"type":"string"},"summary":{"type":"string"},"status":{"$ref":"#/components/schemas/IncidentStatus"},"severity":{"type":"integer","format":"int32","minimum":1,"maximum":5,"description":"Optional severity in range 1..5."},"declaredAt":{"type":"string","format":"date-time","readOnly":true},"resolvedAt":{"type":"string","format":"date-time","readOnly":true},"declaredBy":{"$ref":"#/components/schemas/User"},"resolvedBy":{"$ref":"#/components/schemas/User"},"channel":{"$ref":"#/components/schemas/IncidentChannel"},"conferenceBridge":{"$ref":"#/components/schemas/ConferenceBridge"},"affectedServices":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"type":"object","properties":{"impact":{"$ref":"#/components/schemas/ServiceStatus"},"service":{"$ref":"#/components/schemas/ServiceNoIncludes"}}}},"responders":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"$ref":"#/components/schemas/IncidentResponder"}},"alertCount":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountJoined":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountTotal":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"}}},"IncidentStatus":{"type":"string","description":"the incident status","enum":["DECLARED","INVESTIGATING","IDENTIFIED","MONITORING","RESOLVED"]},"IncidentChannel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["SLACK","MS_TEAMS","GOOGLE_CHAT"]},"href":{"type":"string","format":"uri"},"groupId":{"type":"string"},"isPrivate":{"type":"boolean"}}},"ConferenceBridge":{"type":"object","properties":{"type":{"type":"string","enum":["ZOOM","GOOGLE_MEET","MS_TEAMS","CUSTOM"]},"href":{"type":"string","format":"uri"},"id":{"type":"string"},"dialIn":{"type":"string"}}},"ServiceStatus":{"type":"string","description":"the service status","enum":["OPERATIONAL","UNDER_MAINTENANCE","DEGRADED","PARTIAL_OUTAGE","MAJOR_OUTAGE"]},"ServiceNoIncludes":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"alias":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceStatus"},"description":{"type":"string"},"oneOpenIncidentOnly":{"type":"boolean"},"showUptimeHistory":{"type":"boolean"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"managedBy":{"$ref":"#/components/schemas/ManagedBy"},"publicStatus":{"$ref":"#/components/schemas/ServiceStatus"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Free-form key-value labels assigned to this service."},"iconUrl":{"type":"string"},"links":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLink"}},"createdBy":{"$ref":"#/components/schemas/ManagedBy"}}},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"ManagedBy":{"type":"object","readOnly":true,"description":"Present when this entity is managed outside of the ilert web app, for example through Terraform, Pulumi or the API. Read-only.","properties":{"type":{"type":"string","enum":["API","TERRAFORM","PULUMI","ILERT"]},"source":{"type":"string","description":"Identifier of the system managing this entity."}}},"ServiceLink":{"type":"object","properties":{"href":{"type":"string","format":"uri"},"text":{"type":"string"}}},"IncidentResponder":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"status":{"type":"string","readOnly":true,"enum":["ADDED","NOTIFIED","JOINED","DECLINED"]},"role":{"type":"string","enum":["INCIDENT_COMMANDER","COMMUNICATIONS_LEAD","ACCOUNTABLE_EXECUTIVE","LEGAL_LEAD","CUSTOMER_SUCCESS_LEAD","SUPPORT_LEAD","FINANCE_LEAD","RESPONDER"]},"notifiedAt":{"type":"string","format":"date-time","readOnly":true},"acceptedAt":{"type":"string","format":"date-time","readOnly":true},"declinedAt":{"type":"string","format":"date-time","readOnly":true},"pagedByUserId":{"type":"integer","format":"int64","readOnly":true}}}}},"paths":{"/incidents/{id}/postmortems":{"post":{"tags":["Incident Postmortems"],"summary":"Request the generation of a postmortem for an incident.","parameters":[{"name":"id","in":"path","description":"the id of the incident","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"overwrite","in":"query","description":"replace an already existing postmortem of the incident","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"description":"the context the postmortem is generated from","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostmortemRequest"}}}},"responses":{"201":{"description":"the requested postmortem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Postmortem"}}}}}}}}}
```

## GET /incidents/{id}/postmortems/{pId}

> Get a postmortem of an incident.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.9-r.4"},"tags":[{"name":"Incident Postmortems"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"Postmortem":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"status":{"$ref":"#/components/schemas/PostmortemStatus"},"title":{"type":"string"},"editorialStatus":{"$ref":"#/components/schemas/PostmortemEditorialStatus"},"visibility":{"$ref":"#/components/schemas/PostmortemVisibility"},"markdownUrl":{"type":"string","format":"uri","description":"Location of the generated postmortem document."},"linkUrl":{"type":"string","format":"uri","description":"Link to an externally hosted postmortem document."},"markdownContent":{"type":"string","description":"This is an include field, it is not returned unless requested via the include query parameter"},"errorMessage":{"type":"string","readOnly":true,"description":"Set when the status is ERROR."},"creator":{"$ref":"#/components/schemas/User","readOnly":true},"incident":{"$ref":"#/components/schemas/Incident","description":"This is an include field, it is not returned unless requested via the include query parameter"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}},"PostmortemStatus":{"type":"string","readOnly":true,"description":"the generation status of the postmortem","enum":["NONE","REQUESTED","STARTED","CREATED","LINKED","ERROR"]},"PostmortemEditorialStatus":{"type":"string","enum":["AI_DRAFT","DRAFT","IN_REVIEW","PUBLISHED"]},"PostmortemVisibility":{"type":"string","enum":["NONE","PRIVATE","PUBLIC"]},"User":{"required":["email","firstName","lastName"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"timezone":{"$ref":"#/components/schemas/TimeZone"},"position":{"type":"string"},"department":{"type":"string"},"avatarUrl":{"type":"string","readOnly":true},"language":{"type":"string","enum":["de","en"]},"region":{"type":"string","enum":["DE","GB","CH","CN","IN","US","FR","ES","CA","IE"]},"role":{"$ref":"#/components/schemas/Role"},"shiftColor":{"type":"string","description":"Optional hex-color code for the user's shifts in schedules calendars"},"mutedUntil":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"createdAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"updatedAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"}}},"TimeZone":{"type":"string","enum":["Europe/Berlin","America/New_York","America/Los_Angeles","Asia/Istanbul"]},"Role":{"type":"string","enum":["STAKEHOLDER","GUEST","VIEWER","RESPONDER","USER","ADMIN"],"description":"The user's role."},"Incident":{"type":"object","required":["title"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true},"number":{"type":"integer","format":"int64","readOnly":true,"description":"Sequential number of the incident within the account."},"title":{"type":"string"},"summary":{"type":"string"},"status":{"$ref":"#/components/schemas/IncidentStatus"},"severity":{"type":"integer","format":"int32","minimum":1,"maximum":5,"description":"Optional severity in range 1..5."},"declaredAt":{"type":"string","format":"date-time","readOnly":true},"resolvedAt":{"type":"string","format":"date-time","readOnly":true},"declaredBy":{"$ref":"#/components/schemas/User"},"resolvedBy":{"$ref":"#/components/schemas/User"},"channel":{"$ref":"#/components/schemas/IncidentChannel"},"conferenceBridge":{"$ref":"#/components/schemas/ConferenceBridge"},"affectedServices":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"type":"object","properties":{"impact":{"$ref":"#/components/schemas/ServiceStatus"},"service":{"$ref":"#/components/schemas/ServiceNoIncludes"}}}},"responders":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"$ref":"#/components/schemas/IncidentResponder"}},"alertCount":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountJoined":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountTotal":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"}}},"IncidentStatus":{"type":"string","description":"the incident status","enum":["DECLARED","INVESTIGATING","IDENTIFIED","MONITORING","RESOLVED"]},"IncidentChannel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["SLACK","MS_TEAMS","GOOGLE_CHAT"]},"href":{"type":"string","format":"uri"},"groupId":{"type":"string"},"isPrivate":{"type":"boolean"}}},"ConferenceBridge":{"type":"object","properties":{"type":{"type":"string","enum":["ZOOM","GOOGLE_MEET","MS_TEAMS","CUSTOM"]},"href":{"type":"string","format":"uri"},"id":{"type":"string"},"dialIn":{"type":"string"}}},"ServiceStatus":{"type":"string","description":"the service status","enum":["OPERATIONAL","UNDER_MAINTENANCE","DEGRADED","PARTIAL_OUTAGE","MAJOR_OUTAGE"]},"ServiceNoIncludes":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"alias":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceStatus"},"description":{"type":"string"},"oneOpenIncidentOnly":{"type":"boolean"},"showUptimeHistory":{"type":"boolean"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"managedBy":{"$ref":"#/components/schemas/ManagedBy"},"publicStatus":{"$ref":"#/components/schemas/ServiceStatus"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Free-form key-value labels assigned to this service."},"iconUrl":{"type":"string"},"links":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLink"}},"createdBy":{"$ref":"#/components/schemas/ManagedBy"}}},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"ManagedBy":{"type":"object","readOnly":true,"description":"Present when this entity is managed outside of the ilert web app, for example through Terraform, Pulumi or the API. Read-only.","properties":{"type":{"type":"string","enum":["API","TERRAFORM","PULUMI","ILERT"]},"source":{"type":"string","description":"Identifier of the system managing this entity."}}},"ServiceLink":{"type":"object","properties":{"href":{"type":"string","format":"uri"},"text":{"type":"string"}}},"IncidentResponder":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"status":{"type":"string","readOnly":true,"enum":["ADDED","NOTIFIED","JOINED","DECLINED"]},"role":{"type":"string","enum":["INCIDENT_COMMANDER","COMMUNICATIONS_LEAD","ACCOUNTABLE_EXECUTIVE","LEGAL_LEAD","CUSTOMER_SUCCESS_LEAD","SUPPORT_LEAD","FINANCE_LEAD","RESPONDER"]},"notifiedAt":{"type":"string","format":"date-time","readOnly":true},"acceptedAt":{"type":"string","format":"date-time","readOnly":true},"declinedAt":{"type":"string","format":"date-time","readOnly":true},"pagedByUserId":{"type":"integer","format":"int64","readOnly":true}}}}},"paths":{"/incidents/{id}/postmortems/{pId}":{"get":{"tags":["Incident Postmortems"],"summary":"Get a postmortem of an incident.","parameters":[{"name":"id","in":"path","description":"the id of the incident","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pId","in":"path","description":"the id of the postmortem","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"the postmortem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Postmortem"}}}}}}}}}
```

## PUT /incidents/{id}/postmortems/{pId}

> Update a postmortem of an incident.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.9-r.4"},"tags":[{"name":"Incident Postmortems"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"Postmortem":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"status":{"$ref":"#/components/schemas/PostmortemStatus"},"title":{"type":"string"},"editorialStatus":{"$ref":"#/components/schemas/PostmortemEditorialStatus"},"visibility":{"$ref":"#/components/schemas/PostmortemVisibility"},"markdownUrl":{"type":"string","format":"uri","description":"Location of the generated postmortem document."},"linkUrl":{"type":"string","format":"uri","description":"Link to an externally hosted postmortem document."},"markdownContent":{"type":"string","description":"This is an include field, it is not returned unless requested via the include query parameter"},"errorMessage":{"type":"string","readOnly":true,"description":"Set when the status is ERROR."},"creator":{"$ref":"#/components/schemas/User","readOnly":true},"incident":{"$ref":"#/components/schemas/Incident","description":"This is an include field, it is not returned unless requested via the include query parameter"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}},"PostmortemStatus":{"type":"string","readOnly":true,"description":"the generation status of the postmortem","enum":["NONE","REQUESTED","STARTED","CREATED","LINKED","ERROR"]},"PostmortemEditorialStatus":{"type":"string","enum":["AI_DRAFT","DRAFT","IN_REVIEW","PUBLISHED"]},"PostmortemVisibility":{"type":"string","enum":["NONE","PRIVATE","PUBLIC"]},"User":{"required":["email","firstName","lastName"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"timezone":{"$ref":"#/components/schemas/TimeZone"},"position":{"type":"string"},"department":{"type":"string"},"avatarUrl":{"type":"string","readOnly":true},"language":{"type":"string","enum":["de","en"]},"region":{"type":"string","enum":["DE","GB","CH","CN","IN","US","FR","ES","CA","IE"]},"role":{"$ref":"#/components/schemas/Role"},"shiftColor":{"type":"string","description":"Optional hex-color code for the user's shifts in schedules calendars"},"mutedUntil":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"createdAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"},"updatedAt":{"type":"string","description":"Date in ISO-8601","format":"date-time"}}},"TimeZone":{"type":"string","enum":["Europe/Berlin","America/New_York","America/Los_Angeles","Asia/Istanbul"]},"Role":{"type":"string","enum":["STAKEHOLDER","GUEST","VIEWER","RESPONDER","USER","ADMIN"],"description":"The user's role."},"Incident":{"type":"object","required":["title"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true},"number":{"type":"integer","format":"int64","readOnly":true,"description":"Sequential number of the incident within the account."},"title":{"type":"string"},"summary":{"type":"string"},"status":{"$ref":"#/components/schemas/IncidentStatus"},"severity":{"type":"integer","format":"int32","minimum":1,"maximum":5,"description":"Optional severity in range 1..5."},"declaredAt":{"type":"string","format":"date-time","readOnly":true},"resolvedAt":{"type":"string","format":"date-time","readOnly":true},"declaredBy":{"$ref":"#/components/schemas/User"},"resolvedBy":{"$ref":"#/components/schemas/User"},"channel":{"$ref":"#/components/schemas/IncidentChannel"},"conferenceBridge":{"$ref":"#/components/schemas/ConferenceBridge"},"affectedServices":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"type":"object","properties":{"impact":{"$ref":"#/components/schemas/ServiceStatus"},"service":{"$ref":"#/components/schemas/ServiceNoIncludes"}}}},"responders":{"type":"array","description":"This is an include field, it is not available in the list resource","items":{"$ref":"#/components/schemas/IncidentResponder"}},"alertCount":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountJoined":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"},"responderCountTotal":{"type":"integer","format":"int32","readOnly":true,"description":"This is an include field, it is not available in the list resource"}}},"IncidentStatus":{"type":"string","description":"the incident status","enum":["DECLARED","INVESTIGATING","IDENTIFIED","MONITORING","RESOLVED"]},"IncidentChannel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["SLACK","MS_TEAMS","GOOGLE_CHAT"]},"href":{"type":"string","format":"uri"},"groupId":{"type":"string"},"isPrivate":{"type":"boolean"}}},"ConferenceBridge":{"type":"object","properties":{"type":{"type":"string","enum":["ZOOM","GOOGLE_MEET","MS_TEAMS","CUSTOM"]},"href":{"type":"string","format":"uri"},"id":{"type":"string"},"dialIn":{"type":"string"}}},"ServiceStatus":{"type":"string","description":"the service status","enum":["OPERATIONAL","UNDER_MAINTENANCE","DEGRADED","PARTIAL_OUTAGE","MAJOR_OUTAGE"]},"ServiceNoIncludes":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"alias":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceStatus"},"description":{"type":"string"},"oneOpenIncidentOnly":{"type":"boolean"},"showUptimeHistory":{"type":"boolean"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"managedBy":{"$ref":"#/components/schemas/ManagedBy"},"publicStatus":{"$ref":"#/components/schemas/ServiceStatus"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Free-form key-value labels assigned to this service."},"iconUrl":{"type":"string"},"links":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLink"}},"createdBy":{"$ref":"#/components/schemas/ManagedBy"}}},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"ManagedBy":{"type":"object","readOnly":true,"description":"Present when this entity is managed outside of the ilert web app, for example through Terraform, Pulumi or the API. Read-only.","properties":{"type":{"type":"string","enum":["API","TERRAFORM","PULUMI","ILERT"]},"source":{"type":"string","description":"Identifier of the system managing this entity."}}},"ServiceLink":{"type":"object","properties":{"href":{"type":"string","format":"uri"},"text":{"type":"string"}}},"IncidentResponder":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"status":{"type":"string","readOnly":true,"enum":["ADDED","NOTIFIED","JOINED","DECLINED"]},"role":{"type":"string","enum":["INCIDENT_COMMANDER","COMMUNICATIONS_LEAD","ACCOUNTABLE_EXECUTIVE","LEGAL_LEAD","CUSTOMER_SUCCESS_LEAD","SUPPORT_LEAD","FINANCE_LEAD","RESPONDER"]},"notifiedAt":{"type":"string","format":"date-time","readOnly":true},"acceptedAt":{"type":"string","format":"date-time","readOnly":true},"declinedAt":{"type":"string","format":"date-time","readOnly":true},"pagedByUserId":{"type":"integer","format":"int64","readOnly":true}}}}},"paths":{"/incidents/{id}/postmortems/{pId}":{"put":{"tags":["Incident Postmortems"],"summary":"Update a postmortem of an incident.","parameters":[{"name":"id","in":"path","description":"the id of the incident","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pId","in":"path","description":"the id of the postmortem","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"description":"the postmortem","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Postmortem"}}}},"responses":{"200":{"description":"the updated postmortem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Postmortem"}}}}}}}}}
```

## DELETE /incidents/{id}/postmortems/{pId}

> Delete a postmortem of an incident.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.9-r.4"},"tags":[{"name":"Incident Postmortems"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}}},"paths":{"/incidents/{id}/postmortems/{pId}":{"delete":{"tags":["Incident Postmortems"],"summary":"Delete a postmortem of an incident.","parameters":[{"name":"id","in":"path","description":"the id of the incident","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pId","in":"path","description":"the id of the postmortem","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"no content"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ilert.com/developer-docs/rest-api/api-reference/incident-postmortems.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
