curl --request POST \
--url https://api.next.orenda.finance/v1/customers/{customerId}/documents/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collection": "kyc",
"documentType": "confirmationOfResidenceDocument",
"contentType": "application/pdf"
}
'{
"success": true,
"data": {
"uploadUrl": "https://…/kyc-documents/…/document/confirmationOfResidenceDocument/1767225600000.pdf?…",
"bucket": "orenda-kyc-documents",
"key": "kyc-documents/…/document/confirmationOfResidenceDocument/1767225600000.pdf",
"method": "PUT",
"contentType": "application/pdf",
"expiresInSeconds": 900
}
}Document presign URL
Upload or download verification documents via short-lived URLs.
curl --request POST \
--url https://api.next.orenda.finance/v1/customers/{customerId}/documents/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collection": "kyc",
"documentType": "confirmationOfResidenceDocument",
"contentType": "application/pdf"
}
'{
"success": true,
"data": {
"uploadUrl": "https://…/kyc-documents/…/document/confirmationOfResidenceDocument/1767225600000.pdf?…",
"bucket": "orenda-kyc-documents",
"key": "kyc-documents/…/document/confirmationOfResidenceDocument/1767225600000.pdf",
"method": "PUT",
"contentType": "application/pdf",
"expiresInSeconds": 900
}
}{customerId}, use application.customerId from
GET /v2/applications. For a new application it’s the same value as
applicationId. The id must belong to the signed-in user.
- Upload
- Download
kyc_type: "documentUrls". It’s three calls:1. Presign. Send collection (kyc for a KYC form, kyb for a KYB form), the
field’s key as documentType, and the file’s contentType:{ "collection": "kyc", "documentType": "confirmationOfResidenceDocument", "contentType": "application/pdf" }
documentType must be the schema field’s key. The file is stored under it, so
presign separately for each field and submit each file only as that field’s answer.Always send contentType. Its subtype becomes the file’s extension
(application/pdf → .pdf, image/jpeg → .jpeg, image/png → .png), and the
submit checks that extension against the field’s formats. Without contentType the
file has no usable extension and the submit rejects it.The response:{
"uploadUrl": "https://…",
"bucket": "orenda-kyc-documents",
"key": "kyc-documents/…/document/confirmationOfResidenceDocument/1767225600000.pdf",
"method": "PUT",
"contentType": "application/pdf",
"expiresInSeconds": 900
}
PUT the file’s bytes to uploadUrl with the same Content-Type header.
Don’t send your bearer token on this call; the URL carries its own authorisation.3. Submit. Answer the field with s3://<bucket>/<key> from the presign response, in
Submit KYC data or Submit KYB data:{
"step-2": [
{ "key": "confirmationOfResidence", "data": "Yes" },
{ "key": "confirmationOfResidenceDocument", "data": "s3://orenda-kyc-documents/kyc-documents/…/document/confirmationOfResidenceDocument/1767225600000.pdf" }
]
}
validation.minFileSize and validation.maxFileSize, which are in kilobytes
(5120 is 5 MB).For a field with multiple: true, presign and upload each file separately, then submit
an array of s3:// URLs.applicationId
plus either the document’s s3Url (the s3://… URL you submitted), or its
collection + key:{ "applicationId": "app_123", "collection": "kyc", "key": "kyc-documents/…/passport.pdf" }
GET the returned downloadUrl before expiresAt.expiresInSeconds is the URL lifetime in seconds, as a positive whole number.
Zero, negative and fractional values are rejected with a 400. Values from 1 to 59 are raised to
60, values above 3600 are lowered to 3600, and the default is 900. Request the presign right
before the transfer.kyc_type: "documents" don’t use this endpoint, and they can’t currently be
submitted through the API. See Answer encodings.Authorizations
The user's access_token from authentication. The program and environment (sandbox/prod) are read from the token.
Path Parameters
The application's customerId from GET /v2/applications. For a new application it is the same value as applicationId.
Body
Upload: required. kyc for a KYC form, kyb for a KYB form. Download by key: required.
kyc, kyb Upload: required. The key of the schema field the file answers, e.g. confirmationOfResidenceDocument. The file is stored under it.
Upload: send it. The MIME type the file will be PUT with, e.g. application/pdf. Its subtype becomes the stored file's extension (application/pdf → .pdf, image/jpeg → .jpeg), which the submit checks against the field's formats. Defaults to application/octet-stream, which no field accepts.
Download: required. The application the document belongs to.
Download: the document's storage URL, s3://<bucket>/<key>, as submitted in the form. Use this or collection + key.
Download: the document's storage key. Send with collection.
URL lifetime in seconds, as a positive whole number. Zero, negative and fractional values are rejected with a 400. Values from 1 to 59 are raised to 60, values above 3600 are lowered to 3600, and the default is 900.
x >= 1