KYC - Kenya
Verify Identity Number
Verifies that a Kenyan identity number exists in the database and retrieves non-account information for the identity holder. Supports Passport, National ID, Service ID, or Alien ID.
POST
/
v2
/
api
/
identity
/
ke
/
id-scrub
Verify Identity Number
curl --request POST \
--url https://api.youverify.co/v2/api/identity/ke/id-scrub \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "1234567",
"idType": "national-id",
"isSubjectConsent": true
}
'import requests
url = "https://api.youverify.co/v2/api/identity/ke/id-scrub"
payload = {
"id": "1234567",
"idType": "national-id",
"isSubjectConsent": True
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '1234567', idType: 'national-id', isSubjectConsent: true})
};
fetch('https://api.youverify.co/v2/api/identity/ke/id-scrub', 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.youverify.co/v2/api/identity/ke/id-scrub",
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([
'id' => '1234567',
'idType' => 'national-id',
'isSubjectConsent' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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.youverify.co/v2/api/identity/ke/id-scrub"
payload := strings.NewReader("{\n \"id\": \"1234567\",\n \"idType\": \"national-id\",\n \"isSubjectConsent\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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.youverify.co/v2/api/identity/ke/id-scrub")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"1234567\",\n \"idType\": \"national-id\",\n \"isSubjectConsent\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/identity/ke/id-scrub")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"1234567\",\n \"idType\": \"national-id\",\n \"isSubjectConsent\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "success",
"data": {
"id": "64eed6026b1a9b8f72c2925e",
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": false,
"selfieValidation": false,
"dateOfBirth": "1999-12-31T21:00:00Z",
"identityType": "national-id",
"isConsent": true,
"idNumber": "1234567",
"businessId": "628b38f03ae28a14f52d4bf7",
"firstName": "John",
"middleName": "M",
"lastName": "Doe",
"fullName": "John M Doe",
"gender": "Male",
"maritalStatus": "Married",
"email": "skkariuki@kcbgroup.com",
"homeTelephoneNumber": "+8761234567",
"mobileTelephoneNumber": "254723818284",
"workTelephoneNumber": "040-3203308",
"employmentName": "Teachers Service Commission.",
"lastEmployment": "NotSpecified",
"mainAddress": {
"address": "NYAHURURU KCC",
"country": "KE",
"town": "Nyahururu"
},
"secondaryAddress": {
"address": "NAKURU-CENTRE",
"country": "KE",
"town": "NYAHURURU",
"postalCode": "20300"
},
"contractSummary": {
"closedContracts": "2",
"openContracts": "10"
},
"inquiries": {
"numberOfInquiriesLast12Months": "89",
"numberOfInquiriesLast1Month": "6",
"numberOfInquiriesLast24Months": "355",
"numberOfInquiriesLast3Months": "12",
"numberOfInquiriesLast6Months": "27"
},
"type": "keCreditInfo",
"allValidationPassed": true,
"requestedAt": "2023-08-30T05:39:15.781Z",
"requestedById": "628b38f03ae28a5a122d4bf3",
"country": "KE",
"createdAt": "2023-08-30T05:39:15.974Z",
"lastModifiedAt": "2023-08-30T05:39:15.974Z",
"metadata": {},
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "628b38f03ae28a5a122d4bf3"
}
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 402,
"message": "Insufficient fund",
"name": "PaymentRequiredError",
"data": {}
}{
"success": false,
"statusCode": 404,
"message": "You have attempted to get a resource that does not exist.",
"name": "ResourceNotFoundError",
"data": {}
}{
"success": false,
"statusCode": 429,
"message": "Too many requests",
"name": "RateLimitError",
"data": {}
}{
"success": false,
"statusCode": 500,
"message": "Internal Server Error",
"name": "Error",
"data": {}
}Authorizations
Your Youverify API secret key. Never expose client-side.
Headers
API secret token
Body
application/json
Response
Success
⌘I
Verify Identity Number
curl --request POST \
--url https://api.youverify.co/v2/api/identity/ke/id-scrub \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "1234567",
"idType": "national-id",
"isSubjectConsent": true
}
'import requests
url = "https://api.youverify.co/v2/api/identity/ke/id-scrub"
payload = {
"id": "1234567",
"idType": "national-id",
"isSubjectConsent": True
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '1234567', idType: 'national-id', isSubjectConsent: true})
};
fetch('https://api.youverify.co/v2/api/identity/ke/id-scrub', 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.youverify.co/v2/api/identity/ke/id-scrub",
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([
'id' => '1234567',
'idType' => 'national-id',
'isSubjectConsent' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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.youverify.co/v2/api/identity/ke/id-scrub"
payload := strings.NewReader("{\n \"id\": \"1234567\",\n \"idType\": \"national-id\",\n \"isSubjectConsent\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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.youverify.co/v2/api/identity/ke/id-scrub")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"1234567\",\n \"idType\": \"national-id\",\n \"isSubjectConsent\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/identity/ke/id-scrub")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"1234567\",\n \"idType\": \"national-id\",\n \"isSubjectConsent\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "success",
"data": {
"id": "64eed6026b1a9b8f72c2925e",
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": false,
"selfieValidation": false,
"dateOfBirth": "1999-12-31T21:00:00Z",
"identityType": "national-id",
"isConsent": true,
"idNumber": "1234567",
"businessId": "628b38f03ae28a14f52d4bf7",
"firstName": "John",
"middleName": "M",
"lastName": "Doe",
"fullName": "John M Doe",
"gender": "Male",
"maritalStatus": "Married",
"email": "skkariuki@kcbgroup.com",
"homeTelephoneNumber": "+8761234567",
"mobileTelephoneNumber": "254723818284",
"workTelephoneNumber": "040-3203308",
"employmentName": "Teachers Service Commission.",
"lastEmployment": "NotSpecified",
"mainAddress": {
"address": "NYAHURURU KCC",
"country": "KE",
"town": "Nyahururu"
},
"secondaryAddress": {
"address": "NAKURU-CENTRE",
"country": "KE",
"town": "NYAHURURU",
"postalCode": "20300"
},
"contractSummary": {
"closedContracts": "2",
"openContracts": "10"
},
"inquiries": {
"numberOfInquiriesLast12Months": "89",
"numberOfInquiriesLast1Month": "6",
"numberOfInquiriesLast24Months": "355",
"numberOfInquiriesLast3Months": "12",
"numberOfInquiriesLast6Months": "27"
},
"type": "keCreditInfo",
"allValidationPassed": true,
"requestedAt": "2023-08-30T05:39:15.781Z",
"requestedById": "628b38f03ae28a5a122d4bf3",
"country": "KE",
"createdAt": "2023-08-30T05:39:15.974Z",
"lastModifiedAt": "2023-08-30T05:39:15.974Z",
"metadata": {},
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "628b38f03ae28a5a122d4bf3"
}
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 402,
"message": "Insufficient fund",
"name": "PaymentRequiredError",
"data": {}
}{
"success": false,
"statusCode": 404,
"message": "You have attempted to get a resource that does not exist.",
"name": "ResourceNotFoundError",
"data": {}
}{
"success": false,
"statusCode": 429,
"message": "Too many requests",
"name": "RateLimitError",
"data": {}
}{
"success": false,
"statusCode": 500,
"message": "Internal Server Error",
"name": "Error",
"data": {}
}