Get a KYB document upload URL
curl --request POST \
--url https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Upload URL generated successfully",
"data": {
"file_id": "f6c04a3e-3cdb-4b07-87e5-7a7c0d8b1c10",
"url": "https://s3.amazonaws.com/...?X-Amz-Signature=...",
"headers": {
"x-amz-acl": "private"
}
}
}KYB documents (business customers)
Get a KYB document upload URL
Two-step upload, step one. Returns a file_id, a presigned url, and the headers required to PUT the file directly to S3. The URL is valid for 5 minutes and accepts a single PUT.
Step two: call POST /api/external/customer/{customer}/document with the same file_id to register the document.
Max file size 25 MB. Allowed types: application/pdf, image/jpeg, image/png. Files outside these limits are rejected at registration time.
The customer must be of type business. Individual customers do not use this endpoint — they use the legacy file flow (POST /api/external/file/get-presigned-url followed by POST /api/external/customer/{id}/files).
Required scope: customer:write.
POST
/
api
/
external
/
customer
/
{customer}
/
document
/
presigned-url
Get a KYB document upload URL
curl --request POST \
--url https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.blaaiz.com/api/external/customer/{customer}/document/presigned-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Upload URL generated successfully",
"data": {
"file_id": "f6c04a3e-3cdb-4b07-87e5-7a7c0d8b1c10",
"url": "https://s3.amazonaws.com/...?X-Amz-Signature=...",
"headers": {
"x-amz-acl": "private"
}
}
}Was this page helpful?