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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” invoice_id
required
Invoice Id
string format: uuid
Request Body required
Section titled “Request Body required ” 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
Responses
Section titled “ Responses ”Successful Response
Media type application/json
AttachmentResponse
Stable response shape for public-API attachment endpoints.
object
id
required
Id
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
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>
ValidationErrorobject
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" } ]}