Skip to content

SDKs

Package name: @ayzalai/risk-guard

Install:

npm install @ayzalai/risk-guard

Usage:

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');
}

Package name: ayzal-guard

Install:

pip install ayzal-guard

Sync usage:

import os
from 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")

Any language. POST JSON to /v1/check/email with the X-API-Key header.