Quickstart
From no account to a working check in a few minutes.
1. Create an API key
Section titled “1. Create an API key”- Sign up at https://heimdal.codebrewerz.com and start the 7-day trial.
- In the dashboard, open API keys and create a key.
- 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.
export HEIMDAL_API_KEY="hd_your_key"2. Make a request
Section titled “2. Make a request”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.
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"}'const response = await fetch("https://heimdal.codebrewerz.com/api/v1/check", { method: "POST", headers: { Authorization: `Bearer ${process.env.HEIMDAL_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ ip: "185.220.101.1", email: "test@mailinator.com" }), signal: AbortSignal.timeout(2000),});
console.log(await response.json());import axios from "axios";
const { data } = await axios.post( "https://heimdal.codebrewerz.com/api/v1/check", { ip: "185.220.101.1", email: "test@mailinator.com" }, { headers: { Authorization: `Bearer ${process.env.HEIMDAL_API_KEY}` }, timeout: 2000, },);
console.log(data);import os
import requests
response = requests.post( "https://heimdal.codebrewerz.com/api/v1/check", json={"ip": "185.220.101.1", "email": "test@mailinator.com"}, headers={"Authorization": f"Bearer {os.environ['HEIMDAL_API_KEY']}"}, timeout=2,)
print(response.json())// Java 11+, no dependencies.import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.time.Duration;
public class Check { public static void main(String[] args) throws Exception { String key = System.getenv("HEIMDAL_API_KEY"); if (key == null || key.isBlank()) { throw new IllegalStateException("Set HEIMDAL_API_KEY"); } HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(2)) .build(); HttpRequest request = HttpRequest.newBuilder(URI.create("https://heimdal.codebrewerz.com/api/v1/check")) .timeout(Duration.ofSeconds(2)) .header("Authorization", "Bearer " + key) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString("{\"ip\":\"185.220.101.1\",\"email\":\"test@mailinator.com\"}")) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); // 200: the check. Anything else: {"error":{"code","message"}}. System.out.println(response.statusCode() + " " + response.body()); }}// [dependencies]// reqwest = { version = "0.13", features = ["json", "query"] }// serde_json = "1"// tokio = { version = "1", features = ["macros", "rt-multi-thread"] }use std::time::Duration;
#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> { let key = std::env::var("HEIMDAL_API_KEY")?; let client = reqwest::Client::builder() .timeout(Duration::from_secs(2)) .build()?; let response = client .post("https://heimdal.codebrewerz.com/api/v1/check") .bearer_auth(&key) .json(&serde_json::json!({"ip":"185.220.101.1","email":"test@mailinator.com"})) .send() .await?; // 200: the check. Anything else: {"error":{"code","message"}}. let status = response.status(); let answer: serde_json::Value = response.json().await?; println!("{status} {answer}"); Ok(())}package main
import ( "fmt" "io" "net/http" "os" "strings" "time")
func main() { client := &http.Client{Timeout: 2 * time.Second} req, err := http.NewRequest("POST", "https://heimdal.codebrewerz.com/api/v1/check", strings.NewReader(`{"ip":"185.220.101.1","email":"test@mailinator.com"}`)) if err != nil { panic(err) } req.Header.Set("Authorization", "Bearer "+os.Getenv("HEIMDAL_API_KEY")) req.Header.Set("Content-Type", "application/json")
res, err := client.Do(req) if err != nil { panic(err) } defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body))}<?php// composer require guzzlehttp/guzzlerequire 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['timeout' => 2]);$response = $client->post("https://heimdal.codebrewerz.com/api/v1/check", [ 'headers' => ['Authorization' => 'Bearer ' . getenv('HEIMDAL_API_KEY')], 'json' => ['ip' => "185.220.101.1", 'email' => "test@mailinator.com"],]);
echo $response->getBody();3. Read the answer
Section titled “3. Read the answer”{ "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": [] }}blockis the short answer:truewhen any signal fired.reasonsnames the signals that fired.emailandiphold the detail for each value you sent. A value you did not send comes back asnull.
4. Decide
Section titled “4. Decide”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.
Next steps
Section titled “Next steps”- Check endpoint: every parameter and response field.
- Signals explained: what each signal means.
- Node.js guide: a complete helper with a timeout that fails open.
© 2026 CodeBrewerz. All rights reserved.
