curl --request PATCH \
--url https://api.duvo.ai/v2/cases/{case_id}/json-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"set": [
{
"path": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.duvo.ai/v2/cases/{case_id}/json-data"
payload = { "set": [
{
"path": "<string>",
"value": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({set: [{path: '<string>', value: '<string>'}]})
};
fetch('https://api.duvo.ai/v2/cases/{case_id}/json-data', 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.duvo.ai/v2/cases/{case_id}/json-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'set' => [
[
'path' => '<string>',
'value' => '<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.duvo.ai/v2/cases/{case_id}/json-data"
payload := strings.NewReader("{\n \"set\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.duvo.ai/v2/cases/{case_id}/json-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"set\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/cases/{case_id}/json-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"set\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"case": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"data": "<string>",
"status": "pending",
"priority": "none",
"display_status": "pending",
"claimed_at": "<string>",
"claimed_by_run_id": "<string>",
"completed_at": "<string>",
"postponed_to": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_name": "<string>",
"created_by_user_email": "<string>",
"agent_run_status": "<string>",
"agent_run_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pending_human_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pending_approval_batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pending_approval_assignee_user_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"approval_approved_count": 4503599627370495,
"approval_rejected_count": 4503599627370495,
"labels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"value": "<string>",
"color_hue": 180
}
],
"json_data": {},
"json_schema_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome_source": "system",
"outcome_severity": "critical",
"eval_summary": {
"passed": 123,
"total": 123,
"status": "ready",
"evaluationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"final_comment": "<string>",
"severityCounts": {
"critical": 4503599627370495,
"medium": 4503599627370495,
"low": 4503599627370495
}
},
"search_match_data_snippet": {
"before": "<string>",
"match": "<string>",
"after": "<string>"
}
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"case_queue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"human_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"reason": "<string>",
"created_at": "<string>",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_name": "<string>",
"user_email": "<string>",
"human_request_title": "<string>"
}
],
"approvalBatches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"case_queue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"created_at": "<string>",
"resolved_at": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"rows": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_name": "<string>",
"assignee_email": "<string>",
"prompt": "<string>",
"decision": "approved",
"responded_at": "<string>",
"responded_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responded_by_name": "<string>",
"responded_by_email": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"can_respond": true,
"resolution": "<string>"
}
]
}
],
"attachments": [],
"scopedApprovalBatches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"case_queue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_run_id": null,
"title": "<string>",
"created_at": "<string>",
"resolved_at": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"rows": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_name": "<string>",
"assignee_email": "<string>",
"prompt": "<string>",
"decision": "approved",
"responded_at": "<string>",
"responded_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responded_by_name": "<string>",
"responded_by_email": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"can_respond": true,
"resolution": "<string>"
}
]
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Set Case Json Data Fields
Set one or more fields of a typed case’s structured json_data payload in one atomic write, leaving every other field as stored. Prefer this over PATCH /cases/{case_id} with a full json_data object when changing some fields: the write reads and locks the latest payload in the database, so a concurrent edit to another field is preserved. Each set entry names a path, a JSONPath in dotted form ($.invoice.amount) declared in the queue’s current Case schema, and the value to store there; array indices are not supported. A value can be any JSON value, including an object for an object field. Paths must be distinct, and no path may sit inside another in the same request. The resulting payload is validated against the queue’s current Case schema and the case is re-pinned to that schema version; if any entry is refused, nothing is written. A case without a structured payload yet must be given one with PATCH /cases/{case_id} first. Returns the updated case with its event history and approval batches.
curl --request PATCH \
--url https://api.duvo.ai/v2/cases/{case_id}/json-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"set": [
{
"path": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.duvo.ai/v2/cases/{case_id}/json-data"
payload = { "set": [
{
"path": "<string>",
"value": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({set: [{path: '<string>', value: '<string>'}]})
};
fetch('https://api.duvo.ai/v2/cases/{case_id}/json-data', 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.duvo.ai/v2/cases/{case_id}/json-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'set' => [
[
'path' => '<string>',
'value' => '<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.duvo.ai/v2/cases/{case_id}/json-data"
payload := strings.NewReader("{\n \"set\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.duvo.ai/v2/cases/{case_id}/json-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"set\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/cases/{case_id}/json-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"set\": [\n {\n \"path\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"case": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"queue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"data": "<string>",
"status": "pending",
"priority": "none",
"display_status": "pending",
"claimed_at": "<string>",
"claimed_by_run_id": "<string>",
"completed_at": "<string>",
"postponed_to": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_name": "<string>",
"created_by_user_email": "<string>",
"agent_run_status": "<string>",
"agent_run_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pending_human_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pending_approval_batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pending_approval_assignee_user_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"approval_approved_count": 4503599627370495,
"approval_rejected_count": 4503599627370495,
"labels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"value": "<string>",
"color_hue": 180
}
],
"json_data": {},
"json_schema_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome_source": "system",
"outcome_severity": "critical",
"eval_summary": {
"passed": 123,
"total": 123,
"status": "ready",
"evaluationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"final_comment": "<string>",
"severityCounts": {
"critical": 4503599627370495,
"medium": 4503599627370495,
"low": 4503599627370495
}
},
"search_match_data_snippet": {
"before": "<string>",
"match": "<string>",
"after": "<string>"
}
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"case_queue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"human_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"reason": "<string>",
"created_at": "<string>",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_name": "<string>",
"user_email": "<string>",
"human_request_title": "<string>"
}
],
"approvalBatches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"case_queue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"created_at": "<string>",
"resolved_at": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"rows": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_name": "<string>",
"assignee_email": "<string>",
"prompt": "<string>",
"decision": "approved",
"responded_at": "<string>",
"responded_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responded_by_name": "<string>",
"responded_by_email": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"can_respond": true,
"resolution": "<string>"
}
]
}
],
"attachments": [],
"scopedApprovalBatches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"case_queue_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_run_id": null,
"title": "<string>",
"created_at": "<string>",
"resolved_at": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"rows": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_name": "<string>",
"assignee_email": "<string>",
"prompt": "<string>",
"decision": "approved",
"responded_at": "<string>",
"responded_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"responded_by_name": "<string>",
"responded_by_email": "<string>",
"cancelled_at": "<string>",
"cancellation_reason": "<string>",
"can_respond": true,
"resolution": "<string>"
}
]
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
The case's unique identifier
Body
The fields to set, applied together (1 to 100).
1 - 100 elementsShow child attributes
Show child attributes
Response
Default Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Approval batches with Run references redacted for Process-scoped access. When present, use this field instead of approvalBatches, which is empty for these callers.
Show child attributes
Show child attributes
Was this page helpful?