Upload Document
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tag": "<string>"
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents"
payload = { "tag": "<string>" }
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({tag: '<string>'})
};
fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/{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://api.sandbox.wepayout.com.br/v2/register/companies/{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([
'tag' => '<string>'
]),
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://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents"
payload := strings.NewReader("{\n \"tag\": \"<string>\"\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://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tag\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/register/companies/{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 \"tag\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Document uploaded successfully"
}
{
"message": "The provided tag is not part of the solicitation documents"
}
{
"message": "Document already approved and cannot be replaced"
}
{
"message": "Document already submitted and is awaiting review"
}
{
"message": "File exceeds the maximum allowed size of 10MB"
}
{
"message": "Solicitation does not accept document uploads in its current status"
}
{
"message": "Solicitation not found"
}
Documents
Upload Document
Upload a single document of an onboarding solicitation, identified by its tag. Supports partial uploads — once all required documents are sent, the solicitation moves automatically to documents_under_review.
POST
/
v2
/
register
/
companies
/
{uuid}
/
documents
Upload Document
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tag": "<string>"
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents"
payload = { "tag": "<string>" }
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({tag: '<string>'})
};
fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/{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://api.sandbox.wepayout.com.br/v2/register/companies/{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([
'tag' => '<string>'
]),
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://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents"
payload := strings.NewReader("{\n \"tag\": \"<string>\"\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://api.sandbox.wepayout.com.br/v2/register/companies/{uuid}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tag\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/register/companies/{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 \"tag\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Document uploaded successfully"
}
{
"message": "The provided tag is not part of the solicitation documents"
}
{
"message": "Document already approved and cannot be replaced"
}
{
"message": "Document already submitted and is awaiting review"
}
{
"message": "File exceeds the maximum allowed size of 10MB"
}
{
"message": "Solicitation does not accept document uploads in its current status"
}
{
"message": "Solicitation not found"
}
Part of the Onboarding Documents flow. The request is
multipart/form-data with two fields: tag and file. Send one document per call; you may call it multiple times to upload the documents partially.Path Parameters
string
required
UUID of the solicitation (the
id returned by Create Company). Must be in a status that accepts uploads (pending_documents or documents_under_review).- Format: UUID
- Example:
339074a8-1834-49c5-af94-4a044248d88d
Request Body
Content-Type:
multipart/form-data.string
required
Identifier of the document being sent. Must match one of the
tag values listed for the solicitation (delivered in the pending_documents webhook or returned by List Documents). An unrecognized tag is rejected with 422.- Example:
articles_of_incorporation
file
required
The document file.
- Accepted formats:
pdf,jpg,jpeg,png - Maximum size: 10 MB
Behavior
- A successful upload sets the document’s
upload_statustosent. - After each upload, if all required documents are
sent, the solicitation moves automatically todocuments_under_review. Optional documents do not block this transition. - The onboarding webhook is fired on every upload, reflecting the updated state.
- Resending a rejected document: uploading a document whose
review_statusisrejectedsetsupload_statusback tosentandreview_statusback topending. The previous rejectionreasonis preserved in the document history and is not returned in the active document state.
Upload is only allowed when the document’s
upload_status is pending or its review_status is rejected. A document already approved cannot be replaced, and a document already sent and awaiting review cannot be re-sent — both return 422.Response
string
Confirmation message.
{
"message": "Document uploaded successfully"
}
{
"message": "The provided tag is not part of the solicitation documents"
}
{
"message": "Document already approved and cannot be replaced"
}
{
"message": "Document already submitted and is awaiting review"
}
{
"message": "File exceeds the maximum allowed size of 10MB"
}
{
"message": "Solicitation does not accept document uploads in its current status"
}
{
"message": "Solicitation not found"
}
Errors
| Status | When |
|---|---|
422 | Tag not part of the solicitation, document already approved, document already submitted, or file format not in pdf, jpg, jpeg, png. |
413 | File exceeds 10 MB. |
409 | Solicitation is not in pending_documents nor documents_under_review. |
404 | Solicitation not found or not accessible. |
Examples
curl -X POST "https://api.sandbox.wepayout.com.br/v2/register/companies/339074a8-1834-49c5-af94-4a044248d88d/documents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "tag=articles_of_incorporation" \
-F "file=@/path/to/articles_of_incorporation.pdf"
const form = new FormData();
form.append("tag", "articles_of_incorporation");
form.append("file", fileInput.files[0]); // a pdf/jpg/jpeg/png up to 10 MB
const response = await fetch(
"https://api.sandbox.wepayout.com.br/v2/register/companies/339074a8-1834-49c5-af94-4a044248d88d/documents",
{
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
body: form,
}
);
const data = await response.json();
console.log(data.message);
import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/339074a8-1834-49c5-af94-4a044248d88d/documents"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {"tag": "articles_of_incorporation"}
with open("articles_of_incorporation.pdf", "rb") as f:
files = {"file": ("articles_of_incorporation.pdf", f, "application/pdf")}
response = requests.post(url, headers=headers, data=data, files=files)
print(response.json()["message"])
Related Resources
Onboarding Documents Integration
Understand the full flow
List Documents
Query state and review history
Was this page helpful?

