Skip to content

HTTP API

smtp-probe includes a built-in HTTP server for programmatic access.

Starting the Server

smtp-probe serve                    # default: :8080
smtp-probe serve --port 9090        # custom port

Endpoints Summary

EndpointMethodParameters
/v1/healthGET
/v1/checkGETdomain=example.com
/v1/verifyGETemail, bind_ip, timeout, disposable, pool
/v1/blacklistGETip=1.2.3.4
/v1/reportGETdomain=example.com

Examples

Health Check

curl http://localhost:8080/v1/health
# {"status":"ok"}

Domain Check

curl "http://localhost:8080/v1/check?domain=gmail.com"
{
  "domain": "gmail.com",
  "score": 95,
  "spf": {"valid": true, "record": "v=spf1 redirect=_spf.google.com"},
  "dkim": {"valid": true},
  "dmarc": {"valid": true, "policy": "reject"},
  "mx": [{"host": "gmail-smtp-in.l.google.com", "priority": 5}],
  "ptr": {"valid": false}
}

Email Verify

curl "http://localhost:8080/v1/verify?email=user@example.com"
curl "http://localhost:8080/v1/verify?email=user@example.com&bind_ip=1.2.3.4&timeout=30s"
curl "http://localhost:8080/v1/verify?email=user@example.com&disposable=true&pool=true"

Blacklist Check

curl "http://localhost:8080/v1/blacklist?ip=1.2.3.4"

Full Report

curl "http://localhost:8080/v1/report?domain=example.com"