SMS STOP keyword immediately removes user from marketing SMS lists
Why it matters
TCPA §227(b) imposes strict liability for sending SMS to numbers on the national Do-Not-Call registry or after a STOP reply — penalties run $500–$1,500 per message. Most SMS providers (Twilio, Vonage) auto-honor STOP at the carrier level, but that protection evaporates the moment you switch providers or add a second sending path. Without an inbound webhook that writes opt-out status to your database, the only suppression record lives in a third-party system you don't control. GDPR Art. 7(3) and CCPA §1798.120 add parallel requirements: withdrawal of consent must be honored immediately and must propagate to all processing activities.
Severity rationale
High because relying solely on carrier-level STOP handling leaves opted-out numbers unprotected if the provider changes or a second SMS path is added — each message sent to an opted-out number is an independent TCPA violation with statutory damages.
Remediation
Configure an inbound Twilio webhook that validates the signature and writes smsOptOut: true synchronously, then check that flag in every outbound send.
// app/api/webhooks/sms/route.ts
const STOP_KEYWORDS = ['STOP', 'STOPALL', 'UNSUBSCRIBE', 'CANCEL', 'END', 'QUIT']
export async function POST(req: Request) {
const body = await req.formData()
const params = Object.fromEntries(body.entries()) as Record<string, string>
const sig = req.headers.get('x-twilio-signature') ?? ''
if (!validateRequest(process.env.TWILIO_AUTH_TOKEN!, sig, process.env.TWILIO_WEBHOOK_URL!, params)) {
return new Response('Forbidden', { status: 403 })
}
if (STOP_KEYWORDS.includes((params['Body'] ?? '').trim().toUpperCase())) {
await db.smsSubscriber.updateMany({
where: { phoneNumber: params['From'] },
data: { smsOptOut: true, optOutAt: new Date() },
})
}
return new Response('<Response></Response>', { headers: { 'Content-Type': 'text/xml' } })
}
Also guard every outbound send with a smsOptOut: false check before calling the provider API.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Email & SMS Compliance Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- external · TCPA-§227(b) — TCPA 47 U.S.C. §227(b) — SMS opt-out / STOP keyword requirements
- gdpr · Art. 7(3) — GDPR Art. 7(3) — Withdrawal of consent
- ccpa · §1798.120 — CCPA §1798.120 — Right to opt out
Taxons
History
- 2026-04-18·v1.0.0·Initial import from email-sms-compliance·automated