Skip to content

Verify

Prove the number. Pay for the message, not the check.

Send a one-time code by text or by a call that reads it aloud, then check what the user typed. We generate the code and keep only its hash.

$0

Per-verification fee on codes

6

Languages for voice codes, 7 for SMS

3

Ways to verify, by text, call or call-in

5

Check attempts before a code locks

Overview

Two requests: start, then check

Verify sends a code to a phone number and tells you whether the user typed it right. You choose the channel, the length, the language and the brand read out. The limits that stop toll fraud are on from the first request.

At a glance

Start
POST /verify/start
Check
POST /verify/check
Read one
GET /verify/{id}
Auth
Bearer API key, scope verify:write
Code
4 to 10 digits, 6 by default
Expiry
60 to 3,600 seconds, 600 by default

Capabilities

Everything a sign-in flow needs

  • Codes by SMS

    A text in English, Spanish, French, German, Portuguese, Hindi or Arabic, with your brand in it.

    channel: "sms"

  • Codes by voice call

    A call that reads the code aloud, slowly and twice, in six languages. It reaches landlines and phones that block texts.

    channel: "voice"

  • Call-in verification

    The user calls your own number from the phone being verified. No message to deliver, and you pay a cent only when it succeeds.

    channel: "call_in"

  • We keep only a hash

    The code is generated on our side and stored as a hash. Five wrong tries and it locks.

    POST /verify/check

  • Limits against pumping

    Five starts per number an hour, a 30 second resend cooldown and a cap per number range, so a block of premium numbers cannot drain your balance. If the limiter is unreachable we refuse rather than send.

    429 with retryAfterSeconds

  • Your own reference

    Pass your user or session ID. It is echoed on every read and webhook, and starting again with the same reference reuses the pending verification.

    reference

  • Routing per code

    Codes ride the same Smart Routing as messages and calls, by cheapest, best_quality or balanced.

    strategy

  • Test keys

    A test key runs the full flow on simulated sends. Call-in can be approved from a test key as if the user had called.

    POST /verify/{id}/simulate-call

Verify by SMS

Start a verification, then check the code

The first request sends the code and returns a verification ID. The second checks what the user typed.

  • Check returns approved, denied, expired or max_attempts.
  • A check is free however many times you call it, up to the five attempts a code allows.
# 1. Send the code. We generate it and keep only a hash.
curl -X POST https://packetexchange.io/api/v1/verify/start \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -d '{
    "to": "+14155550100",
    "channel": "sms"
  }'

# 2. Check what the user typed.
curl -X POST https://packetexchange.io/api/v1/verify/check \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "verificationId": "<from step 1>", "code": "482913" }'

Start response, data

{
  "verificationId": "…",
  "channel": "sms",
  "status": "pending",
  "sendStatus": "…",
  "expiresAt": "…"
}

Verify by voice

The same flow, read aloud

Change the channel to voice and the code is read to the person in the language you choose. Pass from to set the caller ID they see.

# 1. Send the code. We generate it and keep only a hash.
curl -X POST https://packetexchange.io/api/v1/verify/start \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -d '{
    "to": "+14155550100",
    "channel": "voice",
    "from": "+14155550199",
    "language": "es"
  }'

# 2. Check what the user typed.
curl -X POST https://packetexchange.io/api/v1/verify/check \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "verificationId": "<from step 1>", "code": "482913" }'

Built for sign-in

A code that arrives, on a route that carries it

Codes leave on the routes Smart Routing picks for the destination. When a text is the wrong fit, the same request sends the code by voice or verifies by call-in instead.

Webhooks

Events, signed and retried

Know the moment a user is verified without polling.

Every event is signed with an HMAC SHA-256 in X-PX-Signature and retried until your endpoint answers.

  • verification.approvedA correct code was checked, or a call-in arrived from the right phone.
  • verification.expiredA call-in verification expired without a call.
  • sms.deliveredThe text carrying a code was confirmed delivered, on routes with receipts.
  • call.completedThe call carrying a voice code ended.

Pricing

No fee per verification

A code costs the text or the call that carries it, at the route rate plus the capped platform fee. Starting, checking and reading verifications costs nothing. Call-in costs your number's monthly price plus $0.01 per approved verification, and nothing if it expires.

Per verification
$0
Code by SMS
The message, per segment at the route rate
Code by voice
The call, per second at the route rate
Checks
Free
Call-in
$0.01 per approved verification

What one SMS code costs right now, per segment

  • United States$0.0092 /msg
  • India$0.00426 /msg
  • Pakistan$0.03375 /msg
  • Nigeria$0.0062 /msg

Plus a platform fee of 2% of the carrier cost, never more than $0.001 a message or call.

In production

Built for production

Verification is where fraud and cost meet. These are the protections built in.

  • Protection against pumpingEvery start counts against limits per number, per number range and per account per day, with a resend cooldown. A start over a limit gets a 429 with the seconds to wait.
  • No fee per verificationYou pay for the SMS or call that carries the code, at the route rate plus the capped platform fee. Checks are free.
  • Proof without a codeWith call_in the user rings a number from the phone being verified, and the call itself approves the verification.
  • Codes that cannot be replayedAn approved verification can never be approved twice, and five wrong codes close it.
  • Your own referencePass a user or session id and it is echoed on every read and webhook; starting again with it reuses a pending verification instead of sending a second code.

Moving over

Your Verify calls map across, start and check.

Coming from Twilio

The names you know, mapped

If you have built on Twilio, most of what you know carries over. These are the pieces that change for this product.

TwilioVerify Service (VA… SID)HereNo service to createBrand, length, language and expiry are set on each start request.
TwilioPOST /v2/Services/{sid}/VerificationsHerePOST /verify/startto and channel, plus optional brand, length, language and reference.
TwilioPOST .../VerificationCheckHerePOST /verify/checkSend verificationId and code instead of the phone number and code.
TwilioChannel "call"Herechannel: "voice"Six languages for the spoken code.
TwilioStatus pending, approved, canceledHerepending, approved, denied, expired, max_attemptsA wrong code answers denied; five wrong codes answer max_attempts.
TwilioChannel "sms"Herechannel: "sms", or "call_in"call_in lets the user ring a number, so the call itself is the proof.

Twilio is a trademark of Twilio Inc. PacketExchange is not affiliated with or endorsed by Twilio.

Questions

Verify, answered

What does a verification cost?
There is no fee per verification. You pay for the text or call that carries the code at the route rate, plus the platform fee capped at $0.001. Checks are free. Call-in costs $0.01 per approved verification plus your number.
Do you store the codes?
No. We generate the code and keep only a hash of it, long enough to check what the user types.
How do you stop SMS pumping?
Every start passes limits per number, per number range and per account, with a resend cooldown. A walk through a block of premium numbers hits the range limit fast, and if the limiter cannot be reached the start is refused.
Which languages are supported?
Voice codes speak English, Spanish, French, German, Portuguese and Hindi. SMS codes add Arabic.
What is call-in verification?
Instead of sending a code, you show the user one of your numbers. When they call it from the phone being verified, the verification is approved. Nothing has to be delivered to them.
Can I test without sending codes?
Yes. Test keys simulate the send, and a call-in verification can be approved from a test key with POST /verify/{id}/simulate-call.

Verify your first user today

Free account and an API key on sign-up. No fee per verification, no contract and no monthly fee.

Prefer to talk it through? Contact the team.