KYC - Address Verification (Individuals)
Create a Candidate via Form
Creates a new address-verification candidate via direct form submission of the candidate’s personal details.
POST
/
v2
/
api
/
addresses
/
candidates
Create a Candidate via Form
curl --request POST \
--url https://api.youverify.co/v2/api/addresses/candidates \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"firstName": "Famous",
"middleName": "Prior",
"lastName": "Ehichioya",
"mobile": "08036xxxxxx",
"dateOfBirth": "2000-01-01",
"email": "testemail@gmail.com",
"image": "https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg"
}
'import requests
url = "https://api.youverify.co/v2/api/addresses/candidates"
payload = {
"firstName": "Famous",
"middleName": "Prior",
"lastName": "Ehichioya",
"mobile": "08036xxxxxx",
"dateOfBirth": "2000-01-01",
"email": "testemail@gmail.com",
"image": "https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg"
}
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({
firstName: 'Famous',
middleName: 'Prior',
lastName: 'Ehichioya',
mobile: '08036xxxxxx',
dateOfBirth: '2000-01-01',
email: 'testemail@gmail.com',
image: 'https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg'
})
};
fetch('https://api.youverify.co/v2/api/addresses/candidates', 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/addresses/candidates",
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([
'firstName' => 'Famous',
'middleName' => 'Prior',
'lastName' => 'Ehichioya',
'mobile' => '08036xxxxxx',
'dateOfBirth' => '2000-01-01',
'email' => 'testemail@gmail.com',
'image' => 'https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg'
]),
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/addresses/candidates"
payload := strings.NewReader("{\n \"firstName\": \"Famous\",\n \"middleName\": \"Prior\",\n \"lastName\": \"Ehichioya\",\n \"mobile\": \"08036xxxxxx\",\n \"dateOfBirth\": \"2000-01-01\",\n \"email\": \"testemail@gmail.com\",\n \"image\": \"https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg\"\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/addresses/candidates")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Famous\",\n \"middleName\": \"Prior\",\n \"lastName\": \"Ehichioya\",\n \"mobile\": \"08036xxxxxx\",\n \"dateOfBirth\": \"2000-01-01\",\n \"email\": \"testemail@gmail.com\",\n \"image\": \"https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/addresses/candidates")
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 \"firstName\": \"Famous\",\n \"middleName\": \"Prior\",\n \"lastName\": \"Ehichioya\",\n \"mobile\": \"08036xxxxxx\",\n \"dateOfBirth\": \"2000-01-01\",\n \"email\": \"testemail@gmail.com\",\n \"image\": \"https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 201,
"message": "Candidate created successfully!",
"data": {
"firstName": "Famous",
"middleName": "Prior",
"lastName": "Ehichioya",
"dateOfBirth": "2000-01-01",
"photo": null,
"email": "testemail@gmail.com",
"mobile": "08036xxxxxx",
"idNumber": null,
"type": "form",
"medium": "form",
"businessId": "615c2deb203b96532838418b",
"createdAt": "2021-11-12T11:44:29.335Z",
"lastModifiedAt": "2021-11-12T11:44:29.335Z",
"id": "618e539d540fb2e1d076427a"
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 402,
"message": "Insufficient fund",
"name": "PaymentRequiredError",
"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
Candidate created
⌘I
Create a Candidate via Form
curl --request POST \
--url https://api.youverify.co/v2/api/addresses/candidates \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"firstName": "Famous",
"middleName": "Prior",
"lastName": "Ehichioya",
"mobile": "08036xxxxxx",
"dateOfBirth": "2000-01-01",
"email": "testemail@gmail.com",
"image": "https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg"
}
'import requests
url = "https://api.youverify.co/v2/api/addresses/candidates"
payload = {
"firstName": "Famous",
"middleName": "Prior",
"lastName": "Ehichioya",
"mobile": "08036xxxxxx",
"dateOfBirth": "2000-01-01",
"email": "testemail@gmail.com",
"image": "https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg"
}
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({
firstName: 'Famous',
middleName: 'Prior',
lastName: 'Ehichioya',
mobile: '08036xxxxxx',
dateOfBirth: '2000-01-01',
email: 'testemail@gmail.com',
image: 'https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg'
})
};
fetch('https://api.youverify.co/v2/api/addresses/candidates', 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/addresses/candidates",
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([
'firstName' => 'Famous',
'middleName' => 'Prior',
'lastName' => 'Ehichioya',
'mobile' => '08036xxxxxx',
'dateOfBirth' => '2000-01-01',
'email' => 'testemail@gmail.com',
'image' => 'https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg'
]),
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/addresses/candidates"
payload := strings.NewReader("{\n \"firstName\": \"Famous\",\n \"middleName\": \"Prior\",\n \"lastName\": \"Ehichioya\",\n \"mobile\": \"08036xxxxxx\",\n \"dateOfBirth\": \"2000-01-01\",\n \"email\": \"testemail@gmail.com\",\n \"image\": \"https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg\"\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/addresses/candidates")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Famous\",\n \"middleName\": \"Prior\",\n \"lastName\": \"Ehichioya\",\n \"mobile\": \"08036xxxxxx\",\n \"dateOfBirth\": \"2000-01-01\",\n \"email\": \"testemail@gmail.com\",\n \"image\": \"https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/addresses/candidates")
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 \"firstName\": \"Famous\",\n \"middleName\": \"Prior\",\n \"lastName\": \"Ehichioya\",\n \"mobile\": \"08036xxxxxx\",\n \"dateOfBirth\": \"2000-01-01\",\n \"email\": \"testemail@gmail.com\",\n \"image\": \"https://cdn.youverify.co/1655466566309-lLSfNTlhElMTtbXW-QE-q.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 201,
"message": "Candidate created successfully!",
"data": {
"firstName": "Famous",
"middleName": "Prior",
"lastName": "Ehichioya",
"dateOfBirth": "2000-01-01",
"photo": null,
"email": "testemail@gmail.com",
"mobile": "08036xxxxxx",
"idNumber": null,
"type": "form",
"medium": "form",
"businessId": "615c2deb203b96532838418b",
"createdAt": "2021-11-12T11:44:29.335Z",
"lastModifiedAt": "2021-11-12T11:44:29.335Z",
"id": "618e539d540fb2e1d076427a"
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 402,
"message": "Insufficient fund",
"name": "PaymentRequiredError",
"data": {}
}{
"success": false,
"statusCode": 429,
"message": "Too many requests",
"name": "RateLimitError",
"data": {}
}{
"success": false,
"statusCode": 500,
"message": "Internal Server Error",
"name": "Error",
"data": {}
}