Create a new case or add files to an existing one
curl --request POST \
--url https://api.uk.veridox.ai/cases \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"label": "<string>",
"file_labels": [
"<string>"
],
"existing_case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.uk.veridox.ai/cases"
payload = {
"label": "<string>",
"file_labels": ["<string>"],
"existing_case_id": "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({
label: '<string>',
file_labels: ['<string>'],
existing_case_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.uk.veridox.ai/cases', 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/cases",
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([
'label' => '<string>',
'file_labels' => [
'<string>'
],
'existing_case_id' => '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/cases"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"file_labels\": [\n \"<string>\"\n ],\n \"existing_case_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/cases")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"file_labels\": [\n \"<string>\"\n ],\n \"existing_case_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/cases")
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 \"label\": \"<string>\",\n \"file_labels\": [\n \"<string>\"\n ],\n \"existing_case_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_locked": true,
"stream_url": "<string>",
"files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"sas_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
]
}{
"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"
}
}{
"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"
}
}Cases
Create Case
Create a new case for document analysis with optional file placeholders.
POST
/
cases
Create a new case or add files to an existing one
curl --request POST \
--url https://api.uk.veridox.ai/cases \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"label": "<string>",
"file_labels": [
"<string>"
],
"existing_case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.uk.veridox.ai/cases"
payload = {
"label": "<string>",
"file_labels": ["<string>"],
"existing_case_id": "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({
label: '<string>',
file_labels: ['<string>'],
existing_case_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.uk.veridox.ai/cases', 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/cases",
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([
'label' => '<string>',
'file_labels' => [
'<string>'
],
'existing_case_id' => '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/cases"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"file_labels\": [\n \"<string>\"\n ],\n \"existing_case_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/cases")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"file_labels\": [\n \"<string>\"\n ],\n \"existing_case_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/cases")
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 \"label\": \"<string>\",\n \"file_labels\": [\n \"<string>\"\n ],\n \"existing_case_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_locked": true,
"stream_url": "<string>",
"files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"sas_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
]
}{
"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"
}
}{
"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"
}
}A case acts as a container for documents that need to be analysed together. You can create a case with or without file placeholders.
With file placeholders: Pre-define expected files and get upload URLs immediately.
Without file placeholders: Create case first, then add files later.
Important: Cases are designed for single-batch file uploads. Once you begin uploading files, the case locks to ensure complete analysis. Plan to upload all your files together.
Permission
Requiresorganisation_cases:write, which every role holds by default. Including file_labels also requires organisation_files:write, which every role holds by default. A caller without them receives 403. See Permissions and API Keys.
Best Practices
- Descriptive Labels: Use clear, descriptive case labels like claim numbers or policy numbers for easy identification.
- Unique Labels (Case-Insensitive): Case labels must be unique per user regardless of letter casing. For an API key, the label is checked against the cases of the person who created the key. Creating a case with a label that only differs by case will return a
409 Conflictresponse. - File Planning: Pre-define expected files when possible to get upload URLs immediately.
- Batch Operations: Create cases in advance for high-volume processing.
Authorizations
Body
application/json
Required string length:
1 - 255Required string length:
1 - 255Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Was this page helpful?
⌘I