Skip to main content
POST
/
id-check
/
api
/
v1
/
scan
/
face
ID Check Facial
curl --request POST \
  --url https://api.valid.com/id-check/api/v1/scan/face \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "cpf": "<string>",
  "image": "<string>",
  "confidenceLevel": "<string>"
}
'
import requests

url = "https://api.valid.com/id-check/api/v1/scan/face"

payload = {
    "cpf": "<string>",
    "image": "<string>",
    "confidenceLevel": "<string>"
}
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({cpf: '<string>', image: '<string>', confidenceLevel: '<string>'})
};

fetch('https://api.valid.com/id-check/api/v1/scan/face', 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.valid.com/id-check/api/v1/scan/face",
  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([
    'cpf' => '<string>',
    'image' => '<string>',
    'confidenceLevel' => '<string>'
  ]),
  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.valid.com/id-check/api/v1/scan/face"

	payload := strings.NewReader("{\n  \"cpf\": \"<string>\",\n  \"image\": \"<string>\",\n  \"confidenceLevel\": \"<string>\"\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.valid.com/id-check/api/v1/scan/face")
  .header("x-api-key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cpf\": \"<string>\",\n  \"image\": \"<string>\",\n  \"confidenceLevel\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.valid.com/id-check/api/v1/scan/face")

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  \"cpf\": \"<string>\",\n  \"image\": \"<string>\",\n  \"confidenceLevel\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "scanId": "123e4567-e89b-12d3-a456-426614174000",
  "cpf": "11144477735",
  "status": "APPROVED",
  "valid": true,
  "confidence": "high",
  "metadata": {
    "processingTime": 2345,
    "timestamp": "2025-11-21T18:00:00Z"
  }
}
{
  "error": "VALIDATION_ERROR",
  "message": "Invalid request parameters",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "timestamp": "2025-10-21T10:00:00Z"
}

Request Body

cpf
string
required
CPF do titular a ser verificado.Exemplo: 12312312300
image
string
required
Imagem em formato base64.Exemplo: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAg...
confidenceLevel
string
required
Nível de confiança esperado.Exemplo: HIGH

Response

status
string
Status da validação. (APPROVED, REJECTED, NOT_FOUND)Exemplo: APPROVED
confidence
string
Nível de confiança do resultado. Valores possíveis:Low: Alta probabilidade de fraude, recomendado reprovarMedium: Alguma probabilidade de fraude, zona cinzenta que precisa de reavaliaçãoHigh: Baixa probabilidade de fraude, recomendado aprovarMaximum: Probabilidade quase nula de fraude, recomendado aprovarExemplo: MAXIMUM
scanId
string
Identificador interno da transação.Exemplo: 123e4567-e89b-12d3-a456-426614174000
cpf
string
CPF consultado.Exemplo: 12312312300
valid
boolean
Validação baseado no nível de confiança recebido.Exemplo: true
processingTime
integer
Tempo total de processamento em milisegundosExemplo: 345
timestamp
datetime
Data e hora da transaçãoExemplo: 2025-11-21T18:00:00Z
{
  "scanId": "123e4567-e89b-12d3-a456-426614174000",
  "cpf": "11144477735",
  "status": "APPROVED",
  "valid": true,
  "confidence": "high",
  "metadata": {
    "processingTime": 2345,
    "timestamp": "2025-11-21T18:00:00Z"
  }
}
{
  "error": "VALIDATION_ERROR",
  "message": "Invalid request parameters",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "timestamp": "2025-10-21T10:00:00Z"
}