Upload onboarding document
curl --request POST \
--url https://api.sandbox.trio.com.br/onboarding/documents \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form reference_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form 'file=@example-file;type=application/pdf'import requests
url = "https://api.sandbox.trio.com.br/onboarding/documents"
files = { "file": ("example-file", open("example-file", "rb"), "application/pdf") }
payload = { "reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('reference_id', '3c90c3cc-0d44-4b50-8888-8dd25736052a');
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
options.body = form;
fetch('https://api.sandbox.trio.com.br/onboarding/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://api.sandbox.trio.com.br/onboarding/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 => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: multipart/form-data"
],
]);
$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://api.sandbox.trio.com.br/onboarding/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.trio.com.br/onboarding/documents")
.header("Authorization", "Basic <encoded-value>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.trio.com.br/onboarding/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "Document uploaded successfully",
"data": {
"id": "d9f3b1a2-8c4d-4e5f-a6b7-1c2d3e4f5a6b",
"reference_type": "entity",
"reference_id": "01a06ee8-4973-caa8-eda0-dc64b5aa648e",
"document_type": "financial_statement",
"inserted_at": "2026-09-24T11:25:00.000000Z",
"updated_at": "2026-09-24T11:25:00.000000Z"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}Onboarding
Upload onboarding document
Upload a PDF document for an entity or one of its representatives created through onboarding.
POST
/
onboarding
/
documents
Upload onboarding document
curl --request POST \
--url https://api.sandbox.trio.com.br/onboarding/documents \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form reference_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form 'file=@example-file;type=application/pdf'import requests
url = "https://api.sandbox.trio.com.br/onboarding/documents"
files = { "file": ("example-file", open("example-file", "rb"), "application/pdf") }
payload = { "reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('reference_id', '3c90c3cc-0d44-4b50-8888-8dd25736052a');
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
options.body = form;
fetch('https://api.sandbox.trio.com.br/onboarding/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://api.sandbox.trio.com.br/onboarding/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 => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: multipart/form-data"
],
]);
$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://api.sandbox.trio.com.br/onboarding/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.trio.com.br/onboarding/documents")
.header("Authorization", "Basic <encoded-value>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.trio.com.br/onboarding/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/pdf\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "Document uploaded successfully",
"data": {
"id": "d9f3b1a2-8c4d-4e5f-a6b7-1c2d3e4f5a6b",
"reference_type": "entity",
"reference_id": "01a06ee8-4973-caa8-eda0-dc64b5aa648e",
"document_type": "financial_statement",
"inserted_at": "2026-09-24T11:25:00.000000Z",
"updated_at": "2026-09-24T11:25:00.000000Z"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}IMPORTANT: This feature is only available after a distribution channel has been created for your organization.To request the creation of a distribution channel, contact Trio Support or your Trio Account Manager.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
multipart/form-data
Document parameters and the binary PDF file
Multipart form parameters for uploading an onboarding document.
The kind of record the document belongs to.
Available options:
entity, entity_representative ID of the entity (entity_id) or representative (id) the document belongs to.
Document classification. Entities use company_contract, power_of_attorney, or financial_statement; representatives use identification.
Available options:
power_of_attorney, financial_statement, identification, company_contract The PDF file to upload.

