#
Send a request
To analyze a signup or login event, send a POST request to the /
endpoint with the required fields:
#
Code Samples
curl -X POST "https://api.gatekeepr.ro" \
-H "X-Authorization: [API_KEY]" \
-H "Content-Type: application/json" \
-d '{
"email": "john@gmail.com",
"ip": "0.0.0.0",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"
}'
try {
const res = await fetch("https://api.gatekeepr.ro", {
method: "POST",
headers: {
"X-Authorization": "[API_KEY]",
"Content-Type": "application/json"
},
body: JSON.stringify({
email: "john@gmail.com",
ip: "0.0.0.0",
user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"
})
})
const json = await res.json()
console.log(json)
} catch(err) {
console.log(err)
}
<?php
$apiKey = "[API_KEY]";
$url = "https://api.gatekeepr.ro";
$data = [
"email" => "john@gmail.com",
"ip" => "0.0.0.0",
"user_agent" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-Authorization: $apiKey",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
#
Response
The API returns a JSON object containing:
{
"fraudScore": 0,
"errors": [],
"ip": {
"valid": true,
"cable_dsl_isp": true,
"tor_exit_node": false
},
"email": {
"rfc5322": true,
"no_dummy_role": true,
"disposable": false
},
"ua": {},
"domain": {
"syntax_valid": true,
"with_mx": true,
"settled": true
}
}
You can use the fraudScore
and individual flags to decide whether to allow, challenge, or block the signup.