Poll case progress updates (HTTP fallback)
curl --request GET \
--url https://api.uk.veridox.ai/cases/{id}/progress/poll \
--header 'x-api-key: <api-key>'import requests
url = "https://api.uk.veridox.ai/cases/{id}/progress/poll"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.uk.veridox.ai/cases/{id}/progress/poll', 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/{id}/progress/poll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.uk.veridox.ai/cases/{id}/progress/poll"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.uk.veridox.ai/cases/{id}/progress/poll")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/cases/{id}/progress/poll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events": [
{
"type": "file.analysis.progress",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": 123,
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>",
"progress": 123,
"outcome": "success",
"case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}
],
"has_more": true
}{
"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
Poll Case Analysis Progress
Retrieve case analysis progress events via incremental polling (fallback for streaming).
GET
/
cases
/
{id}
/
progress
/
poll
Poll case progress updates (HTTP fallback)
curl --request GET \
--url https://api.uk.veridox.ai/cases/{id}/progress/poll \
--header 'x-api-key: <api-key>'import requests
url = "https://api.uk.veridox.ai/cases/{id}/progress/poll"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.uk.veridox.ai/cases/{id}/progress/poll', 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/{id}/progress/poll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.uk.veridox.ai/cases/{id}/progress/poll"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.uk.veridox.ai/cases/{id}/progress/poll")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uk.veridox.ai/cases/{id}/progress/poll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events": [
{
"type": "file.analysis.progress",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": 123,
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>",
"progress": 123,
"outcome": "success",
"case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}
],
"has_more": true
}{
"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"
}
}Retrieve case analysis progress events via incremental polling. This endpoint also serves as a fallback when Server-Sent Events (SSE) streaming is not available. It returns only the newest events since the specified
last_event_id, making it efficient for periodic polling.
Permission
You can follow a case you created, or any case in your organisation if you haveorganisation_cases:read; otherwise the API returns 404. Per-file events cover only the files you uploaded, and those uploaded through document requests into a case you created, unless you have organisation_files:read. Shared cases, if enabled for your organisation, also give you reach to every case and file. See Permissions and API Keys.
When to Use Polling vs Streaming
Use Streaming (SSE) When:
- Real-time updates are critical.
- Low-latency progress monitoring is needed.
- Network supports persistent connections.
Use Polling When:
- SSE streaming fails or is blocked by network restrictions.
- Simple periodic updates are sufficient.
- Low-latency is not a requirement.
Best Practices
- Incremental Polling: Always use
last_event_idto avoid receiving duplicate events and reduce response size. - Polling Intervals: Use 2-5 second intervals to balance responsive updates with server load.
- Timeout Handling: Implement reasonable timeouts (e.g., 10-15 minutes) for long-running analyses.
Was this page helpful?
⌘I