Campaign IP Blocklist API

Overview

When sending campaign_id with Vetting API calls, E-HAWK tracks campaign performance in real time. If you are using any ad platform that supports IPs blocking per campaign, use this API to get a list of all IPs to add to campaign blocklists in Google, Bing, and many other advertising platforms. This will block these bad IPs from getting campaign traffic.

Endpoint (5.13)

https://feed-api.ehawk.net/report/campaign_ip_blocklist/

The API accepts both HTTPS POST and HTTPS GET.

For GET use the format:
https://feed-api.ehawk.net/report/campaign_ip_blocklist/?keyword=value

When using POST, make sure to have Content-Type: application/x-www-form-urlencoded

CURL POST API call example:
$ curl -X POST -H Content-Type:application/x-www-form-urlencoded -d 'apikey=your_apikey' https://feed-api.ehawk.net/report/campaign_ip_blocklist/

Keywords

Every API call requires the apikey and you can add keywords and values to customize your filters.

Keyword Value and Format
apikey Your E-HAWK Vetting API KEY (required)
period Default is 3: Number of days to include in the report. Value can be 1 to 15. Set to 15 for the last fifteen days. For current day, use 1.
min_leads Minimum leads for the campaign within the period. Default 100. To filter for campaigns with 10 or more leads, set to 10.
score_threshold Threshold risk score setting (what is the cutoff of the lead score). Default is -100. Range is -100 to -1. if set to -71, then all leads that score -71 or worse will be included in the 'bad' lists for IPs.
search Search by Campaign Name. Format is search=value. Search is value + wildcard.
lead_source Filter for matching of lead source. Format is lead_source=value. Search is value + wildcard. Example, search=abc finds all that start with abc.
email_unique true (string not boolean)

Default is 'false'. Send as 'true' if you want to only count unique emails. If your campaign has five API calls for abc@xyz.com, then setting to 'true' will only include the first one in IP Blocklist search and counts, even if that email is coming from many different IPs.

As an example, calling the API POST for an IP blocklist by campaign name of the last 5 days and minimum lead count of 10 and a threshold of -71 with CURL:
$ curl -X POST -H Content-Type:application/x-www-form-urlencoded -d 'apikey=your_apikey&period=5&min_leads=10&score_threshold=-71' https://feed-api.ehawk.net/report/campaign_ip_blocklist/

And with GET:
https://feed-api.ehawk.net/report/campaign_ip_blocklist?apikey=your_apikey&period=5&min_leads=10&score_threshold=-71

Response

The IP blocklist data is returned as a JSON in the following format, listing each campaign name, all the IPs to blocklist, the number of hits (lead that exceeded the score threshold), and the lead sources. In this example, Campaign 12345 had 10 total leads over the defined period, with two IPs sending leads that scored bad.

Status Codes

Status Response
200 OK (no errors)
502 Invalid APIKEY or URL