Create a Biometric Validation
Endpoint
POST https://api.verifik.co/v2/biometric-validations
A Biometric Validation is an instance within Verifik's system that allows you to process and validate user identities through facial recognition and liveness detection. This process ensures the authenticity of users by verifying their unique biometric characteristics through advanced security technology.
Headers
Content-Type
Type: String
Required: Yes
application/json
Authorization
Type: String
Required: Yes
Bearer {YOUR_ACCESS_TOKEN}
Parameters
project
Type: String
Required: Yes
The unique identifier for the project where this biometric validation will be used.
projectFlow
Type: String
Required: Yes
The unique identifier for the project flow configuration.
identifier
Type: String
Required: Yes
A unique identifier for the user or session (e.g., email, phone, or custom ID).
type
Type: String
Required: Yes
Type of validation: validation, login, onboarding, or oneTimeLink.
expiresAt
Type: String
Required: No
Optional expiration date for the validation session.
redirectUrl
Type: String
Required: No
Optional URL for redirect after validation.
webhookUrl
Type: String
Required: No
Optional webhook URL for validation notifications.
requires2FA
Type: Boolean
Required: No
Optional flag indicating if two-factor authentication is required.
ipAddress
Type: String
Required: No
Optional IP address of the user.
sendViaEmail
Type: Boolean
Required: No
Optional flag to send validation link via email.
email
Type: String
Required: No
Email address to send validation link to (required if sendViaEmail is true).
language
Type: String
Required: No
Language for email templates (en/es). Defaults to "en".
type Values
validation- General biometric identity validation.login- Biometric verification during user authentication.onboarding- Biometric verification during user registration.
Request
Request
- Node.js
- Python
- PHP
- Go
const axios = require("axios");
const config = {
method: "post",
url: "https://api.verifik.co/v2/biometric-validations",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
data: {
project: "project_123456789",
projectFlow: "flow_123456789",
identifier: "user@example.com",
type: "validation",
expiresAt: "2024-01-15T11:30:00Z",
redirectUrl: "https://example.com/success",
webhookUrl: "https://example.com/webhook",
requires2FA: false,
ipAddress: "192.168.1.1",
sendViaEmail: true,
email: "user@example.com",
language: "en"
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
import json
url = "https://api.verifik.co/v2/biometric-validations"
payload = json.dumps({
"project": "project_123456789",
"projectFlow": "flow_123456789",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": False,
"ipAddress": "192.168.1.1",
"sendViaEmail": True,
"email": "user@example.com",
"language": "en"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.verifik.co/v2/biometric-validations',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"project": "project_123456789",
"projectFlow": "flow_123456789",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"sendViaEmail": true,
"email": "user@example.com",
"language": "en"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer YOUR_ACCESS_TOKEN'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.verifik.co/v2/biometric-validations"
payload := strings.NewReader(`{
"project": "project_123456789",
"projectFlow": "flow_123456789",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"sendViaEmail": true,
"email": "user@example.com",
"language": "en"
}`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"success": true,
"data": {
"_id": "biometric_validation_123456789",
"client": "client_123456789",
"project": "project_123456789",
"projectFlow": "flow_123456789",
"status": "new",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"sendViaEmail": true,
"email": "user@example.com",
"language": "en",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}
Error Responses
{
"success": false,
"error": "Invalid project flow",
"code": "INVALID_PROJECT_FLOW"
}