URL Callback Notifications

How to setup a URL Callback

URL Callback Notifications allow blacklist alert processing on your own server. Whenever a monitored domain or IP address gets blacklisted or delisted, Debouncer will submit JSON payload to the callback URL you provide. This URL needs to be verified and approved by us.

To setup a URL Callback, you should create and test callback script, then submit the URL via help desk. Once URL is approved, you can add it to your contact lists.


URL callback fields

Field Description and values
monitor IP address or domain name
monitor_type 1 - IP, 2 - domain
event_type 1 - listed, 2 - delisted, 3 - blacklist removed from database, 4 - blacklist ignored
event_datetime_utc Event date and time, timezone is UTC
severity Blacklist severity. 1 - medium, 2 - high
blacklist_name Blacklist name
blacklist_description Blacklist description
blacklist_url Blacklist URL

URL callback listener example

<?php
// URL callback processing example
$obj = json_decode(file_get_contents('php://input'), true);    
$fp = fopen( 'file.txt', 'a' );
fwrite( $fp,
$obj["monitor"] . ";" .  // ip or domain name
$obj["monitor_type"] . ";" .   // 1 - IP, 2 - domain
$obj["event_type"] . ";" .  // 1 - listed, 2 - delisted, 3 - blacklist removed from database, 4 - blacklist ignored
$obj["event_datetime_utc"] . ";" .  // event date and time , timezone is UTC
$obj["severity"] . ";" . // 1 - medium severity, 2 - high severity
$obj["blacklist_name"] . ";" .  // blacklist name
$obj["blacklist_description"] . ";" .  // blacklist description
$obj["blacklist_url"] . ";" .  // blacklist_url
"\n" );
?>

URL callback listener test example

<?php
$url = 'http://www.yourwebsite.com/listener.php'; // your callback listener URL
$jsonData = array(
    'monitor' => '1.2.3.4',
    'monitor_type' => '1',
    'event_type' => '1',
    'event_datetime_utc' => '2018-11-22 17:03:23',
    'severity' => '2',
    'blacklist_name' => 'rbl.domain.org',
    'blacklist_description' => 'Some RBL',
    'blacklist_url' => 'http://domain.org/'    
);

$jsonDataEncoded = json_encode($jsonData);

$ch = curl_init( $url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$response = curl_exec( $ch );
echo $response;
?>