Skip to content

Upload an attachment to an invoice

POST
/api/public/v1/invoices/{invoice_id}/attachments
Code sample: cURL
curl --request POST \
--url 'https://api.getzutax.com/api/public/v1/invoices/f3df2967-7cbe-4cca-8c8c-975ee2f6857f/attachments' \
--header 'Authorization: Bearer <token>'

Multipart file upload. Max 25 MB per file. The file content is persisted to object storage; the response returns the persisted Attachment metadata. Idempotency-Key is honoured.

invoice_id
required
Invoice Id
string format: uuid
Media type multipart/form-data
Body_attach_file_to_invoice_api_public_v1_invoices__invoice_id__attachments_post
object
file
required
File
string format: binary

Successful Response

Media type application/json
AttachmentResponse

Stable response shape for public-API attachment endpoints.

object
id
required
Id
string format: uuid
invoice_id
Any of:
string format: uuid
filename
required
Filename
string
mime_type
required
Mime Type
string
size_bytes
required
Size Bytes
integer
attachment_type
required
Attachment Type
string
Allowed values: invoice_pdf invoice_xml supporting_document image signature certificate other
description
Any of:
string
checksum_sha256
Any of:
string
created_at
required
Created At
string format: date-time
Examples
Example Sample response

201 response example

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"filename": "string",
"mime_type": "string",
"size_bytes": 1,
"attachment_type": "invoice_pdf",
"description": "string",
"checksum_sha256": "string",
"created_at": "2026-02-11T10:00:00Z"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examples
Example Sample response

422 response example

{
"detail": [
{
"loc": [],
"msg": "string",
"type": "string"
}
]
}