---
title: "Upload invoice attachment"
method: POST
path: "/v3/attachments/invoices/{invoiceId}"
tags: ["attachments"]
---

# Upload invoice attachment

`POST /v3/attachments/invoices/{invoiceId}`

Upload an attachment for an existing invoice. The file size limit is 6 MB.

**Note**: When you upload an attachment, it takes a few minutes for BILL to complete the upload process.

See [Documents and attachments](https://developer.bill.com/docs/documents-attachments) in the Guides section for more information, sample requests, and responses.

## Path parameters

- `invoiceId` string, required — BILL-generated ID of the invoice. The value begins with `00e`.

## Query parameters

- `name` string, required — File name with extension. For example, to upload a PDF attachment titled `business_details`, set `name` as `business_details.pdf`.
- `replaceInvoicePdf` boolean, nullable — Set as `true` to replace the existing invoice PDF with a new PDF attachment. The default value is `false`. The invoice PDF is sent as an email attachment when you send an invoice to a customer. The invoice PDF also appears when the customer clicks the invoice payment link to complete the invoice payment. See [Get invoice payment link](https://developer.bill.com/reference/getpaymentlink) to learn more about invoice payment links. **Note**: You can get the list of invoice attachments with `GET /v3/attachments/invoices/{invoiceId}`. All the attachments in the list (including the invoice PDF) are sent as email attachments when you send the invoice to the customer.

## Headers

- `sessionId` string, nullable — API session ID generated with `/v3/login`
- `devKey` string, nullable — Developer key generated with your BILL developer account

## Response `200`

Upload invoice attachment response

- AttachmentResponseDto — Attachments response.
  - `id` string — BILL-generated ID of the attachment. The value begins with `att`.
  - `name` string — Attachment name
  - `createdTime` string, date-time — Created date and time
  - `downloadLink` string — URL for downloading the attachment. Use the URL in a GET request to download the attachment.

## Other responses

- `4XX` — List of errors.
- `5XX` — List of errors.

---

[API](https://skmtc.net/bill/apis/bill-v3-api.md) · [All operations](https://skmtc.net/bill/apis/bill-v3-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bill/bill-v3-api/revisions/0483350c434e/schema)
