NAV Navbar
shell ruby python javascript php powershell
  • FraudGuard.io API Docs
  • Get Specific IP Reputation
  • Get Tracked IPs by Threat
  • Get Tracked IPs by Risk
  • Get Custom Blacklist
  • Get Custom Whitelist
  • Get Custom GeoBlock
  • Post to Custom Blacklist
  • Post to Custom Whitelist
  • Delete from Custom Blacklist
  • Delete from Custom Whitelist
  • Errors
  • FraudGuard.io API Docs

    Get Specific IP Reputation

    This API endpoint retrieves IP reputation data for a specific IP.

    Note: This API is included in the Free Hacker Plan.

    curl -X GET -u "username:password" "https://@api.fraudguard.io/ip/1.1.1.1"
    
    require 'net/http'
    require 'net/https'
    
    def get_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Get.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts get_ip('api.fraudguard.io','/ip/1.1.1.1','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.get('https://api.fraudguard.io/ip/1.1.1.1', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/ip/1.1.1.1',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.get(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/ip/1.1.1.1';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/ip/1.1.1.1' -Headers $Headers
    

    The above command returns JSON structured like this:

    {
        "isocode":"US",
        "country":"United States",
        "state":"CO",
        "city":"Loveland",
        "discover_date":"2016-03-18 02:57:40",
        "threat":"open public proxy",
        "risk_level":"3"
    }
    

    HTTP Request

    GET https://api.fraudguard.io/ip/<IP>

    URL Parameters

    Parameter Description
    IP Any IPv4 or IPv6 address

    Get Tracked IPs by Threat

    This API endpoint retrieves the top tracked IPs by risk level.

    Note: This API is not included in the Free Hacker Plan.

    curl -X GET -u "username:password" "https://@api.fraudguard.io/trackedips/threat/honeypot_tracker/0"
    
    require 'net/http'
    require 'net/https'
    
    def get_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Get.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts get_ip('api.fraudguard.io','/trackedips/threat/honeypot_tracker/0','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.get('https://api.fraudguard.io/trackedips/threat/honeypot_tracker/0, verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/trackedips/threat/honeypot_tracker/0',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.get(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/trackedips/threat/honeypot_tracker/0';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/trackedips/threat/honeypot_tracker/0' -Headers $Headers
    

    The above command returns JSON structured like this:

    [
      "34.213.199.191",
      "88.255.168.202",
      "188.72.127.135",
      "39.36.26.19",
      "89.32.68.96"
    ]
    

    HTTP Request

    GET https://api.fraudguard.io/trackedips/threat/<threat_type>/<offset>

    URL Parameters

    Parameter Description
    Threat Type Threat Types - please see FAQ for more info
    Offset Your count offset for retrieving bulk IP info - please see FAQ for more info

    Get Tracked IPs by Risk

    This API endpoint retrieves the top tracked IPs by risk level.

    Note: This API is not included in the Free Hacker Plan.

    curl -X GET -u "username:password" "https://@api.fraudguard.io/trackedips/risk/5/0"
    
    require 'net/http'
    require 'net/https'
    
    def get_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Get.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts get_ip('api.fraudguard.io','/trackedips/risk/5/0','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.get('https://api.fraudguard.io/trackedips/risk/5/0', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/trackedips/risk/5/0',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.get(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/trackedips/risk/5/0';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/trackedips/risk/5/0' -Headers $Headers
    

    The above command returns JSON structured like this:

    [
      "34.213.199.191",
      "88.255.168.202",
      "188.72.127.135",
      "39.36.26.19",
      "89.32.68.96"
    ]
    

    HTTP Request

    GET https://api.fraudguard.io/trackedips/risk/<risk_level>/<offset>

    URL Parameters

    Parameter Description
    Risk Level Risk levels 2-5 - please see FAQ for more info
    Offset Your count offset for retrieving bulk IP info - please see FAQ for more info

    Get Custom Blacklist

    This API endpoint retrieves your custom blacklist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X GET -u "username:password" "https://@api.fraudguard.io/blacklist/0"
    
    require 'net/http'
    require 'net/https'
    
    def get_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Get.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts get_ip('api.fraudguard.io','/blacklist/0','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.get('https://api.fraudguard.io/blacklist/0', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/blacklist/0',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.get(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/blacklist/0';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/blacklist/0' -Headers $Headers
    

    The above command returns JSON structured like this:

    [
      "52.36.72.37",
      "144.24.162.232",
      "166.13.138.114",
      "150.44.117.213",
      "51.27.12.0/24",
      "71.157.88.0/24"
    ]
    

    HTTP Request

    GET https://api.fraudguard.io/blacklist/<offset>

    URL Parameters

    Parameter Description
    Offset Your count offset for retrieving bulk IP info - please see FAQ for more info

    Get Custom Whitelist

    This API endpoint retrieves your custom whitelist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X GET -u "username:password" "https://@api.fraudguard.io/whitelist/0"
    
    require 'net/http'
    require 'net/https'
    
    def get_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Get.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts get_ip('api.fraudguard.io','/whitelist/0','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.get('https://api.fraudguard.io/whitelist/0', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/whitelist/0',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.get(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/whitelist/0';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/whitelist/0' -Headers $Headers
    

    The above command returns JSON structured like this:

    [
      "4.55.39.206",
      "149.254.117.146",
      "29.99.253.192",
      "240.183.218.206",
      "51.27.12.0/24",
      "71.157.88.0/24"
    ]
    

    HTTP Request

    GET https://api.fraudguard.io/whitelist/<offset>

    URL Parameters

    Parameter Description
    Offset Your count offset for retrieving bulk IP info - please see FAQ for more info

    Get Custom GeoBlock

    This API endpoint retrieves your custom Geographic blacklist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X GET -u "username:password" "https://@api.fraudguard.io/geoblock/0"
    
    require 'net/http'
    require 'net/https'
    
    def get_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Get.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts get_ip('api.fraudguard.io','/geoblock/0','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.get('https://api.fraudguard.io/geoblock/0', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/geoblock/0',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.get(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/geoblock/0';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/geoblock/0' -Headers $Headers
    

    The above command returns JSON structured like this:

    [
    "24.51.64.0/18",
    "24.206.0.0/19",
    "24.231.32.0/19"
    "64.66.0.0/20",
    "64.150.192.0/18"
    ]
    

    HTTP Request

    GET https://api.fraudguard.io/geoblock/<offset>

    URL Parameters

    Parameter Description
    Offset Your count offset for retrieving bulk IP info - please see FAQ for more info

    Post to Custom Blacklist

    This API endpoint adds to your custom blacklist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X POST -u "username:password" "https://@api.fraudguard.io/blacklist"
    
    require 'net/http'
    require 'net/https'
    
    def post_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Post.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts post_ip('api.fraudguard.io','/blacklist','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.post('https://api.fraudguard.io/blacklist', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/blacklist',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.post(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/blacklist';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_POST,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/blacklist' -Headers $Headers
    

    The above command needs to POST a JSON body example like this:

    [
    "33.204.31.152",
    "22.138.235.67",
    "24.51.147.29",
    "21.10.48.57",
    "35.0.177.190"
    ]
    

    The above command returns JSON structured like this:

    {
      "deleted": 0,
      "inserted": 5,
      "errors": 0
    }
    

    POST Body Example (JSON)

    HTTP Request

    POST https://api.fraudguard.io/blacklist

    Post to Custom Whitelist

    This API endpoint adds to your custom whitelist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X POST -u "username:password" "https://@api.fraudguard.io/whitelist"
    
    require 'net/http'
    require 'net/https'
    
    def post_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Post.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts post_ip('api.fraudguard.io','/whitelist','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.post('https://api.fraudguard.io/whitelist', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/whitelist',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.post(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/whitelist';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_POST,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/whitelist' -Headers $Headers
    

    The above command needs to POST a JSON body example like this:

    [
    "33.204.31.152",
    "22.138.235.67",
    "24.51.147.29",
    "21.10.48.57",
    "35.0.177.190"
    ]
    

    The above command returns JSON structured like this:

    {
      "deleted": 0,
      "inserted": 5,
      "errors": 0
    }
    

    POST Body Example (JSON)

    HTTP Request

    POST https://api.fraudguard.io/whitelist

    Delete from Custom Blacklist

    This API endpoint deletes from your custom blacklist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X DELETE -u "username:password" "https://@api.fraudguard.io/blacklist"
    
    require 'net/http'
    require 'net/https'
    
    def delete_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Delete.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts delete_ip('api.fraudguard.io','/blacklist','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.delete('https://api.fraudguard.io/blacklist', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/blacklist',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.delete(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/blacklist';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, DELETE);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/blacklist' -Headers $Headers
    

    The above command needs to include a JSON body example like this:

    [
    "33.204.31.152",
    "22.138.235.67",
    "24.51.147.29",
    "21.10.48.57",
    "35.0.177.190"
    ]
    

    The above command returns JSON structured like this:

    {
      "deleted": 5,
      "inserted": 0,
      "errors": 0
    }
    

    DELETE Body Example (JSON)

    HTTP Request

    DELETE https://api.fraudguard.io/blacklist

    Delete from Custom Whitelist

    This API endpoint adds to your custom whitelist built in FraudGuard.io

    Note: This API is not included in the Free Hacker Plan.

    curl -X DELETE -u "username:password" "https://@api.fraudguard.io/whitelist"
    
    require 'net/http'
    require 'net/https'
    
    def delete_ip(server,path,username,password)
    http = Net::HTTP.new(server,443)
    req = Net::HTTP::Delete.new(path)
    http.use_ssl = true
    req.basic_auth username, password
    response = http.request(req)
    return response.body
    end
    
    puts delete_ip('api.fraudguard.io','/whitelist','username','password')
    
    import requests
    from requests.auth import HTTPBasicAuth
    ip=requests.delete('https://api.fraudguard.io/whitelist', verify=True, auth=HTTPBasicAuth('username', 'password'))
    print ip.text
    
    var options = {
       host: 'api.fraudguard.io',
       port: 443,
       path: '/whitelist',
       headers: {
          'Authorization': 'Basic ' + new Buffer(username + ':' + password).toString('base64')
       }   
    };
    
    request = https.delete(options, function(res){
       var body = "";
       res.on('data', function(data) {
          body += data;
       });
       res.on('end', function() {
          console.log(body);
       })
       res.on('error', function(e) {
          onsole.log("Got error: " + e.message);
       });
        });
    
    }
    
    <?php
    $login = 'username';
    $password = 'password';
    $url = 'https://@api.fraudguard.io/whitelist';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, DELETE);
    curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
    $result = curl_exec($ch);
    curl_close($ch);
    echo($result);
    
    $user = 'username'
    $pass = 'password'
    $pair = "$($user):$($pass)"
    $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
    $basicAuthValue = "Basic $encodedCreds"
    
    $Headers = @{
        Authorization = $basicAuthValue
    }
    
    Invoke-WebRequest -Uri 'https://api.fraudguard.io/whitelist' -Headers $Headers
    

    The above command needs to include a JSON body example like this:

    [
    "33.204.31.152",
    "22.138.235.67",
    "24.51.147.29",
    "21.10.48.57",
    "35.0.177.190"
    ]
    

    The above command returns JSON structured like this:

    {
      "deleted": 5,
      "inserted": 0,
      "errors": 0
    }
    

    DELETE Body Example (JSON)

    HTTP Request

    DELETE https://api.fraudguard.io/whitelist

    Errors

    The FraudGuard.io API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your login credentials are invalid.
    429 Too Many Requests -- You've exceeded the number of API requests allocated in your pricing plan. You need to upgrade to enable this feature.
    500 Internal Server Error -- It's our bad. We've had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.