---
updatedAt: 2026-08-13T10:15:40.000Z
agentTools:
  projectIndex: https://open-api-paper-id.readme.io/llms.txt
---

# Delete Attachment

Removes an attachment from a Sales Invoice. Once deleted the file no longer appears in the invoice's attachments array and its URL stops resolving. The invoice itself and its line items are unaffected.  Retrieve the attachment_id from the Add Attachment response or from the data.attachments array returned by Retrieve a Sales Invoice Details.

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "version-1",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://open-api.stag-v2.paper.id/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "client_id"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "client_secret"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/sales-invoices/{invoice_id}/attachments/{attachment_id}": {
      "delete": {
        "summary": "Delete Attachment",
        "description": "Removes an attachment from a Sales Invoice. Once deleted the file no longer appears in the invoice's attachments array and its URL stops resolving. The invoice itself and its line items are unaffected.  Retrieve the attachment_id from the Add Attachment response or from the data.attachments array returned by Retrieve a Sales Invoice Details.",
        "operationId": "create-sales-invoice-1-1",
        "parameters": [
          {
            "name": "client_id",
            "in": "header",
            "description": "Your Client ID credential",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_secret",
            "in": "header",
            "description": "Your Client secret credential",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Unique identifier of the Sales Invoice that will receive the file. Returned by the Create Sales Invoice and List Sales Invoices endpoints."
          },
          {
            "in": "path",
            "name": "attachment_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Unique identifier of the attachment to remove."
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "status_code": 200,
                      "message": "Attachment deleted successfully.",
                      "data": {
                        "document_id": "4203fb44-ee8d-39cd-6e27-f2523e4de3db",
                        "attachment_id": "6a74c1a8-9c9e-498f-a902-91e73b7c8bc3"
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status_code": {
                      "type": "integer",
                      "example": 201,
                      "default": 0,
                      "description": "HTTP status of the operation."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "document_id": {
                          "type": "string",
                          "example": "aad61dca-9be0-4663-9e9a-dd8d76c0b077",
                          "description": "Identifier of the linked document (invoice_id). Pass this value to the Delete Attachment endpoint as the invoice_id."
                        },
                        "attachment_id": {
                          "type": "string",
                          "example": "get.paper.id/21d1rdK",
                          "description": "Identifier of the link between the attachment and the invoice. Pass this value to the Delete Attachment endpoint."
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable outcome of the request."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error_code": "not_found",
                      "errors": {
                        "issue": "attachment not found"
                      },
                      "message": "Attachment 6a74c1a8-9c9e-498f-a902-91e73b7c8bc3 not found.",
                      "status_code": 404
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "x-internal": false,
        "x-readme": {
          "code-samples": [
            {
              "code": "curl --location --request DELETE 'https://open-api.paper.id/api/v1/sales-invoices/4203fb44-ee8d-39cd-6e27-f2523e4de3db/attachments/6a74c1a8-9c9e-498f-a902-91e73b7c8bc3' \\\n  --header 'client_id: <your_client_id>' \\\n  --header 'client_secret: <your_client_secret>'",
              "language": "shell",
              "name": ""
            }
          ],
          "samples-languages": [
            "shell"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```