Skip to main content
POST
cURL

What is a Reverse OTP?

A reverse OTP verifies a user’s phone number by having the user send a code to you via SMS or iMessage, rather than you sending it to them. This approach offers several key benefits compared to traditional OTPs:
  • Receiving SMS messages is easy and often free, so attackers may abuse online services to receive codes and bypass standard verification.
  • Sending an SMS, however, requires the user to use their own phone and carrier plan, making it more difficult to fake and providing greater confidence in the user’s authenticity.
  • You save on operational costs, since you’re not paying to send SMS codes to your users.
  • Message delivery rates are often higher. Outbound SMS can be blocked, delayed, or filtered by carriers—especially for international users or high-volume senders. When users initiate the message themselves, it is much more likely to be delivered, as their carrier typically supports sending SMS to the US from anywhere in the world.
Set service to "sms" or "imessage". It defaults to "sms" when omitted. iMessage requires an active iMessage-capable leased number and an iMessage entitlement. Learn more about Reverse OTP with iMessage.
If you already know the phone number, in cases such as 2FA, pass number to require that exact sender for a successful verification:
Streamline the experience with a QR code & buttonOnce you’ve initiated a reverse OTP session, Contiguity provides a payload that you can turn into a QR code. Display this QR code to your user, who can then scan it with their phone to automatically populate the phone number and body fields.Use session.ui.qr_code. Do not hardcode an sms: URL.

Result

Add a button or anchor tag to your UIObviously, a QR code to someone on a phone is pretty useless. But, the qr_code payload can also be placed into a button or anchor tag’s href attribute, which will automatically open the user’s messaging app with the phone number and body fields populated!
Result:Tap to Verify
In most cases, it’s helpful to present both the QR code and written instructions to the user. That said, if you want to maximize the chance the message is sent from a mobile device, you may prefer to display only the QR code on Desktop/Laptop devices, since scanning it typically requires using a phone.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
number
string | null

Optional. Expected sender phone number in E.164. If omitted, Contiguity learns the number from the inbound message — the user never has to type it.

Example:

"+15551234567"

to
string

Phone number to text. If you lease a number from Contiguity, you can enter it here. Defaults to a random Contiguity-owned number.

Example:

"+16465550123"

service
enum<string>

Messaging service to receive the code on. Defaults to SMS. iMessage requires an active iMessage-capable number on your account.

Available options:
sms,
imessage
Example:

"sms"

language
string
default:en

Language code for UI strings

Example:

"en"

success_url
string<uri>

Override the default webhook URL for otp.reverse.verified. By default, Contiguity will use your existing webhook preferences.

Example:

"https://example.com/webhooks/otp/success"

Response

Start a Reverse OTP verification session. Pass number only if you already know the sender and want to require that exact phone. Omit it to discover the number from the inbound message.

id
string
required
Example:

"req_xxxxxxxxxxxxxxxx"

timestamp
number
required
Example:

1787255833552

api_version
string
required
Example:

"v2026.8.20"

object
string
required
Example:

"response"

data
object
required