Upload verification document
curl --request POST \
--url https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "IDENTITY_PROOF",
"content": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB..."
}
'import requests
url = "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents"
payload = {
"type": "IDENTITY_PROOF",
"content": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'IDENTITY_PROOF', content: 'data:image/jpeg;base64,/9j/4AAQSkZJRgAB...'})
};
fetch('https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'IDENTITY_PROOF',
'content' => 'data:image/jpeg;base64,/9j/4AAQSkZJRgAB...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents"
payload := strings.NewReader("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgAB...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgAB...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgAB...\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "<string>",
"type": "IDENTITY_PROOF",
"status": "CREATED",
"refused_reason": "<string>",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Verifications
Upload Verification Document
Uploads a KYC document for a verification. The content field must be a base64-encoded image.
Supported type values: IDENTITY_PROOF, REGISTRATION_PROOF, ARTICLES_OF_ASSOCIATION, SHAREHOLDER_DECLARATION, ADDRESS_PROOF, TAX_VERIFICATION, BUSINESS_ADMINISTRATOR_ID, COMPANY_REGISTRATION_PROOF, BANK_VERIFICATION.
POST
/
verifications
/
{uuid}
/
documents
Upload verification document
curl --request POST \
--url https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "IDENTITY_PROOF",
"content": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB..."
}
'import requests
url = "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents"
payload = {
"type": "IDENTITY_PROOF",
"content": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'IDENTITY_PROOF', content: 'data:image/jpeg;base64,/9j/4AAQSkZJRgAB...'})
};
fetch('https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'IDENTITY_PROOF',
'content' => 'data:image/jpeg;base64,/9j/4AAQSkZJRgAB...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents"
payload := strings.NewReader("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgAB...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgAB...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgAB...\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "<string>",
"type": "IDENTITY_PROOF",
"status": "CREATED",
"refused_reason": "<string>",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Authorizations
Use your account's Secret Key as the Bearer token.
Path Parameters
Verification UUID.
Body
application/json
Response
Document uploaded
Available options:
IDENTITY_PROOF, REGISTRATION_PROOF, ARTICLES_OF_ASSOCIATION, SHAREHOLDER_DECLARATION, ADDRESS_PROOF, TAX_VERIFICATION, BUSINESS_ADMINISTRATOR_ID, COMPANY_REGISTRATION_PROOF, BANK_VERIFICATION Available options:
CREATED, VALIDATED, REFUSED 