Skip to content

Validate SMS OTP

Request

Validate a one-time passcode (OTP) sent by SMS. This API is used to verify the SMS OTP sent to the user. The phone number will be added to the user profile and marked as verified. The endpoint will not authenticate the user (or create new users), and no tokens are returned.

Required permissions: apps:execute, [appId]:execute, auth:execute.

Security
ClientAccessToken
Path
user_idstringrequired

ID of the user

Bodyapplication/jsonrequired
phone_numberstringrequired

Phone number that the SMS OTP was sent to

passcodestringrequired

OTP to validate

update_primaryboolean

Allows the request to update the user's current verified primary phone number. If the user profile already has a verified primary phone number, it will override it if true or add it as their secondary phone number if false

Default:false
curl -i -X POST \
  'https://api.sbx.transmitsecurity.io/cis/v1/users/{user_id}/phone/verification/verify' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "phone_number": "string",
    "passcode": "string",
    "update_primary": false
  }'

Responses

Bodyapplication/json
resultbooleanread-onlyrequired

Boolean value indicating if SMS verification succeeded

Response
{ "result": true }