Upload File
POST/api/file-uploads
Upload a file. Note that the file must always be the last parameter in the request body.
Example request using curl:
curl 'https://test.immersve.com/api/file-uploads' \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer <TOKEN>' \
-F 'purpose="kyc-doc-upload"' \
-F 'accountId="accountId"' \
-F 'file=@"/path/to/file"'
Request
- multipart/form-data
Body
Possible values: [kyc-doc-upload
]
The purpose this document is being uploaded for.
Id of the account owning the file upload.
The file being uploaded.
Responses
- 200
- 403
File successfully uploaded.
- application/json
- Schema
- Example (from schema)
Schema
Id of the file.
Possible values: [kyc-doc-upload
]
The purpose the file is related to.
Possible values: [live
, test
]
The resource liveness mode.
Id of the account owning the file upload.
Name of file.
Size of the file in bytes.
The type of file.
Possible values: [created
, deleting
, deleted
]
The current status of the file upload.
Date when the file will be considered expired and subsequently deleted.
{
"id": "1234567890",
"purpose": "kyc-doc-upload",
"liveness": "live",
"accountId": "057aa15913a57f50577234c8426534c0",
"fileName": "passport_scan.jpg",
"fileSize": 284573,
"mimeType": "application/pdf",
"status": "created",
"expiresAt": "2025-04-30"
}
Subject is not allowed to perform the action with the reason stated in the errorCode
FILE_TOO_LARGE The uploaded file exceeds the maximum size of 10mb.
FILE_TYPE_INVALID The uploaded file does not match the acceptable MIME types.
- application/json
- Schema
- Example (from schema)
Schema
{
"statusCode": 403,
"statusName": "Forbidden",
"errorCode": "FORBIDDEN",
"reason": "Unauthorized"
}