Skip to content

Quickstart

From no account to a working check in a few minutes.

  1. Sign up at https://heimdal.codebrewerz.com and start the 7-day trial.
  2. In the dashboard, open API keys and create a key.
  3. Copy it. The full key is shown once and starts with hd_.

Put the key in an environment variable on your server. The examples below read it from HEIMDAL_API_KEY.

Terminal window
export HEIMDAL_API_KEY="hd_your_key"

Send an IP address, an email address, or both. This example sends an address that has served as a Tor exit node and a mailbox at a well-known disposable provider.

Terminal window
curl -X POST "https://heimdal.codebrewerz.com/api/v1/check" \
-H "Authorization: Bearer $HEIMDAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ip":"185.220.101.1","email":"test@mailinator.com"}'
{
"block": true,
"reasons": ["disposable_email", "tor", "vpn", "bad_isp"],
"email": {
"address": "test@mailinator.com",
"domain": "mailinator.com",
"disposable": true
},
"ip": {
"address": "185.220.101.1",
"tor": true,
"vpn": true,
"proxy": false,
"bad_isp": true,
"asn": 60729,
"isp": "TORSERVERS-NET Stiftung Erneuerbare Freiheit"
},
"custom": { "matched": [] }
}
  • block is the short answer: true when any signal fired.
  • reasons names the signals that fired.
  • email and ip hold the detail for each value you sent. A value you did not send comes back as null.

The simplest integration refuses the signup when block is true:

const result = await response.json();
if (result.block) {
// Refuse the signup, or ask for more proof.
}

block is strict: it is also true for an ordinary person on a VPN. Most products want something softer, such as refusing disposable email, Tor and open proxies while only logging VPN and hosting networks. Read Best practices before you ship.