Generate bulk file download URLs
curl --request POST \
--url https://api.uk.veridox.ai/files/download \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.uk.veridox.ai/files/download"
payload = { "file_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.uk.veridox.ai/files/download', 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.uk.veridox.ai/files/download",
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([
'file_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.uk.veridox.ai/files/download"
payload := strings.NewReader("{\n \"file_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.uk.veridox.ai/files/download")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/files/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"download_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"label": "<string>"
}
],
"errors": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}
]
}{
"error_code": "request.cases.file.missing-risk-score",
"error_message": "User tried to perform an invalid operation on a file without a risk score.",
"error_details": {
"field": "email_address"
}
}{
"error_code": "request.cases.file.missing-risk-score",
"error_message": "User tried to perform an invalid operation on a file without a risk score.",
"error_details": {
"field": "email_address"
}
}{
"error_code": "request.cases.file.missing-risk-score",
"error_message": "User tried to perform an invalid operation on a file without a risk score.",
"error_details": {
"field": "email_address"
}
}Files
Generate Bulk File Download URLs
Generate signed download URLs for multiple files in a single request.
POST
/
files
/
download
Generate bulk file download URLs
curl --request POST \
--url https://api.uk.veridox.ai/files/download \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.uk.veridox.ai/files/download"
payload = { "file_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.uk.veridox.ai/files/download', 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.uk.veridox.ai/files/download",
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([
'file_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.uk.veridox.ai/files/download"
payload := strings.NewReader("{\n \"file_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.uk.veridox.ai/files/download")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/files/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"download_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"label": "<string>"
}
],
"errors": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}
]
}{
"error_code": "request.cases.file.missing-risk-score",
"error_message": "User tried to perform an invalid operation on a file without a risk score.",
"error_details": {
"field": "email_address"
}
}{
"error_code": "request.cases.file.missing-risk-score",
"error_message": "User tried to perform an invalid operation on a file without a risk score.",
"error_details": {
"field": "email_address"
}
}{
"error_code": "request.cases.file.missing-risk-score",
"error_message": "User tried to perform an invalid operation on a file without a risk score.",
"error_details": {
"field": "email_address"
}
}Generate signed download URLs for multiple files in a single request. Returns partial success — URLs for accessible files plus errors for any failures.
Permission
You can download files you uploaded, or any file in your organisation if you haveorganisation_files:read. Files you cannot reach are returned as per-file errors. Shared cases, if enabled for your organisation, also give you reach to every case and file. See Permissions and API Keys.
Key Features
- Partial Success: If some file IDs are inaccessible or invalid, the response still returns URLs for the files that succeeded, alongside per-file errors for those that failed.
- Batch Efficiency: Download URLs for up to 25 files in a single call instead of making individual requests.
- Short-lived URLs: Signed URLs expire after 60 minutes. Do not store them — request fresh URLs when needed.
Best Practices
- Request Fresh URLs: Always request new download URLs immediately before use. URLs expire after 60 minutes.
- Check Partial Errors: Inspect the errors array in the response to detect any files that could not be resolved.
- Stay Within Limits: A maximum of 25 file IDs are permitted per request. Split larger batches into multiple requests.
- Mind the Rate Limit: This endpoint is rate-limited to 20 requests per minute. Pace your requests accordingly for bulk workflows.
Authorizations
Body
application/json
Required array length:
1 - 25 elementsPattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$Was this page helpful?
⌘I