sFOX API
Sign InOpen Account
Connect API
Connect API
  • Introduction
    • Welcome
    • Getting Started
    • Resources
      • Terminology
      • Systems & Operations
      • Integration Options
    • Guides
      • End User Onboarding & KYC
        • Individuals
        • Businesses
        • Enhanced Due Diligence
  • REST API
    • REST Endpoints
    • Authentication
    • End Users
      • Create End User Account
      • Request Verification Code
      • Confirm Verification Code
      • Create Single User Auth Token
      • Create Multiple User Auth Tokens
      • Get End User(s)
      • Get EDD Requests
      • Get EDD Prompts
      • Create EDD Responses
      • Submit Documents
        • Submit Documents (SFTP)
      • Deactivate User
    • Payments
      • Create Bank Account (Plaid)
      • Create Bank Account
      • Get Bank Account
      • Get Plaid Processors
      • Amend Plaid Processors
      • Verify Bank Account
      • Delete Bank Account
      • Get Wire Instructions
      • Get ACH Agreement Status
      • Request ACH Onboarding
      • Get ACH Deposit Limit
    • Withdrawals
      • Confirm Withdrawal
      • Resend Confirmation Code
      • Cancel Withdrawal
    • Transfers
      • Create Transfer
      • Confirm Transfer
      • Resend Confirmation Code
      • Cancel Transfer
      • Get Transfer Permissions
      • Get Transfer History
    • Monetization
      • Create Setting
      • Update Setting
      • Delete Setting
      • Get Settings
      • Get Permissions
      • Get Monetization History
  • WebSocket API
    • Connecting
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • End Users
      • Onboarding
      • Balances
      • Orders
      • Trades
    • Market Data
      • Order Book
      • Trades
      • Ticker
  • Single Sign-On
    • Overview
      • IdP Initiated SSO
    • IdP Data
    • SAML Response Data
  • Errors
    • Error Codes
Powered by GitBook
On this page
  • Request
  • Path Parameters
  • Body Parameters
  • Example Requests
  • Response
  • Response Fields
  • Responses
  1. REST API
  2. End Users

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}"
const axios = require('axios');

const user_id = "${user_id}"
const data = JSON.stringify({type: 'email', otp: '12345'})
const config = {
  method: 'post',
  url: `https://api.sfox.com/v1/enterprise/users/verify/${user_id}`,
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.ENTERPRISE_API_KEY}`
  },
  data: data
}

axios(config)
  .then((response) => {
    console.log(response.status)
    console.log(respones.data)
  })
  .catch(err => {
    console.error(err.response.status)
    console.error(err.response.data)
  });
import requests
import os

user_id = os.environ['${user_id}']

data = requests.post(
  f"https://api.sfox.com/v1/enterprise/users/verify/${user_id}",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  },
  json={
    "type": "email",
    "otp": "12345"
  }
)
print(data.status_code)
print(data.json())

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"
    }
}
PreviousRequest Verification CodeNextCreate Single User Auth Token

Last updated 15 hours ago