Confirm Verification Code

POST

https://api.sfox.com/v1/enterprise/users/verify/:user_id

Submit verification codes to complete email or sms verification.


Request

Path Parameters

Name
Description

user_id required, string

Unique ID for this user defined by you that will serve as the shared identifier for this account between you and sFOX.

Body Parameters

Name
Description

type required, string

Verification requirement method.

Possible values: email , sms

otp required, string

Verification code sent to the user.

Example Requests

curl -X POST \
  -H 'Content-type: application/json' \
  -H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
  --data '{ "type": "email", "otp": "12345" }'  \
  "https://api.sfox.com/v1/enterprise/users/verify/${user_id}"

Response

Response Fields

Name
Description

data object

Verification code information.

success boolean

Whether verification was successful or not.

user_id string

The ID of the end user the code was sent to.

type string

The verification method for the code. Possible values: email , sms

Responses

200: OK

The following is an example response body from verifying an email verification code

Successfully verified email
{
    "data": {
        "success": true,
        "user_id": "client_account_1",
        "type": "email"
    }
}

The following is an example response body from verifying an sms verification code

Successfully verified phone number
{
    "data": {
        "success": true,
        "user_id": "client_account_1",
        "type": "sms"
    }
}

Last updated