---
title: "Create incident attachment"
method: POST
path: "/api/v2/incidents/{incident_id}/attachments"
tags: ["Incidents"]
---

# Create incident attachment

`POST /api/v2/incidents/{incident_id}/attachments`

Create an incident attachment.

## Path parameters

- `incident_id` string, required

## Query parameters

- `include` string

## Request body

- CreateAttachmentRequest — Create request for an attachment.
  - `data` CreateAttachmentRequestData — Attachment data for a create request.
    - `attributes` CreateAttachmentRequestDataAttributes — The attributes for creating an attachment.
      - `attachment` CreateAttachmentRequestDataAttributesAttachment — The attachment object for creating an attachment.
        - `documentUrl` string — The URL of the attachment.
        - `title` string — The title of the attachment.
      - `attachment_type` 'postmortem' | 'link' — The type of the attachment.
    - `id` string — The unique identifier of the attachment.
    - `type` 'incident_attachments', required — The incident attachment resource type.

## Response `201`

Created

- Attachment — An attachment response containing the attachment data and related objects.
  - `data` AttachmentData — Attachment data from a response.
    - `attributes` AttachmentDataAttributes, required — The attachment's attributes.
      - `attachment` AttachmentDataAttributesAttachment — The attachment object.
        - `documentUrl` string — The URL of the attachment.
        - `title` string — The title of the attachment.
      - `attachment_type` 'postmortem' | 'link' — The type of the attachment.
      - `modified` string, date-time — Timestamp when the attachment was last modified.
    - `id` string, required — The unique identifier of the attachment.
    - `relationships` AttachmentDataRelationships, required — The attachment's resource relationships.
      - `incident` RelationshipToIncident — Relationship to incident.
        - `data` RelationshipToIncidentData, required — Relationship to incident object.
          - `id` string, required — A unique identifier that represents the incident.
          - `type` 'incidents', required — Incident resource type.
      - `last_modified_by_user` RelationshipToUser — Relationship to user.
        - `data` RelationshipToUserData, required — Relationship to user object.
          - `id` string, required — A unique identifier that represents the user.
          - `type` 'users', required — Users resource type.
    - `type` 'incident_attachments', required — The incident attachment resource type.
  - `included` AttachmentIncluded[] — A list of related objects included in the response.
    - `attributes` IncidentUserAttributes — Attributes of user object returned by the API.
      - `email` string — Email of the user.
      - `handle` string — Handle of the user.
      - `icon` string — URL of the user's icon.
      - `name` string, nullable — Name of the user.
      - `uuid` string — UUID of the user.
    - `id` string — ID of the user.
    - `type` 'users' — Users resource type.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/versions/da68bf029e4c/schema)
