---
title: "Add Attachment"
method: POST
path: "/sales-invoices/{invoice_id}/attachments"
---

# Add Attachment

`POST /sales-invoices/{invoice_id}/attachments`

## Request

- Base URL: `https://open-api.stag-v2.paper.id/api/v1`
- URL: `https://open-api.stag-v2.paper.id/api/v1/sales-invoices/{invoice_id}/attachments`
- Auth: API key in header `client_id` and API key in header `client_secret`

Uploads a single file and links it to an existing Sales Invoice. The endpoint accepts one file per request. To attach several documents to the same invoice, call it once per file.

## Path parameters

- `invoice_id` string, required

## Headers

- `client_id` string, required
- `client_secret` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file to upload. Maximum size 10 MB. Executable formats such as .exe are rejected.

## Response `200`

200

- object
  - `status_code` integer
  - `data` object
    - `document_id` string: Identifier of the linked document (invoice_id). Pass this value to the Delete Attachment endpoint as the invoice_id.
    - `document_type` string: The document type e.g. Sales Invoice
    - `attachment_id` string: Identifier of the link between the attachment and the invoice. Pass this value to the Delete Attachment endpoint.
    - `file_name` string: File name as stored by Paper, taken from the uploaded file.
    - `url` string: Location of the stored file.
    - `size_bytes` integer: Size of the stored file in bytes.
  - `message` string: Human-readable outcome of the request.

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `2b6aa3c43ca0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/paper/apis/version-1/changes/sales-invoices/:invoice_id/attachments/post.md)

---

[API](https://skmtc.dev/paper/apis/version-1.md) - [All operations](https://skmtc.dev/paper/apis/version-1/llms.txt) - [OpenAPI document](https://skmtc.dev/paper/apis/version-1/revisions/2b6aa3c43ca0?raw)
