Quickstart
Get from signup to live intercept in under 15 minutes. This guide walks through SDK installation, authentication, webhook registration, and firing a test intercept against a sandbox scammer.
Step 1 — Install the SDK
AVIEL ships an official Node.js SDK. Python and Go clients are in beta — contact engineering for access.
# npm
npm install @aviel/sdk
# yarn
yarn add @aviel/sdk
Step 2 — Authenticate
Retrieve your API key from the dashboard. Use avl_sandbox_ keys during testing — they never bill and only fire against synthetic scammer profiles.
import { AvielClient } from '@aviel/sdk';
const aviel = new AvielClient({
apiKey: 'avl_sandbox_xxxxxxxxxxxxxxxxxxxxxxxx',
environment: 'sandbox'
});
Step 3 — Register a webhook
Register the endpoint where AVIEL will POST intercept events. HTTPS required in production. HTTP is accepted in sandbox.
const webhook = await aviel.webhooks.register({
url: 'https://your-psp.example.com/aviel/events',
events: [
'intercept.triggered',
'intercept.stall_confirmed',
'fingerprint.created',
'alert.fraud_ops'
]
});
console.log(webhook.id); // wh_xxxxxxxxxxxxxxxx
Step 4 — Fire a test intercept
In sandbox mode, AVIEL provides synthetic scammer profiles. Trigger an intercept against a test profile to verify your webhook receives the event payload.
const intercept = await aviel.intercepts.trigger({
customerId: 'cust_test_001',
channel: 'sms',
scamTypeHint: 'investment_impersonation',
sandbox: true
});
console.log(intercept.status); // 'engaging'
console.log(intercept.interceptId); // int_xxxxxxxxxxxxxxxx
Your registered webhook endpoint should receive an intercept.triggered event within 2 seconds. Check your endpoint logs to confirm delivery.
Next steps
- Review the API Reference for all available endpoints
- Understand all webhook event types in Webhook Events
- Ready to go live? Contact engineering to enable production mode