Skip to main content
Requirements
  • API key pair
  • Service enabled (done by iDenfy staff)
  • Number verification credits

Learn More

Verify identity seamlessly using phone number OTP — fast verification for genuine users (under 30 seconds), global coverage, 2FA security, and automated onboarding.

Step 1: Send SMS with Verification Code

Authorization: API key pair Method: POST Endpoint: https://ivs.idenfy.com/fraud/send-sms
Calling this endpoint sends an SMS message containing a verification code to the user.

Request structure

KeyRequiredTypeConstraintsDefaultExplanation
phone_numberYesStringE.164 formatPhone number with country code to receive the verification code via SMS
sender_nameNoStringMax length 11iDenfyName or number displayed as the sender

Response structure

KeyTypeExplanation
request_idStringYou will need this for the verification step
{
  "phone_number": "+12025550163",
  "sender_name": "The Sender"
}
Example SMS message sent to the user:
The Sender code: 1234. Valid for 5 minutes.

Step 2: Verify User-Entered Code

Authorization: API key pair Method: POST Endpoint: https://ivs.idenfy.com/fraud/verify-sms
After the verification code is sent, the user enters the code they received and you can verify whether it is valid.

Request structure

KeyRequiredTypeConstraintsExplanation
request_idYesStringMin length 32, Max length 40The request_id returned from the SMS sending endpoint
received_codeYesStringLength 4Numerical verification code entered by the user

Response structure

KeyTypeExplanation
is_verifiedBooltrue if the code was valid. false if the code was invalid, already validated, or the wrong code was provided too many times.
{
  "request_id": "3d50e1584e0946e789e0185c009aaadf",
  "received_code": "1234"
}