Verify Identity Document with Face
curl --request POST \
--url https://devapi.withedge.co/gateway/api/v1/kyc/verify/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'requestId: <requestid>' \
--data '
{
"docType": "<string>",
"docImage": "<string>",
"documentNumber": "<string>",
"selfieImage": "<string>"
}
'import requests
url = "https://devapi.withedge.co/gateway/api/v1/kyc/verify/document"
payload = {
"docType": "<string>",
"docImage": "<string>",
"documentNumber": "<string>",
"selfieImage": "<string>"
}
headers = {
"requestId": "<requestid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
requestId: '<requestid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
docType: '<string>',
docImage: '<string>',
documentNumber: '<string>',
selfieImage: '<string>'
})
};
fetch('https://devapi.withedge.co/gateway/api/v1/kyc/verify/document', 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://devapi.withedge.co/gateway/api/v1/kyc/verify/document",
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([
'docType' => '<string>',
'docImage' => '<string>',
'documentNumber' => '<string>',
'selfieImage' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"requestId: <requestid>"
],
]);
$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://devapi.withedge.co/gateway/api/v1/kyc/verify/document"
payload := strings.NewReader("{\n \"docType\": \"<string>\",\n \"docImage\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"selfieImage\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("requestId", "<requestid>")
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.post("https://devapi.withedge.co/gateway/api/v1/kyc/verify/document")
.header("requestId", "<requestid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"docType\": \"<string>\",\n \"docImage\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"selfieImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.withedge.co/gateway/api/v1/kyc/verify/document")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["requestId"] = '<requestid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"docType\": \"<string>\",\n \"docImage\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"selfieImage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 00,
"message": "Completed successfully"
"data": {},
"errors": []
}
Know Your Customer
Verify Identity Document with Face
This endpoint enables you to verify an identity document against a selfie image for identity confirmation.
POST
/
kyc
/
verify
/
document
Verify Identity Document with Face
curl --request POST \
--url https://devapi.withedge.co/gateway/api/v1/kyc/verify/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'requestId: <requestid>' \
--data '
{
"docType": "<string>",
"docImage": "<string>",
"documentNumber": "<string>",
"selfieImage": "<string>"
}
'import requests
url = "https://devapi.withedge.co/gateway/api/v1/kyc/verify/document"
payload = {
"docType": "<string>",
"docImage": "<string>",
"documentNumber": "<string>",
"selfieImage": "<string>"
}
headers = {
"requestId": "<requestid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
requestId: '<requestid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
docType: '<string>',
docImage: '<string>',
documentNumber: '<string>',
selfieImage: '<string>'
})
};
fetch('https://devapi.withedge.co/gateway/api/v1/kyc/verify/document', 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://devapi.withedge.co/gateway/api/v1/kyc/verify/document",
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([
'docType' => '<string>',
'docImage' => '<string>',
'documentNumber' => '<string>',
'selfieImage' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"requestId: <requestid>"
],
]);
$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://devapi.withedge.co/gateway/api/v1/kyc/verify/document"
payload := strings.NewReader("{\n \"docType\": \"<string>\",\n \"docImage\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"selfieImage\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("requestId", "<requestid>")
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.post("https://devapi.withedge.co/gateway/api/v1/kyc/verify/document")
.header("requestId", "<requestid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"docType\": \"<string>\",\n \"docImage\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"selfieImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.withedge.co/gateway/api/v1/kyc/verify/document")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["requestId"] = '<requestid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"docType\": \"<string>\",\n \"docImage\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"selfieImage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 00,
"message": "Completed successfully"
"data": {},
"errors": []
}
Verify Identity Document with Face
Use this endpoint to validate an identity document (e.g., driver’s license, international passport) against a provided selfie image for identity verification purposes.Request Parameters
A unique identifier for the request, used for idempotency.
Example:
Example:
e0b9f8d0-7a57-4a67-a8b2-4d7c7b5a37c9The type of identification document to be verified. Options include:
- Drivers License (DR)
- International Passport (IP)
Example:DR
A base64 encoded string of the document image to be verified.
Example:
Example:
base64encodedstringofdocumentThe unique number on the identification document.
Example:
Example:
A1234567A base64 encoded string of the selfie image for comparison with the document image.
Example:
Example:
base64encodedstringofselfie{
"statusCode": 00,
"message": "Completed successfully"
"data": {},
"errors": []
}
Was this page helpful?
⌘I