Documentationالتوثيق التقني

Integrate SecureVoice in an afternoon

Everything a bank integration team needs: the intervention event flow, the conversation turn API, guardrail policy, and the reference deployment running this very site.

All examples below are live against this deployment — no sandbox keys required.

Three calls to production

The reference deployment below is the exact stack serving this website: Next.js route handlers, PostgreSQL persistence (via Prisma), and neural voice endpoints. Swap the base URL and API key, and the same calls run inside your VPC.

01

Subscribe to intervention events

Point your fraud-orchestration webhook at SecureVoice. When a transaction crosses your risk threshold, we place the intervention call and stream every phase transition back to you.

step-01.sh
curl -X POST https://securevoiceai.me/v1/webhooks \
  -H "Authorization: Bearer sv_live_…" \
  -d '{
    "url": "https://fraud.yourbank.ae/hooks/securevoice",
    "events": ["intervention.started", "account.frozen",
               "case.closed", "escalated.human"]
  }'
02

Handle the conversation turn

During a live call, each customer utterance can be routed through the guardrailed turn API — the same deterministic decision surface that powers this demo. It never asks for PINs, passwords or OTPs.

step-02.sh
curl -X POST /api/agent \
  -H "Content-Type: application/json" \
  -d '{ "text": "That wasn't me, stop it!",
        "lang": "en" }'

# → { "intent": "deny_fraud",
#     "action": "card_freeze",
#     "reply": "I've frozen the card…" }
03

Close the loop

When the customer confirms fraud, SecureVoice freezes the card, writes the case file, and hands off to your human agent with a full bilingual transcript and audit trail.

step-03.sh
{
  "event": "case.closed",
  "case_id": "FRAUD-2026-08612",
  "outcome": "fraud_confirmed",
  "action_taken": "card_freeze",
  "prevented_loss_aed": 2500,
  "transcript_url": "s3://sv-audit/…"
}