cURL
curl --request POST \
--url https://api.deflect.bot/verify \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"action_id": "<string>",
"token": "<string>",
"id": "<string>",
"email": "[email protected]",
"phone_number": "<string>"
}
'import requests
url = "https://api.deflect.bot/verify"
payload = {
"api_key": "<string>",
"action_id": "<string>",
"token": "<string>",
"id": "<string>",
"email": "[email protected]",
"phone_number": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
action_id: '<string>',
token: '<string>',
id: '<string>',
email: '[email protected]',
phone_number: '<string>'
})
};
fetch('https://api.deflect.bot/verify', 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.deflect.bot/verify",
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([
'api_key' => '<string>',
'action_id' => '<string>',
'token' => '<string>',
'id' => '<string>',
'email' => '[email protected]',
'phone_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.deflect.bot/verify"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"action_id\": \"<string>\",\n \"token\": \"<string>\",\n \"id\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.deflect.bot/verify")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"action_id\": \"<string>\",\n \"token\": \"<string>\",\n \"id\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deflect.bot/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"action_id\": \"<string>\",\n \"token\": \"<string>\",\n \"id\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"user_id": "<string>",
"score": 123,
"verdict": {
"can_pass": true,
"redeemed": true
},
"device": {
"fingerprint": "<string>",
"user_agent": "<string>",
"browser": "<string>",
"languages": "<string>",
"timezone": "<string>",
"os": "<string>",
"is_mobile": true
},
"ip": {
"address": "<string>",
"type": "<string>",
"is_datacenter": true,
"is_proxy": true,
"is_tor": true,
"is_vpn": true,
"is_threat": true,
"is_bogon": true,
"asn": "<string>",
"asn_number": 123
},
"location": {
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"continent": "<string>",
"latitude": 123,
"longitude": 123
},
"email": {
"address": "<string>",
"normalized": "<string>",
"valid": true,
"trust_score": 123,
"domain_name": "<string>",
"domain_type": "<string>",
"flags": [
"<string>"
]
},
"phone": {
"valid": true,
"country_code": "<string>",
"country_name": "<string>",
"carrier": "<string>",
"line_type": "<string>"
},
"session": {
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
},
"rules": [
{
"action": "<string>",
"name": "<string>",
"id": "<string>",
"source": "<string>",
"shadow": true
}
],
"multi_accounting": {
"detected": true,
"risk": "<string>",
"score": 123,
"accounts": [
{
"user_id": "<string>",
"email": "<string>",
"signals": [
"<string>"
],
"confidence": 123,
"session_count": 123,
"last_activity": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": false,
"message": "invalid_token"
}Endpoints
Get Bot Verdict
Fetch bot verdict for a user session token
POST
/
verify
cURL
curl --request POST \
--url https://api.deflect.bot/verify \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"action_id": "<string>",
"token": "<string>",
"id": "<string>",
"email": "[email protected]",
"phone_number": "<string>"
}
'import requests
url = "https://api.deflect.bot/verify"
payload = {
"api_key": "<string>",
"action_id": "<string>",
"token": "<string>",
"id": "<string>",
"email": "[email protected]",
"phone_number": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
action_id: '<string>',
token: '<string>',
id: '<string>',
email: '[email protected]',
phone_number: '<string>'
})
};
fetch('https://api.deflect.bot/verify', 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.deflect.bot/verify",
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([
'api_key' => '<string>',
'action_id' => '<string>',
'token' => '<string>',
'id' => '<string>',
'email' => '[email protected]',
'phone_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.deflect.bot/verify"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"action_id\": \"<string>\",\n \"token\": \"<string>\",\n \"id\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.deflect.bot/verify")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"action_id\": \"<string>\",\n \"token\": \"<string>\",\n \"id\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deflect.bot/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"action_id\": \"<string>\",\n \"token\": \"<string>\",\n \"id\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"user_id": "<string>",
"score": 123,
"verdict": {
"can_pass": true,
"redeemed": true
},
"device": {
"fingerprint": "<string>",
"user_agent": "<string>",
"browser": "<string>",
"languages": "<string>",
"timezone": "<string>",
"os": "<string>",
"is_mobile": true
},
"ip": {
"address": "<string>",
"type": "<string>",
"is_datacenter": true,
"is_proxy": true,
"is_tor": true,
"is_vpn": true,
"is_threat": true,
"is_bogon": true,
"asn": "<string>",
"asn_number": 123
},
"location": {
"city": "<string>",
"postal_code": "<string>",
"country": "<string>",
"continent": "<string>",
"latitude": 123,
"longitude": 123
},
"email": {
"address": "<string>",
"normalized": "<string>",
"valid": true,
"trust_score": 123,
"domain_name": "<string>",
"domain_type": "<string>",
"flags": [
"<string>"
]
},
"phone": {
"valid": true,
"country_code": "<string>",
"country_name": "<string>",
"carrier": "<string>",
"line_type": "<string>"
},
"session": {
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
},
"rules": [
{
"action": "<string>",
"name": "<string>",
"id": "<string>",
"source": "<string>",
"shadow": true
}
],
"multi_accounting": {
"detected": true,
"risk": "<string>",
"score": 123,
"accounts": [
{
"user_id": "<string>",
"email": "<string>",
"signals": [
"<string>"
],
"confidence": 123,
"session_count": 123,
"last_activity": "2023-11-07T05:31:56Z"
}
]
}
}{
"success": false,
"message": "invalid_token"
}Response Format
The API returns detailed information about the request, including:- Verdict - Whether the request should be allowed (
can_pass: true/false) and whether the token had already been redeemed (redeemed: true/false) - Device information - Browser details, fingerprint, user agent
- IP analysis - Location, threat indicators, proxy/VPN detection
- Session data - Timing and behavioral analysis
Token Redemption
Tokens can be verified more than once — replay does not produce an error. Useverdict.redeemed to detect it:
verdict.redeemed: false— first time this token has been verifiedverdict.redeemed: true— this token was already verified by a previous/verifycall
verdict.redeemed is true.
Testing
For local development, use test action IDs that return predictable results without consuming API credits:- Success:
t/FFFFFFFFFFFFF/111111111(always returnscan_pass: true) - Failure:
t/FFFFFFFFFFFFF/000000000(always returnscan_pass: false)
Body
application/json
Verdict request with session token and optional user identification
Response
Successful response