Skip to main content
POST
/
api
/
v1
/
verify
/
run_user_verification
/
cURL
curl --request POST \
  --url https://api.pearcheck.com/api/v1/verify/run_user_verification/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "first_name": "John",
  "last_name": "Doe",
  "date_of_birth": "2023-12-25",
  "phone_number": "+256000000000",
  "country_code": "UG",
  "id_type": "NATIONAL_ID",
  "middle_name": "Loe",
  "email_address": "jsmith@example.com",
  "id_number": "<string>",
  "id_document_front": "aSDinaTvuI8gbWludGxpZnk=",
  "id_document_back": "aSDinaTvuI8gbWludGxpZnk=",
  "selfie": "aSDinaTvuI8gbWludGxpZnk="
}
'
import requests

url = "https://api.pearcheck.com/api/v1/verify/run_user_verification/"

payload = {
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "2023-12-25",
"phone_number": "+256000000000",
"country_code": "UG",
"id_type": "NATIONAL_ID",
"middle_name": "Loe",
"email_address": "jsmith@example.com",
"id_number": "<string>",
"id_document_front": "aSDinaTvuI8gbWludGxpZnk=",
"id_document_back": "aSDinaTvuI8gbWludGxpZnk=",
"selfie": "aSDinaTvuI8gbWludGxpZnk="
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Doe',
date_of_birth: '2023-12-25',
phone_number: '+256000000000',
country_code: 'UG',
id_type: 'NATIONAL_ID',
middle_name: 'Loe',
email_address: 'jsmith@example.com',
id_number: '<string>',
id_document_front: 'aSDinaTvuI8gbWludGxpZnk=',
id_document_back: 'aSDinaTvuI8gbWludGxpZnk=',
selfie: 'aSDinaTvuI8gbWludGxpZnk='
})
};

fetch('https://api.pearcheck.com/api/v1/verify/run_user_verification/', 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.pearcheck.com/api/v1/verify/run_user_verification/",
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([
'first_name' => 'John',
'last_name' => 'Doe',
'date_of_birth' => '2023-12-25',
'phone_number' => '+256000000000',
'country_code' => 'UG',
'id_type' => 'NATIONAL_ID',
'middle_name' => 'Loe',
'email_address' => 'jsmith@example.com',
'id_number' => '<string>',
'id_document_front' => 'aSDinaTvuI8gbWludGxpZnk=',
'id_document_back' => 'aSDinaTvuI8gbWludGxpZnk=',
'selfie' => 'aSDinaTvuI8gbWludGxpZnk='
]),
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://api.pearcheck.com/api/v1/verify/run_user_verification/"

payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"+256000000000\",\n \"country_code\": \"UG\",\n \"id_type\": \"NATIONAL_ID\",\n \"middle_name\": \"Loe\",\n \"email_address\": \"jsmith@example.com\",\n \"id_number\": \"<string>\",\n \"id_document_front\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"id_document_back\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"selfie\": \"aSDinaTvuI8gbWludGxpZnk=\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.pearcheck.com/api/v1/verify/run_user_verification/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"+256000000000\",\n \"country_code\": \"UG\",\n \"id_type\": \"NATIONAL_ID\",\n \"middle_name\": \"Loe\",\n \"email_address\": \"jsmith@example.com\",\n \"id_number\": \"<string>\",\n \"id_document_front\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"id_document_back\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"selfie\": \"aSDinaTvuI8gbWludGxpZnk=\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.pearcheck.com/api/v1/verify/run_user_verification/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"+256000000000\",\n \"country_code\": \"UG\",\n \"id_type\": \"NATIONAL_ID\",\n \"middle_name\": \"Loe\",\n \"email_address\": \"jsmith@example.com\",\n \"id_number\": \"<string>\",\n \"id_document_front\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"id_document_back\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"selfie\": \"aSDinaTvuI8gbWludGxpZnk=\"\n}"

response = http.request(request)
puts response.read_body
{
  "provider": "<string>",
  "batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "type": "<string>",
  "used_url": true,
  "verification_type": "<string>",
  "verification_result": "<string>",
  "id_type": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "user_input": {},
  "id_info": {},
  "phone_info": {},
  "aml_info": {},
  "risk_info": {},
  "fraud_insights": {},
  "face_match_info": {},
  "face_liveness_info": {},
  "verification_url": "<string>"
}
{
"error": {
"summary": "<string>",
"fields": {}
}
}

Authorizations

X-API-KEY
string
header
required

Body

verification_type
enum<string>
required
  • ID - ID Verification
  • DOC - Document Verification
  • BIOMETRIC - Biometrics Verification
Available options:
ID,
DOC,
BIOMETRIC
first_name
string
required
Required string length: 2 - 50
Example:

"John"

last_name
string
required
Required string length: 2 - 50
Example:

"Doe"

date_of_birth
string<date>
required
phone_number
string
required
Pattern: ^\+?[1-9]\d{1,14}$
Example:

"+256000000000"

country_code
string
required
Required string length: 2
Example:

"UG"

id_type
enum<string>
required

*NATIONAL_ID - National ID

Available options:
NATIONAL_ID
middle_name
string
Maximum string length: 50
Example:

"Loe"

email_address
string<email> | null
id_number
string
id_document_front
string<byte>

Base64-encoded front of ID document (Required for Document & Biometrics Verification)

id_document_back
string<byte>

Base64-encoded back of ID document (Required for Document & Biometrics Verification)

selfie
string<byte>

Base64-encoded selfie image (Required for Biometrics Verification)

Response

Successful Operation

provider
string
required
batch_id
string<uuid>
required
status
string
required
type
string
required
used_url
boolean
required
verification_type
string
required
verification_result
string
required
id_type
string
required
created_at
string<date-time>
required
user_input
object
required
id_info
object
required
phone_info
object
required
aml_info
object
required
risk_info
object
required
fraud_insights
object
required
face_match_info
object
required
face_liveness_info
object
required
verification_url
string | null