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

Request Verification Code

POST

https://api.sfox.com/v1/enterprise/users/send-verification/:user_id

Request an email or sms verification code for your user.


Business accounts only need to verify email.

Individual accounts are required to verify email and sms. Email must be verified before requesting an sms code.

Request

Path Parameters

Name
Description

user_id required, string

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

Body Parameters

Name
Description

type required, string

Verification method. Possible values: email , sms

Example Requests

curl -X POST \
-H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
--data '{ "type": "email" }'  \
'https://api.sfox.com/v1/enterprise/users/send-verification/${user_id}'
const axios = require('axios');

const user_id = "user_id"
const data = JSON.stringify({ type: 'email'})
const config = {
  method: 'post',
  url: `https://api.sfox.com/v1/enterprise/users/send-verification/${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(response.data)
  })
  .catch((err) => {
  console.error(err.response.status)
  console.error(err.response.data)
  });
import requests
import os

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

Response

Response Fields

Name
Description

data object

Verification code information.

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

email string

The email address the verification code was sent to, if type = email

phone_number string

The phone number the verification code was sent to, if type = sms

Responses

200: OK
Email verification code sent to email specified
{
    "data": {
        "user_id": "client_account_1",
        "type": "email",
        "email": "sfox_connect@email.com"
    }
}
SMS verification code sent to the phone number specified
{
    "data": {
        "user_id": "client_account_1",
        "type": "sms",
        "phone_number": "+12223334444"
    }
}
422: Unprocessable Entity
Email has already been verified
{
    "error": "Email already verified"
}
Phone number has already been verified
{
    "error": "Phone already verified"
}
PreviousCreate End User AccountNextConfirm Verification Code

Last updated 14 hours ago