Perform OCR and IDV
curl --request POST \
--url https://d1.cynopsis.co/service/v2/ocr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'X-Domain-Id: <x-domain-id>' \
--form file0='@example-file' \
--form file1='@example-file'import requests
url = "https://d1.cynopsis.co/service/v2/ocr"
files = {
"file0": ("example-file", open("example-file", "rb")),
"file1": ("example-file", open("example-file", "rb"))
}
headers = {
"X-Domain-Id": "<x-domain-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file0', '<string>');
form.append('file1', '<string>');
const options = {
method: 'POST',
headers: {'X-Domain-Id': '<x-domain-id>', Authorization: 'Bearer <token>'}
};
options.body = form;
fetch('https://d1.cynopsis.co/service/v2/ocr', 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://d1.cynopsis.co/service/v2/ocr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"X-Domain-Id: <x-domain-id>"
],
]);
$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://d1.cynopsis.co/service/v2/ocr"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domain-Id", "<x-domain-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://d1.cynopsis.co/service/v2/ocr")
.header("X-Domain-Id", "<x-domain-id>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://d1.cynopsis.co/service/v2/ocr")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domain-Id"] = '<x-domain-id>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"task_id": "b1259f10-1c4e-42d2-b96e-7f553d87c345",
"status_task": "SUCCESS",
"result": {
"last_name": "LEE",
"first_name": "MICHAEL",
"full_name": "MICHAEL LEE",
"full_name2": "LEE MICHAEL",
"gender": "M",
"race": "ASIAN",
"date_of_birth": "1983-11-19",
"domicile": "SINGAPORE",
"address": "123 JURONG WEST, SINGAPORE",
"passport_number": "E8573920N",
"document_number": "A0123456",
"personal_id_number": "S3344556D",
"issuing_country": "MALAYSIA",
"country_of_birth": "MALAYSIA",
"nationality": "MALAYSIAN",
"passport_expiry_date": "2028-12-10",
"expiry_date": "2028-12-31",
"issue_date": "2023-01-05",
"optional_data": null,
"profession": "ENGINEER",
"birth date": "1983-11-19",
"expiry date": "2028-12-31",
"mrz_raw_string": "IDMYS3344556D8301196M2812319<<<<<<<<<<<<<<04",
"identifier": "U0987654",
"employer": "Acme Corp",
"status": "UNCERTAIN",
"document_type": "PASSPORT",
"document_type_name": "INTERNATIONAL PASSPORT",
"valid genre format": "true",
"final hash": "true",
"expiry date hash": "true",
"optional data hash": "true",
"document type format": "true",
"valid country code": "true",
"valid nationality code": "true",
"document number hash": "true",
"birth date hash": "true",
"document number format": "true",
"optional data format": "true",
"docver_check": {
"id": "02f54862-c9ba-4a82-abde-c22183f362e1",
"code": 8899,
"person": {
"gender": "M",
"idNumber": "S3344556D",
"lastName": "LEE",
"addresses": [
"123 JURONG WEST, SINGAPORE"
],
"firstName": "MICHAEL",
"citizenship": "MALAYSIAN",
"dateOfBirth": "1983-11-19",
"nationality": "MALAYSIAN",
"yearOfBirth": 1983,
"placeOfBirth": "KUALA LUMPUR",
"pepSanctionMatch": false
},
"reason": "All document features match specimen.",
"status": "approved",
"comments": [
"Verified by automated system."
],
"document": {
"type": "PASSPORT",
"state": "VALID",
"number": "A0123456",
"country": "MY",
"validFrom": "2023-01-05",
"validUntil": "2028-12-31"
},
"attemptId": "a777aaf8-5daf-498c-ada0-c9121f3aaa2f",
"endUserId": "user-99123",
"reasonCode": 100,
"vendorData": "Extra info",
"decisionTime": "2026-02-13T09:05:20.105392Z",
"acceptanceTime": "2026-02-13T09:05:10.388182Z",
"submissionTime": "2026-02-13T09:05:11.222100Z",
"additionalVerifiedData": {},
"recommendation": ""
},
"ignored_fields": []
}
}OCR
Perform OCR and IDV
Perform OCR (Optical Character Recognition) and document verification. Requires a Bearer token and domain ID. Use the following URLs depending on your environment:
- Demo: https://d1.cynopsis.co
- Production: https://util.cynopsis.co
POST
/
service
/
v2
/
ocr
Perform OCR and IDV
curl --request POST \
--url https://d1.cynopsis.co/service/v2/ocr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'X-Domain-Id: <x-domain-id>' \
--form file0='@example-file' \
--form file1='@example-file'import requests
url = "https://d1.cynopsis.co/service/v2/ocr"
files = {
"file0": ("example-file", open("example-file", "rb")),
"file1": ("example-file", open("example-file", "rb"))
}
headers = {
"X-Domain-Id": "<x-domain-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file0', '<string>');
form.append('file1', '<string>');
const options = {
method: 'POST',
headers: {'X-Domain-Id': '<x-domain-id>', Authorization: 'Bearer <token>'}
};
options.body = form;
fetch('https://d1.cynopsis.co/service/v2/ocr', 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://d1.cynopsis.co/service/v2/ocr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"X-Domain-Id: <x-domain-id>"
],
]);
$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://d1.cynopsis.co/service/v2/ocr"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domain-Id", "<x-domain-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://d1.cynopsis.co/service/v2/ocr")
.header("X-Domain-Id", "<x-domain-id>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://d1.cynopsis.co/service/v2/ocr")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domain-Id"] = '<x-domain-id>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file0\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file1\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"task_id": "b1259f10-1c4e-42d2-b96e-7f553d87c345",
"status_task": "SUCCESS",
"result": {
"last_name": "LEE",
"first_name": "MICHAEL",
"full_name": "MICHAEL LEE",
"full_name2": "LEE MICHAEL",
"gender": "M",
"race": "ASIAN",
"date_of_birth": "1983-11-19",
"domicile": "SINGAPORE",
"address": "123 JURONG WEST, SINGAPORE",
"passport_number": "E8573920N",
"document_number": "A0123456",
"personal_id_number": "S3344556D",
"issuing_country": "MALAYSIA",
"country_of_birth": "MALAYSIA",
"nationality": "MALAYSIAN",
"passport_expiry_date": "2028-12-10",
"expiry_date": "2028-12-31",
"issue_date": "2023-01-05",
"optional_data": null,
"profession": "ENGINEER",
"birth date": "1983-11-19",
"expiry date": "2028-12-31",
"mrz_raw_string": "IDMYS3344556D8301196M2812319<<<<<<<<<<<<<<04",
"identifier": "U0987654",
"employer": "Acme Corp",
"status": "UNCERTAIN",
"document_type": "PASSPORT",
"document_type_name": "INTERNATIONAL PASSPORT",
"valid genre format": "true",
"final hash": "true",
"expiry date hash": "true",
"optional data hash": "true",
"document type format": "true",
"valid country code": "true",
"valid nationality code": "true",
"document number hash": "true",
"birth date hash": "true",
"document number format": "true",
"optional data format": "true",
"docver_check": {
"id": "02f54862-c9ba-4a82-abde-c22183f362e1",
"code": 8899,
"person": {
"gender": "M",
"idNumber": "S3344556D",
"lastName": "LEE",
"addresses": [
"123 JURONG WEST, SINGAPORE"
],
"firstName": "MICHAEL",
"citizenship": "MALAYSIAN",
"dateOfBirth": "1983-11-19",
"nationality": "MALAYSIAN",
"yearOfBirth": 1983,
"placeOfBirth": "KUALA LUMPUR",
"pepSanctionMatch": false
},
"reason": "All document features match specimen.",
"status": "approved",
"comments": [
"Verified by automated system."
],
"document": {
"type": "PASSPORT",
"state": "VALID",
"number": "A0123456",
"country": "MY",
"validFrom": "2023-01-05",
"validUntil": "2028-12-31"
},
"attemptId": "a777aaf8-5daf-498c-ada0-c9121f3aaa2f",
"endUserId": "user-99123",
"reasonCode": 100,
"vendorData": "Extra info",
"decisionTime": "2026-02-13T09:05:20.105392Z",
"acceptanceTime": "2026-02-13T09:05:10.388182Z",
"submissionTime": "2026-02-13T09:05:11.222100Z",
"additionalVerifiedData": {},
"recommendation": ""
},
"ignored_fields": []
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Domain ID
Body
multipart/form-data
Response
OCR and IDV Result
The response is of type object.
⌘I
