---
title: "Get an AI-generated incident postmortem"
method: POST
path: "/api/v2/incidents/{incident_id}/ai/postmortem"
tags: ["Incidents"]
---

# Get an AI-generated incident postmortem

`POST /api/v2/incidents/{incident_id}/ai/postmortem`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `incident_write`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/incidents/:incident_id/ai/postmortem/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate an AI postmortem for an incident.

## Path parameters

- `incident_id` string, required

## Response `200`

OK

- IncidentAIPostmortemResponse: Response with an AI-generated incident postmortem.
  - `data` IncidentAIPostmortemDataResponse, required: AI postmortem data in a response.
    - `attributes` IncidentAIPostmortemDataAttributesResponse, required: Attributes of an AI-generated incident postmortem.
      - `action_items` string: Action items to prevent recurrence.
      - `customer_impact` string: The impact of the incident on customers.
      - `executive_summary` string: An executive summary of the incident.
      - `key_timeline` string: Key timeline events during the incident.
      - `lessons_learned` string: Lessons learned from the incident.
      - `system_overview` string: An overview of the affected systems.
    - `id` string, uuid, required: The incident identifier.
    - `type` 'get_incident_ai_postmortem_response', required: AI postmortem response resource type.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
