SDKs
Node.js
Section titled “Node.js”Package name: @ayzalai/risk-guard
Install:
npm install @ayzalai/risk-guardUsage:
import { AyzalGuard } from '@ayzalai/risk-guard';
const guard = new AyzalGuard({ apiKey: process.env.AYZAL_GUARD_KEY,});
const result = await guard.check('user@example.com', { clientIp: '203.0.113.42',});
if (result.verdict === 'disposable' || result.verdict === 'invalid') { throw new Error('Please use a real email address');}Python
Section titled “Python”Package name: ayzal-guard
Install:
pip install ayzal-guardSync usage:
import osfrom ayzal_guard import AyzalGuard
guard = AyzalGuard(api_key=os.environ["AYZAL_GUARD_KEY"])
result = guard.check("user@example.com", client_ip="203.0.113.42")if result.verdict in ("disposable", "invalid"): raise ValueError("Please use a real email address")Async variant:
from ayzal_guard import AsyncAyzalGuard
async with AsyncAyzalGuard(api_key=os.environ["AYZAL_GUARD_KEY"]) as guard: result = await guard.check("user@example.com", client_ip="203.0.113.42")Raw HTTP
Section titled “Raw HTTP”Any language. POST JSON to /v1/check/email with the X-API-Key header.
