Blacklist Webhooks

Last modified: October 12, 2021


Overview

Blacklist webhooks allow you to easily access blacklist data from other programs.

Using the blacklist webhook

The blacklist webhook sends a POST request with JSON data inside the payload parameter.

An example of the JSON data:

{"id": "5bf6c13e3f0bc1621c3e1ee3","tags": null,"list": [{"target": "1.0.0.4","blacklist": "dyna.spamrats.com","status": "DOWN"},{"target": "1.0.0.4","blacklist": "all.spamrats.com","status": "DOWN"},{"target": "1.0.0.5","blacklist": "dyna.spamrats.com","status": "DOWN"},{"target": "1.0.0.3","blacklist": "dyna.spamrats.com","status": "OK"}]}

The following PHP script will read the webhook data:

<?php
$data = json_decode($_POST['payload'], true);
$id = $data['id'];
foreach($data['list'] as $listing) {
if($listing['status' == 'DOWN']) echo $listing['target'].' is listed on '.$listing['blacklist'];
else echo $listing['target'].' has been delisted on '.$listing['blacklist'];
}
?>

Get Started With 360

360 Dashboard

360 Monitoring Dashboard