curl -X PATCH 'https://verification.didit.me/v3/document-ai/11111111-2222-3333-4444-555555555555/documents/44444444-5555-6666-7777-888888888888/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"extracted_data": {"invoice_number": "INV-2026-0042"}, "status": "Approved"}'import os
import requests
session_id = '11111111-2222-3333-4444-555555555555'
document_uuid = '44444444-5555-6666-7777-888888888888'
resp = requests.patch(
f'https://verification.didit.me/v3/document-ai/{session_id}/documents/{document_uuid}/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
json={'extracted_data': {'invoice_number': 'INV-2026-0042'}, 'status': 'Approved'},
timeout=10,
)
resp.raise_for_status()
document = resp.json()
print(document['status'], document['extracted_data'])const sessionId = '11111111-2222-3333-4444-555555555555';
const documentUuid = '44444444-5555-6666-7777-888888888888';
const resp = await fetch(`https://verification.didit.me/v3/document-ai/${sessionId}/documents/${documentUuid}/`, {
method: 'PATCH',
headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ extracted_data: { invoice_number: 'INV-2026-0042' }, status: 'Approved' }),
});
if (!resp.ok) throw new Error(`Update failed: ${resp.status}`);
const document = await resp.json();
console.log(document.status, document.extracted_data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/",
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([
'extracted_data' => [
'invoice_number' => 'INV-2026-0042'
],
'status' => 'Approved'
]),
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://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/"
payload := strings.NewReader("{\n \"extracted_data\": {\n \"invoice_number\": \"INV-2026-0042\"\n },\n \"status\": \"Approved\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"extracted_data\": {\n \"invoice_number\": \"INV-2026-0042\"\n },\n \"status\": \"Approved\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"extracted_data\": {\n \"invoice_number\": \"INV-2026-0042\"\n },\n \"status\": \"Approved\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "44444444-5555-6666-7777-888888888888",
"document_key": "invoice",
"original_filename": "invoice-2026-09.pdf",
"file_url": "document_ai/11111111-2222-3333-4444-555555555555-66666666-7777-8888-9999-000000000000.pdf",
"status": "Approved",
"extracted_data": {
"invoice_number": "INV-2026-0042",
"total_amount": 1250,
"issue_date": "2026-09-01"
}
}Update Document AI Data
Correct the fields Didit extracted from a Document AI document, or set its review status, on a KYC or KYB verification session.
curl -X PATCH 'https://verification.didit.me/v3/document-ai/11111111-2222-3333-4444-555555555555/documents/44444444-5555-6666-7777-888888888888/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"extracted_data": {"invoice_number": "INV-2026-0042"}, "status": "Approved"}'import os
import requests
session_id = '11111111-2222-3333-4444-555555555555'
document_uuid = '44444444-5555-6666-7777-888888888888'
resp = requests.patch(
f'https://verification.didit.me/v3/document-ai/{session_id}/documents/{document_uuid}/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
json={'extracted_data': {'invoice_number': 'INV-2026-0042'}, 'status': 'Approved'},
timeout=10,
)
resp.raise_for_status()
document = resp.json()
print(document['status'], document['extracted_data'])const sessionId = '11111111-2222-3333-4444-555555555555';
const documentUuid = '44444444-5555-6666-7777-888888888888';
const resp = await fetch(`https://verification.didit.me/v3/document-ai/${sessionId}/documents/${documentUuid}/`, {
method: 'PATCH',
headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ extracted_data: { invoice_number: 'INV-2026-0042' }, status: 'Approved' }),
});
if (!resp.ok) throw new Error(`Update failed: ${resp.status}`);
const document = await resp.json();
console.log(document.status, document.extracted_data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/",
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([
'extracted_data' => [
'invoice_number' => 'INV-2026-0042'
],
'status' => 'Approved'
]),
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://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/"
payload := strings.NewReader("{\n \"extracted_data\": {\n \"invoice_number\": \"INV-2026-0042\"\n },\n \"status\": \"Approved\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"extracted_data\": {\n \"invoice_number\": \"INV-2026-0042\"\n },\n \"status\": \"Approved\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/document-ai/{sessionId}/documents/{documentUuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"extracted_data\": {\n \"invoice_number\": \"INV-2026-0042\"\n },\n \"status\": \"Approved\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "44444444-5555-6666-7777-888888888888",
"document_key": "invoice",
"original_filename": "invoice-2026-09.pdf",
"file_url": "document_ai/11111111-2222-3333-4444-555555555555-66666666-7777-8888-9999-000000000000.pdf",
"status": "Approved",
"extracted_data": {
"invoice_number": "INV-2026-0042",
"total_amount": 1250,
"issue_date": "2026-09-01"
}
}Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Path Parameters
UUID of the verification session (the session_id returned by POST /v3/session/). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs: the server resolves the ID across both session types. Must be a well-formed UUID; a malformed value does not match the route and returns an HTML 404.
"11111111-2222-3333-4444-555555555555"
UUID of the Document AI document (document_ai_documents[].items[].uuid in GET /v3/session/{sessionId}/decision/). It must belong to the session in the path.
"44444444-5555-6666-7777-888888888888"
Body
Field keys (the keys you configured for the document) and their corrected values. Must be a JSON object; merged key by key into the stored data. Leave it out rather than sending null, which returns 400.
{ "invoice_number": "INV-2026-0042" }
New review status of the document.
Approved, Declined, In Review, Not Finished "Approved"
Response
Document updated. Returns the document after the merge.
Document identifier.
The configured document this upload corresponds to.
File name the document was uploaded with.
Storage path of the uploaded file. It is not a download link: read the presigned file_url from the session decision to download the file.
Review status of the document.
Not Finished, Approved, Declined, In Review, Resub Requested All extracted fields after the merge, keyed by field key.