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

# Update incident attachment

`PATCH /api/v2/incidents/{incident_id}/attachments/{attachment_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/incidents/{incident_id}/attachments/{attachment_id}`
- 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`

## Path parameters

- `incident_id` string, required
- `attachment_id` string, required

## Query parameters

- `include` string

## Request body

- PatchAttachmentRequest: Request to update an attachment.
  - `data` PatchAttachmentRequestData: Attachment data for an update request.
    - `attributes` PatchAttachmentRequestDataAttributes: The attributes for updating an attachment.
      - `attachment` PatchAttachmentRequestDataAttributesAttachment: The updated attachment object.
        - `documentUrl` string: The updated URL for the attachment.
        - `title` string: The updated title for the attachment.
    - `id` string: The unique identifier of the attachment.
    - `type` 'incident_attachments', required: The incident attachment resource type.

## Response `200`

OK

- 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
- `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/da68bf029e4c?raw)
