Skip to Content
UtilsUpload file

Upload file

POST /api/uploads

Standalone file upload (max ~50MB). Response data.key is the S3 object key, copy into utilityBill / idCard (and other doc fields) on POST /api/loans or POST /api/loans/batch.

Also returns a short-lived url for preview only, persist the key, not the URL.

Headers

HeaderValue
Acceptapplication/json
AuthorizationBearer {parentAccessToken}

No Content-Type header, the browser sets its own multipart boundary for you.

Form fields

FieldDescription
fileRequired, PDF or image.

Response 200

{ "success": true, "message": "Request successful", "data": { "key": "uploads/example-utility-bill.pdf", "url": "https://example.s3.amazonaws.com/uploads/example-utility-bill.pdf?X-Amz-Expires=..." }, "errors": [], "statusCode": 200 }

Try it

POST/api/uploads