Skip to main content
POST
Upload an attachment

Authorizations

api-key
string
header
required

Headers

Melio-Entity-Id
string
required

Entity the request operates on — an entity id (ent_<uuid>) or me (the partner's sole entity).

Body

multipart/form-data
file
file
required

The document: PDF, JPEG or PNG, up to 8 MB.

Response

Attachment stored.

A stored document. The bytes are write-only through this API; what comes back is the id to reference from a payment plus enough metadata to recognise which file it was.

id
string
required

Attachment id (att_). Pass as attachmentId on POST /payments.

Example:

"att_9f8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"

fileName
string
required

The filename as uploaded.

Example:

"invoice-2043.pdf"

mimeType
enum<string>
required

The document's media type.

Available options:
application/pdf,
image/jpeg,
image/png
byteSize
integer
required

Size of the uploaded document in bytes.

Example:

182734

createdAt
string<date-time>
required

When the document was stored.