Onboarding

Provides real-time updates regarding new user registrations from your application.

Authentication required. Please refer to the WebSocket Authentication page here for more details.

Subscription Instructions

Feed Name

private.enterprise.users

Payload Details

Key
Description

account_type

Individual or Corporation

account_role

Advisor or Client

user_id

Unique ID shared between sFOX and your enterprise

email

Email address of the user

first_name

First name of the user

last_name

Last name of the user

phone_number

Phone number of the user

status

Verification status of the user’s sFOX account

requirements

Status of verification requirements of the user's sFOX account

user_token

A User Auth Token for this partner_user_id .

The authentication token that your application will use to access this specific user’s account

Example Code

const WebSocket = require('ws')

const ws = new WebSocket('wss://ws.sfox.com/ws')

ws.on('open', function() {
  const authMessage = {
   type: 'authenticate',
   apiKey: `process.env.ENTERPRISE_API_KEY`,
   enterprise: 'true'
  }
  
  ws.send(JSON.stringify(authMessage))
})

// After successful authentication, subscribe to users feed
const subscribeMsg = {
  type: 'subscribe',
  feeds: ['private.enterprise.users']
}

ws.send(JSON.stringify(subscribeMsg))

Last updated