Update verification document
curl --request PUT \
--url https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "IDENTITY_PROOF",
"content": "data:application/pdf;base64,iVBORw0KGgo..."
}
'import requests
url = "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}"
payload = {
"type": "IDENTITY_PROOF",
"content": "data:application/pdf;base64,iVBORw0KGgo..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'IDENTITY_PROOF', content: 'data:application/pdf;base64,iVBORw0KGgo...'})
};
fetch('https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}', 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/{document_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'IDENTITY_PROOF',
'content' => 'data:application/pdf;base64,iVBORw0KGgo...'
]),
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/{document_uuid}"
payload := strings.NewReader("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:application/pdf;base64,iVBORw0KGgo...\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:application/pdf;base64,iVBORw0KGgo...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:application/pdf;base64,iVBORw0KGgo...\"\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
Update Verification Document
Updates the content or type of an existing KYC verification document.
PUT
/
verifications
/
{uuid}
/
documents
/
{document_uuid}
Update verification document
curl --request PUT \
--url https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "IDENTITY_PROOF",
"content": "data:application/pdf;base64,iVBORw0KGgo..."
}
'import requests
url = "https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}"
payload = {
"type": "IDENTITY_PROOF",
"content": "data:application/pdf;base64,iVBORw0KGgo..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'IDENTITY_PROOF', content: 'data:application/pdf;base64,iVBORw0KGgo...'})
};
fetch('https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}', 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/{document_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'IDENTITY_PROOF',
'content' => 'data:application/pdf;base64,iVBORw0KGgo...'
]),
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/{document_uuid}"
payload := strings.NewReader("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:application/pdf;base64,iVBORw0KGgo...\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:application/pdf;base64,iVBORw0KGgo...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/verifications/{uuid}/documents/{document_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"IDENTITY_PROOF\",\n \"content\": \"data:application/pdf;base64,iVBORw0KGgo...\"\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.
Body
application/json
Document type.
Available options:
IDENTITY_PROOF, REGISTRATION_PROOF, ARTICLES_OF_ASSOCIATION, SHAREHOLDER_DECLARATION, ADDRESS_PROOF, TAX_VERIFICATION, BUSINESS_ADMINISTRATOR_ID, COMPANY_REGISTRATION_PROOF, BANK_VERIFICATION Base64-encoded file content (image or PDF).
Example:
"data:application/pdf;base64,iVBORw0KGgo..."
Response
Document updated
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 ⌘I
