multipart/form-data. The request includes metadata fields plus a required file field named file.
You need DOCUMENTS_WRITE to upload or delete documents. You need DOCUMENTS_READ to request signed download URLs.
Multipart fields
Allowed MIME types are
application/pdf, image/jpeg, image/png, and image/webp. The maximum file size is 20 MB.
Common entity targets
Upload a payment invoice
Payment creation requires at least one document with categoryINVOICE. If the payment does not exist yet, upload the invoice with entityType=PAYMENT and entityId=pending.
Upload a customer document
Use the customer ID returned byPOST /api/v1/customers.
Read or delete a document
UseGET /api/v1/documents/{id} to receive a signed download URL.
DELETE /api/v1/documents/{id} only for documents that should no longer be used by a customer or payment flow. A document can be deleted only while the record it belongs to can still be changed: a payment document not yet attached to a payment (entityId=pending) or whose payment is in CORRECTION_NEEDED, a beneficiary document while the beneficiary is in CORRECTION_REQUESTED, and a customer document while the customer is in DRAFT or CORRECTION_REQUESTED. Every other delete is refused with 400, as is deleting a file that was sent as a support ticket or RFI attachment. An upload to an existing payment is accepted only while the payment is in PENDING_REVIEW or CORRECTION_NEEDED; in any other status it is refused with 400.
For full document schemas, open the API Reference.