Usage alerts and webhooks
Know before you run out: emails and signed webhooks at 80% and 100% of your daily lookups.
Set up alerts
In your dashboard under Usage alerts, choose emails at 80% and 100% of your daily lookups, and optionally a webhook URL. Each alert is sent at most once per day (UTC). The webhook URL must use HTTPS on a public address.
Webhook events and payload
Events: usage.80, usage.100, and usage.test from the Send test button. Each request is a POST with a JSON body, the header X-IPzentra-Event, and X-IPzentra-Signature: sha256=..., an HMAC-SHA256 of the raw body using your signing secret. Answer with any 2xx status.
{"event":"usage.80","sent_at":"2026-10-14T09:30:00Z","account_id":123,"plan":"pro","used":16000,"limit":20000,"percent":80,"day":"2026-10-14","resets_at":"2026-10-15T00:00:00Z"}
Verify the signature
PHP
$body = file_get_contents('php://input');
$sig = 'sha256=' . hash_hmac('sha256', $body, 'whsec_YOUR_SECRET');
if (!hash_equals($sig, $_SERVER['HTTP_X_IPZENTRA_SIGNATURE'] ?? '')) { http_response_code(401); exit; }
$event = json_decode($body, true);Node.js (Express)
app.post('/ipzentra-webhook', express.raw({ type: 'application/json' }), (req, res) => {
const sig = 'sha256=' + crypto.createHmac('sha256', 'whsec_YOUR_SECRET').update(req.body).digest('hex');
const got = req.get('X-IPzentra-Signature') || '';
if (got.length !== sig.length || !crypto.timingSafeEqual(Buffer.from(got), Buffer.from(sig))) return res.sendStatus(401);
const event = JSON.parse(req.body);
res.sendStatus(200);
});Python (Flask)
body = request.get_data()
sig = 'sha256=' + hmac.new(b'whsec_YOUR_SECRET', body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(sig, request.headers.get('X-IPzentra-Signature', '')):
abort(401)
event = json.loads(body)Need a hand? Search the Help Center or open a support ticket. We usually reply within one business day.