Breach detection API
The Breach detection API checks if an email, username, phone number, or password has been compromised in known data breaches.
It provides information on the breach source and the type of data exposed.
Password lookups: when
It provides information on the breach source and the type of data exposed.
Password lookups: when
type is password, send the full SHA-1 hash of the password as the value. Do not send the plaintext password. The API uses a partial-hash lookup approach so only a small portion of the hash is used for the upstream search, with the full match confirmed server-side.Endpoint
POST
https://api.provero.io/api/fraud-check/breach
Headers
Authorization:
Content-Type: application/json
Accept: application/json
Request Body
Request Payload Example (JSON)
{
"type": "string",
"value": "string",
"dob": "1990-06-01"
}
Request Examples
Choose language Bash (cURL) 5 examples
type="email" # Replace with "email", "username", "phone", or "password"
raw_value="support.provero.io" # Replace with the source value
value="$raw_value"
dob="1990-06-01" # Optional; remove when age at first breach is not needed
if [ "$type" = "password" ]; then
value=$(printf '%s' "$raw_value" | shasum -a 1 | awk '{print toupper($1)}')
fi
curl -X POST https://api.provero.io/api/fraud-check/breach \
-H "Authorization: Bearer REPLACE_WITH_API_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"type\": \"$type\", \"value\": \"$value\", \"dob\": \"$dob\"}"
import requests
import hashlib
type = "email" # Replace with "email", "username", "phone", or "password"
raw_value = "support.provero.io" # Replace with the source value
value = raw_value
dob = "1990-06-01" # Optional; remove when age at first breach is not needed
if type == "password":
value = hashlib.sha1(raw_value.encode("utf-8")).hexdigest().upper()
url = "https://api.provero.io/api/fraud-check/breach"
headers = {
"Authorization": "Bearer REPLACE_WITH_API_TOKEN",
"Content-Type": "application/json"
}
payload = {"type": type, "value": value, "dob": dob}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.text)
<?php
$type = "email"; // Replace with "email", "username", "phone", or "password"
$rawValue = "support.provero.io"; // Replace with the source value
$value = $rawValue;
$dob = "1990-06-01"; // Optional; remove when age at first breach is not needed
if ($type === "password") {
$value = strtoupper(sha1($rawValue));
}
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.provero.io/api/fraud-check/breach",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode(['type' => $type, 'value' => $value, 'dob' => $dob]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer REPLACE_WITH_API_TOKEN",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
}
curl_close($curl);
echo $response;
$type = "email"; // Replace with "email", "username", "phone", or "password"
$rawValue = "support.provero.io"; // Replace with the source value
$value = $type === "password" ? strtoupper(sha1($rawValue)) : $rawValue;
$response = Http::withToken('REPLACE_WITH_API_TOKEN')
->acceptJson()
->post('https://api.provero.io/api/fraud-check/breach', [
'type' => $type,
'value' => $value,
]);
return $response->json();
const type = "email"; // Replace with "email", "username", "phone", or "password"
const rawValue = "support.provero.io"; // Replace with the source value
const dob = "1990-06-01"; // Optional; remove when age at first breach is not needed
const apiToken = "REPLACE_WITH_API_TOKEN";
async function sha1Hex(value) {
if (!window.isSecureContext || !window.crypto || !window.crypto.subtle) {
throw new Error("SHA-1 hashing requires a secure browser context (HTTPS) with Web Crypto support.");
}
const data = new TextEncoder().encode(value);
const hashBuffer = await window.crypto.subtle.digest("SHA-1", data);
return Array.from(new Uint8Array(hashBuffer))
.map((byte) => byte.toString(16).padStart(2, "0"))
.join("")
.toUpperCase();
}
async function breachCheck(type, rawValue, apiToken, dob = null) {
const value = type === "password" ? await sha1Hex(rawValue) : rawValue;
const payload = { type, value };
if (dob) {
payload.dob = dob;
}
const response = await fetch("https://api.provero.io/api/fraud-check/breach", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiToken}`,
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify(payload)
});
const responsePayload = await response.json();
if (!response.ok) {
throw new Error(responsePayload.message || "Breach detection request failed.");
}
return responsePayload;
}
breachCheck(type, rawValue, apiToken, dob)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.error(error);
});
Response Examples
Choose response example Success 11 examples
{
"value": "requested_value",
"type": "requested_type",
"leaks": [
{
"name": "Adobe",
"domain": "adobe.com",
"breachDate": "2013-10-04",
"description": "User profile and password hints were exposed."
}
],
"ageAtFirstBreach": 23
}
{
"requestError": {
"serviceException": {
"messageId": "Error message",
"code": "400"
}
}
}
{
"message": "Insufficient balance for validation request.",
"service": "breach-detection",
"required_amount": "0.0060000000",
"current_balance": "0.0000000000"
}
{
"message": "Please provide a type.",
"errors": {
"email": [
"Please provide a type."
]
}
}
{
"message": "Type must be one of email, username, phone, password.",
"errors": {
"type": [
"Type must be one of email, username, phone, password."
]
}
}
{
"message": "Please provide a value to search.",
"errors": {
"email": [
"Please provide a value to search."
]
}
}
{
"message": "The value field must be a valid email address.",
"errors": {
"type": [
"The value field must be a valid email address."
]
}
}
{
"message": "The value should be a valid phone number.",
"errors": {
"value": [
"The value should be a valid phone number."
]
}
}
{
"message": "The value must be a valid 40-character SHA-1 hash.",
"errors": {
"value": [
"The value must be a valid 40-character SHA-1 hash."
]
}
}
{
"message": "The dob field must match the format Y-m-d.",
"errors": {
"dob": [
"The dob field must match the format Y-m-d."
]
}
}
{
"message": "Type must be one of email, username, phone, password.",
"errors": {
"type": [
"Type must be one of email, username, phone, password."
]
}
}