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

# Remove an estimate PDF attachment

> Remove an estimate PDF attachment through the public API.

Use an attachment id returned by the [attachment list](/api/estimates/pdf-attachments-list). Removal preserves the other attachments and excludes the removed PDF from future estimate downloads. You need invoice-module write access.

The same [editability rules](/api/estimates/pdf-attachments-add) apply to uploads and removals.


## OpenAPI

````yaml DELETE /v1/estimates/{estimateId}/pdf-attachments/{attachmentId}
openapi: 3.1.0
info:
  title: infinity.swiss Open API
  version: '1.0'
  summary: ''
servers:
  - url: https://api.infinity.swiss
security:
  - apiKey: []
paths:
  /v1/estimates/{estimateId}/pdf-attachments/{attachmentId}:
    parameters:
      - name: estimateId
        in: path
        required: true
        schema:
          type: string
      - name: attachmentId
        in: path
        required: true
        schema:
          type: string
    delete:
      summary: Remove an estimate PDF attachment
      description: >-
        Removes the attachment and its pages from future estimate PDFs. Requires
        invoice-module write access and an editable estimate.
      operationId: remove-estimate-pdf-attachment-v1
      responses:
        '200':
          description: The attachment was removed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: PDF attachment removed successfully
        '401':
          $ref: '#/components/responses/Unauthorised'
        '403':
          $ref: '#/components/responses/InvoiceAttachmentForbidden'
        '404':
          description: >-
            The estimate is missing, belongs to another organisation, or the
            attachment does not belong to the estimate.
components:
  responses:
    Unauthorised:
      description: >-
        An unauthorised request was submitted. You may be using an incorrect or
        expired API token, or are attempting to access a document outside of the
        scope of the token.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                x-stoplight:
                  id: 08hkw8ukmi2lp
                description: Specific error code
          examples:
            Unauthorised request:
              value:
                code: general/unauthorised
    InvoiceAttachmentForbidden:
      description: >-
        Invoice-module access is missing, or attachments are read-only. Issued
        invoices and estimates become read-only when annulled, paid, outside an
        editable fiscal year, or in a settled VAT period. Draft attachments
        remain editable.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                enum:
                  - rest-api/insufficient-scope
                  - customer-invoices/attachments-read-only
  securitySchemes:
    apiKey:
      name: x-api-token
      type: apiKey
      in: header
      description: >-
        API token for authentication. Obtain from your Infinity account
        settings.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.