> 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-postmortem-links.md).

# Incident Postmortem Links

## POST /incidents/{id}/postmortem-links

> Link an externally hosted postmortem document to an incident.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.9-r.4"},"tags":[{"name":"Incident Postmortem Links"}],"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","it","fr","es"],"description":"Language of the user. `it`, `fr` and `es` only apply to notifications; the web app is shown in English for these languages."},"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}/postmortem-links":{"post":{"tags":["Incident Postmortem Links"],"summary":"Link an externally hosted postmortem document to 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 postmortem, containing at least a linkUrl","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Postmortem"}}}},"responses":{"201":{"description":"the linked postmortem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Postmortem"}}}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
