Use the Blocklist API to manage your account's blocklisted variables. You may use the following endpoint to create an entry, which overrides the fraud_score value to 100 and sets appropriate risk analysis variables as true. If the API type supports a valid or active field (such as the email verification or phone verification API endpoints), these values will always be false. You can also add a reason why each entry made this list.
- Proxy & VPN Detection API
- Email Verification API
- Phone Number Validation API
- Device Fingerprint API
- Malicious URL Scanner API
- Mobile Device Fingerprinting SDK
- Gaming Fraud Detection SDK
- Dark Web Leak API
- Malware File Scanner API
- Request List API
- Fraud Reporting API
- Account Management APIs
- Bulk Validation CSV API
- Allowlist & Blocklist APIs
- Plugins Platforms & Integrations
- IP Reputation Database
- Email Verification Database
- Custom Integrations
- Country List API
Creating Blocklist Entries
About
API Request URL
Request Parameters
This API endpoint has 3 required input parameters, and 1 optional parameter.
Required:
- value - The value you wish to block list.
- value_type - What kind of value you're block listing (EG: ip, cidr, etc... see below)
- type - What API you wish to block list this value for. (One of: proxy, url, email, phone, mobiletracker, devicetracker)
Optional:
- reason - Why did this entry make your block list.
Accepted Type | Description | Accepted value_types |
proxy | The IP you wish to add to the blocklist. (e.g., 1.1.1.1) | ip |
A CIDR (formatted IP/network) you wish to add to the blocklist. (e.g., 1.1.1.0/24) | cidr | |
The name of an ISP you wish to blocklist. | isp | |
devicetracker | The DeviceID you wish to blocklist. (e.g., b2q3...) | deviceid |
The IP you wish to add to the blocklist. (e.g., 1.1.1.1) | ip | |
A CIDR (formatted IP/network) you wish to add to the blocklist. (e.g., 1.1.1.0/24) | cidr | |
The name of an ISP you wish to blocklist. (e.g., Spectrum) | isp | |
mobiletracker | The DeviceID you wish to blocklist. (e.g., b2q3...) | deviceid |
The IP you wish to add to the blocklist. (e.g., 1.1.1.1) | ip | |
A CIDR (formatted IP/network) you wish to add to the blocklist. (e.g., 1.1.1.0/24) | cidr | |
The name of an ISP you wish to blocklist. (e.g., Spectrum) | isp | |
The email you wish to blocklist. (e.g., noreply@ipqualityscore.com) | ||
url | The domain you wish to blocklist. (e.g., ipqualityscore.com) | domain |
phone | The phone number you wish to blocklist. (e.g., 1-800-713-2618 or 18007132618) | phone |
custom | The variable you wish to blocklist. (e.g., 1234) | your_custom_variable (e.g., userID) |
Example Response
This is an example success response in JSON format. Responses are also available in XML format.
1
{
2
"success":true,
3
"message":"Successfully inserted Block List entry.",
4
"data":[],
5
"request_id":"CXSWDmbNcw"
6
}
EXAMPLE CODE
xxxxxxxxxx
1
<?php
2
3
/*
4
* Create an entry in the Blocklist.
5
*/
6
7
// create post fields
8
$post = [
9
'value' => '1.1.1.1',
10
'value_type' => 'ip',
11
'type' => 'proxy',
12
'reason' => 'The reason this entry is on the Blocklist.'
13
];
14
15
// Initialise the cURL var
16
$ch = curl_init();
17
18
// Get the response from cURL
19
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
20
21
// Set type to POST
22
curl_setopt($ch,CURLOPT_POST, 1);
23
24
// Set the POST parameters
25
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
26
27
// Set the endpoint to request.
28
curl_setopt($ch, CURLOPT_URL, 'https://ipqualityscore.com/api/json/blocklist/create/YOUR_API_KEY_HERE');
29
30
// Execute the request
31
$raw_response = curl_exec($ch);
32
33
// Decode the response.
34
$response = json_decode($raw_response, true);
35
36
// Print out the result or error.
37
if($response['success']){
38
echo "Entry created successfully!";
39
} else {
40
echo "Failed to create entry: ".$response['message'];
41
}