> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unlink Attachment From Note

> Remove the link between an attachment and a note without deleting the attachment.

The attachment remains in the patient's gallery but is no longer associated with the note.
Removes links for all versions in the same parent_attachment_id chain.



## OpenAPI

````yaml delete /attachments/{attachment_id}/unlink/{note_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /attachments/{attachment_id}/unlink/{note_id}:
    delete:
      tags:
        - Attachments
      summary: Unlink Attachment From Note
      description: >-
        Remove the link between an attachment and a note without deleting the
        attachment.


        The attachment remains in the patient's gallery but is no longer
        associated with the note.

        Removes links for all versions in the same parent_attachment_id chain.
      operationId: >-
        unlink_attachment_from_note_attachments__attachment_id__unlink__note_id__delete
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: attachment_id
          in: path
          required: true
          schema:
            type: string
            title: Attachment Id
        - name: note_id
          in: path
          required: true
          schema:
            type: string
            title: Note Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: >-
                  Response Unlink Attachment From Note Attachments  Attachment
                  Id  Unlink  Note Id  Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````