---
title: "Create postmortem template"
method: POST
path: "/api/v2/incidents/config/postmortem-templates"
tags: ["Incidents"]
---

# Create postmortem template

`POST /api/v2/incidents/config/postmortem-templates`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/incidents/config/postmortem-templates`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Create a new postmortem template for incidents.

## Request body

- PostmortemTemplateRequest: Request body for creating or updating a postmortem template.
  - `data` PostmortemTemplateDataRequest, required: Data object for creating or updating a postmortem template.
    - `attributes` PostmortemTemplateAttributesRequest, required: Attributes for creating or updating a postmortem template.
      - `name` string, required: The name of the template
    - `type` 'postmortem_template', required: Postmortem template resource type

## Response `201`

Created

- PostmortemTemplateResponse: Response containing a single postmortem template.
  - `data` PostmortemTemplateDataResponse, required: Data object for a postmortem template returned in a response.
    - `attributes` PostmortemTemplateAttributesResponse, required: Attributes of a postmortem template returned in a response.
      - `createdAt` string, date-time, required: When the template was created
      - `modifiedAt` string, date-time, required: When the template was last modified
      - `name` string, required: The name of the template
    - `id` string, required: The ID of the template
    - `type` 'postmortem_template', required: Postmortem template resource type

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `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/da68bf029e4c?raw)
