Platforms
India-specific PII redaction for WhatsApp Business chat flows.
About 6 minutes hands-on
What this guide does not cover
- Covers the guard call, not WhatsApp Business API onboarding, template approval, or number verification.
- India PII detection is pattern and context based. It reduces exposure; it does not certify compliance with any regulation.
Integration flow
message flow
WhatsApp Message → Soter Input Guard → LLM/RAG → Soter Output Guard → WhatsApp Reply1. Route inbound WhatsApp messages through input guard before the LLM
2. Route model responses through output guard before replying to users
3. Enable India PII redaction for Aadhaar, PAN, UPI IDs
4. Configure webhooks for blocked prompts and PII redactions
Environment
Terminal
SOTER_API_KEY=ck_live_your_key_here
# SOTER_BASE_URL is optional if using the SDK — a default is includedAPI example
TypeScript
1// Guard incoming WhatsApp message (server-side)
2const inputResult = await fetch(`${process.env.SOTER_BASE_URL}/api/guard/input`, {
3 method: "POST",
4 headers: {
5 "x-api-key": process.env.SOTER_API_KEY,
6 "Content-Type": "application/json",
7 },
8 body: JSON.stringify({
9 message: userMessage,
10 userId: senderPhoneNumber, // traceable identifier
11 }),
12}).then((r) => r.json());
13
14if (inputResult.action === "BLOCK") {
15 return sendWhatsAppReply(sender, "I couldn't process that message.");
16}
17
18// Guard the AI response before sending
19const outputResult = await fetch(`${process.env.SOTER_BASE_URL}/api/guard/output`, {
20 method: "POST",
21 headers: {
22 "x-api-key": process.env.SOTER_API_KEY,
23 "Content-Type": "application/json",
24 },
25 body: JSON.stringify({ aiResponse: aiReply }),
26}).then((r) => r.json());
27
28const safeReply = outputResult.safeText ?? outputResult.redactedText ?? aiReply;
29sendWhatsAppReply(sender, safeReply);India-specific PII detection
SoterAI automatically detects and redacts India-specific personally identifiable information:
Aadhaar numbers
12-digit with optional spaces
PAN numbers
10-character alphanumeric
UPI IDs
Format: username@bank
Indian phone numbers
10-digit with +91 prefix
Bank account numbers
Including IFSC codes
GSTIN
Goods and Services Tax ID