Skip to main content
POST
/
two-fa
/
verification
Create a new 2FA Verification
curl --request POST \
  --url https://api.wavix.com/v1/two-fa/verification \
  --header 'Content-Type: application/json' \
  --data '{
  "service_id": "7204a030201211ee9fb47d093f2f127c",
  "to": "447919433768",
  "channel": "sms"
}'
{
  "success": true,
  "service_id": "7204a030201211ee9fb47d093f2f127c",
  "session_url": "https://api.wavix.com/v1/two-fa/verification/2953d4308f2e11ecb75fcdafd6d2d687",
  "session_id": "2953d4308f2e11ecb75fcdafd6d2d687",
  "destination": "447919433768",
  "created_at": "2022-02-16T13:41:38.000Z",
  "number_lookup": {
    "number_type": "mobile",
    "country": "GB",
    "current_carrier": "Vodafone"
  }
}

Authorizations

appid
string
query
required

An API key to authorize your request

Body

application/json
service_id
string
required

Unique Wavix 2FA Service ID. Find your 2FA Service ID on the Wavix portal.

Example:

"7204a030201211ee9fb47d093f2f127c"

to
string
required

End user's phone number to which the verification code will be sent. The phone number must be in E.164 format.

Example:

"447919433768"

channel
string
required

The communication channel you want to use. Can be either sms or voice.

Example:

"sms"

Response

success
boolean
required

Indicates whether the 2FA Verification was successfully created

Example:

true

service_id
string
required

Unique identifier of the Wavix 2FA Service

Example:

"7204a030201211ee9fb47d093f2f127c"

session_url
string
required

Automatically generated 2FA Verification URL. The URL can be used to resend or validate the OTP.

Example:

"https://api.wavix.com/v1/two-fa/verification/2953d4308f2e11ecb75fcdafd6d2d687"

session_id
string
required

Unique identifier of the Wavix 2FA Verification

Example:

"2953d4308f2e11ecb75fcdafd6d2d687"

destination
string
required

The end user’s phone number

Example:

"447919433768"

created_at
string<date-time>
required

Date and time the 2FA Verification is created

Example:

"2022-02-16T13:41:38.000Z"

number_lookup
object
required
I