Upload File
curl --request POST \
--url https://api.wokelo.ai/api/assets/upload/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form 'fileUUID[0]=a7f4b9e2c3' \
--form 'fileUUID[1]=k3m8n5p1q6'import requests
url = "https://api.wokelo.ai/api/assets/upload/"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"fileUUID[0]": "a7f4b9e2c3",
"fileUUID[1]": "k3m8n5p1q6"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('fileUUID[0]', 'a7f4b9e2c3');
form.append('fileUUID[1]', 'k3m8n5p1q6');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.wokelo.ai/api/assets/upload/', 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.wokelo.ai/api/assets/upload/",
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=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.wokelo.ai/api/assets/upload/"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wokelo.ai/api/assets/upload/")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wokelo.ai/api/assets/upload/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": "success",
"success": [
{
"fileName": "file_116e55ec-041d-4c1e-897c-3adef1576a09",
"originalName": "lemonade.pdf",
"mimeType": "pdf",
"uuid": "a7f4b9e2c3"
},
{
"fileName": "file_e30c7d3f-8bed-46b2-ae9c-eebc879323cc",
"originalName": "lemonade_diligence.pdf",
"mimeType": "pdf",
"uuid": "k3m8n5p1q6"
}
],
"fails": []
}
Supporting APIs
Upload File
Upload files to Wokelo to supplement research reports with proprietary data. Each uploaded file receives a unique identifier (fileName) that can be referenced in the custom_files parameter when creating reports.
- Individual uploads preferred – for best performance, upload files one at a time.
- Bulk upload limits – maximum 10 files per request, 20 MB limit per file.
POST
/
api
/
assets
/
upload
/
Upload File
curl --request POST \
--url https://api.wokelo.ai/api/assets/upload/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form 'fileUUID[0]=a7f4b9e2c3' \
--form 'fileUUID[1]=k3m8n5p1q6'import requests
url = "https://api.wokelo.ai/api/assets/upload/"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"fileUUID[0]": "a7f4b9e2c3",
"fileUUID[1]": "k3m8n5p1q6"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('fileUUID[0]', 'a7f4b9e2c3');
form.append('fileUUID[1]', 'k3m8n5p1q6');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.wokelo.ai/api/assets/upload/', 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.wokelo.ai/api/assets/upload/",
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=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.wokelo.ai/api/assets/upload/"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wokelo.ai/api/assets/upload/")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wokelo.ai/api/assets/upload/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B0%5D\"\r\n\r\na7f4b9e2c3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUUID%5B1%5D\"\r\n\r\nk3m8n5p1q6\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": "success",
"success": [
{
"fileName": "file_116e55ec-041d-4c1e-897c-3adef1576a09",
"originalName": "lemonade.pdf",
"mimeType": "pdf",
"uuid": "a7f4b9e2c3"
},
{
"fileName": "file_e30c7d3f-8bed-46b2-ae9c-eebc879323cc",
"originalName": "lemonade_diligence.pdf",
"mimeType": "pdf",
"uuid": "k3m8n5p1q6"
}
],
"fails": []
}
Overview
Upload your files to Wokelo to supplement research reports with proprietary data. Each uploaded file receives a unique identifier that you can reference in thecustom_files parameter when creating reports.
Endpoint Details
- Method: POST
- Endpoint:
/api/assets/upload/
Authentication requirements
- Include a valid JWT token in your request header
- If you don’t have a token yet, you can get one from the /auth/token/ endpoint first.
Request
Request Parameters
Header Parameters
Body Parameters
Your own UUIDs to track files. Must match the length and order of the
files array. These UUIDs will be returned in the response alongside Wokelo’s fileName identifiers.- Individual uploads preferred - For best performance, upload files individually
- Bulk upload limits - When uploading multiple files, the maximum is 10 files per request with a 20MB limit per file.
Response
Successful response will include the details of files uploaded successfully and those that failed to upload.Successful Response Fields
{
"status": "success",
"success": [
{
"fileName": "file_116e55ec-041d-4c1e-897c-3adef1576a09",
"originalName": "lemonade.pdf",
"mimeType": "pdf",
"uuid": "a7f4b9e2c3"
},
{
"fileName": "file_e30c7d3f-8bed-46b2-ae9c-eebc879323cc",
"originalName": "lemonade_diligence.pdf",
"mimeType": "pdf",
"uuid": "k3m8n5p1q6"
}
],
"fails": []
}
Body
multipart/form-data
Response
Upload response including successfully uploaded files and any failures.