Create Phone Validation
Last updated
Last updated
POST /v2/phone-validations
Description
This endpoint sends a one-time password (OTP) to a specified phone number for validation purposes. The OTP can be delivered via SMS or WhatsApp depending on the selected gateway.
Header | Type | Required | Description |
---|---|---|---|
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
Response Body
Optional Parameter: phoneGateway
can be set to sms
(default) or whatsapp
for OTP delivery.
OTP expires after a predefined time (expiresAt
).
Ensure secure handling of Authorization
tokens and OTPs in your application.
Additional validation steps may be required based on requires2FA
.
Parameter | Type | Description |
---|---|---|
Content-Type
String
Yes
Set to application/json
.
Authorization
String
Yes
Bearer token for API authorization.
project
String
Yes
Unique identifier for the project.
projectFlow
String
Yes
Identifier for the specific project flow.
countryCode
String
Yes
The country code of the phone number (e.g., +507
).
phone
String
Yes
The phone number to which the OTP will be sent.
validationMethod
String
Yes
The validation method, set to verificationCode
.
type
String
Yes
Type of validation, e.g., login
.
phoneGateway
String
No
Specifies the delivery method: sms
(default) or whatsapp
.
client
String
Unique identifier of the client.
project
String
Identifier of the associated project.
projectFlow
String
Identifier of the specific project flow.
status
String
Status of the OTP delivery (e.g., sent
).
countryCode
String
Country code of the phone number.
phone
String
The phone number where the OTP was sent.
phoneGateway
String
Delivery method used (sms
or whatsapp
).
otp
String
OTP sent to the user (hashed for security).
expiresAt
String
Expiration date and time of the OTP.
phoneData.title
String
Custom title provided during phone validation.
type
String
Type of validation (e.g., login
).
redirectUrl
String
URL for redirect after validation.
requires2FA
Boolean
Indicates whether two-factor authentication is required.
ipAddress
String
IP address from which the request was initiated.
language
String
Language for validation communication (e.g., en
).
providerConfirmation
Object
Confirmation details from the provider.
dateTime
String
Date and time of signature validation.
message
String
Certification message.
id
String
Unique ID for the phone validation session.