OTP Security

SMS Pumping Fraud: How to Protect Your OTP Endpoint

By Nimana · Last updated December 4, 2026 · 5 min read

SMS pumping fraud uses your OTP form to send texts to premium numbers and run up your bill. Here's how to spot it and five ways to stop it.

You wake up to an SMS bill ten times bigger than usual. Your sign-ups look normal. But overnight, thousands of verification codes went to phone numbers in countries you don't even sell to.

That's SMS pumping fraud, also called artificially inflated traffic (AIT). It's one of the most common ways attackers make money from apps that send OTP codes, and it targets the one form every app has: "Enter your phone number."

This guide explains how it works, how to spot it, and five practical defences you can add in an afternoon.

Why This Matters

SMS pumping costs you money, not data. The attacker never logs in, so your usual security alerts stay quiet, and the first warning is often the invoice. Because you're billed for every message sent, one night of pumping can use up a month's messaging budget.

How SMS pumping works

  1. An attacker gets a block of phone numbers, often premium-rate or high-cost ranges, and agrees to share the revenue with a carrier that terminates those messages.
  2. A bot finds a public endpoint that sends an SMS, usually your sign-up, login or "resend code" button.
  3. The bot submits those numbers thousands of times.
  4. Every message you send earns the attacker a cut. You pay for every one.

The codes are never entered. The attacker doesn't want an account. They want the messages sent.

Signs you're being pumped

  • A sudden spike in OTP sends with no matching rise in sign-ups
  • Your verification rate (codes entered ÷ codes sent) drops sharply
  • Traffic to countries you don't serve, often one or two at a time
  • Sequential or near-sequential numbers (+XX 555 0001, 0002, 0003…)
  • Many sends from a small set of IP addresses or a single user agent

If you already track your verification rate (see How to Measure and Improve Your OTP Verification Rate), set an alert when it falls below your normal level. It's the earliest warning you'll get.

What SendAPI already does for you

SendAPI caps OTP sends per phone number at 5 an hour and 20 a day. Go over either and the API returns 429 (code 4291 for the hourly limit, 4292 for the daily one). That stops one number being hammered, but pumping attacks spread across thousands of numbers, so you still need the defences below.

You can also check a number before sending. GET /v1/phone/validate?number=... returns valid, country and line type (mobile, landline, voip or unknown). OTP codes should only go to valid mobile numbers.

Defence 1: Only send to countries you serve

The cheapest fix is a country allowlist. If your customers are in South Africa, Kenya and the UK, there's no reason to send a code to anywhere else.

import { parsePhoneNumber } from 'libphonenumber-js'

const ALLOWED_COUNTRIES = new Set(['ZA', 'KE', 'GB'])

function isAllowedNumber(input) {
  try {
    const phone = parsePhoneNumber(input)
    return phone.isValid() && ALLOWED_COUNTRIES.has(phone.country)
  } catch {
    return false
  }
}

Reject anything else before it reaches your messaging API.

Defence 2: Rate limit by IP and by phone number

Limit how often one IP address can request codes, and how often one number can receive them.

import rateLimit from 'express-rate-limit'

const otpLimiter = rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 5,                   // 5 requests per IP per window
})

app.post('/auth/send-otp', otpLimiter, sendOtpHandler)

Add a per-number cooldown too: one code per number every 60 seconds, and a daily cap of about 5. Store counts in Redis or your database.

Defence 3: Put a challenge in front of the form

A CAPTCHA or a proof-of-work challenge (Cloudflare Turnstile, hCaptcha, reCAPTCHA) stops most bots before they can request a code. Show it on sign-up and on "resend code". Those two buttons are where pumping happens.

Defence 4: Watch the conversion rate and cut off automatically

Rate limits stop single attackers. A circuit breaker stops a distributed one. Track codes sent and codes verified per country, every hour. If a country's verification rate drops below a threshold, say 20% over the last 100 sends, pause sends to that country and alert your team.

For an account-wide view, GET /v1/account/usage?period=7d returns totals.otp_sent and totals.otp_verified, with a daily breakdown. Divide verified by sent for your verify rate. It isn't split by country, so log the country of each send yourself.

Defence 5: Don't make SMS the only channel

Pumping only pays when SMS is sent. If a code can go by WhatsApp instead, attackers earn nothing. Set channel to "auto" and SendAPI sends by WhatsApp when the number has it, and falls back to SMS when it doesn't:

const response = await fetch('https://sendapi.co/v1/verify/send', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SENDAPI_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    to: phoneNumber,
    channel: 'auto',   // sms | whatsapp | email | auto
    code_length: 6,
    ttl_seconds: 300,
  }),
})

For countries where you see suspicious traffic, force channel: 'whatsapp' or send the code by email. See Smart Channel Routing and SMS, WhatsApp, or Email? How to Choose the Best Channel for OTP Codes.

A quick checklist

  • Country allowlist on every endpoint that sends SMS
  • Rate limits per IP and per phone number
  • CAPTCHA on sign-up and resend
  • Hourly verification-rate alert per country
  • Automatic pause when a country's rate collapses
  • A non-SMS fallback channel

Protect your OTP flow from day one

SendAPI sends OTP codes by SMS, WhatsApp or email behind one API key, with per-number limits built in, so you can move away from SMS the moment something looks wrong.