Attachments API¶
Attach supporting files — such as a purchase order or a signed contract — to an invoice. An attachment links an uploaded file to a document. Upload the file first via the Files API, then reference the returned file ID here.
List Attachments¶
Returns all attachments for a document, newest first.
Response:
{
"data": [
{
"id": "att_01XYZ",
"invoice_id": "inv_01ABC",
"file_id": "fil_01ABC",
"label": "Purchase Order",
"created_at": "2026-07-20T10:00:00Z"
}
]
}
Try it
Create Attachment¶
Links a previously uploaded file to the document. Upload the file with POST /api/v1/files first (see the Files API), then pass its ID as file_id. A file ID that does not exist returns a 404 not_found error.
Request:
| Field | Required | Description |
|---|---|---|
file_id |
Yes | ID of an uploaded file to attach |
label |
No | Human-readable label for the attachment |
Response 200 OK:
{
"data": {
"id": "att_01XYZ",
"invoice_id": "inv_01ABC",
"file_id": "fil_01ABC",
"label": "Purchase Order",
"created_at": "2026-07-20T10:00:00Z"
}
}
Try it
Delete Attachment¶
Removes the link between the file and the document. The underlying file itself is not deleted.
Response: