# Get Multiple End Users

<table data-header-hidden><thead><tr><th width="74.8046875" align="center"></th><th></th></tr></thead><tbody><tr><td align="center"><mark style="color:green;"><strong>GET</strong></mark> </td><td>https://api.sfox.com/v1/enterprise/users</td></tr></tbody></table>

Returns a list of all your end users.

***

{% hint style="info" %}
Retrieve a single, specific end user by executing a [Get End User](https://docs.sfox.com/connect/rest-api/end-users/get-end-user) request.
{% endhint %}

## Request

### Query Parameters

<table><thead><tr><th width="182.04296875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><p><code>accountRole</code></p><p>string</p></td><td>Filters the users included in the response by their <code>account_role</code> . <em>Possible values:</em> <code>client</code> ,  <code>advisor</code></td></tr></tbody></table>

### Example Requests

{% tabs %}
{% tab title="Shell" %}

<pre class="language-shell" data-overflow="wrap" data-line-numbers><code class="lang-shell"><strong>#Retrieve all end users
</strong><strong>curl -H "Authorization: Bearer ${ENTERPRISE_API_TOKEN}" \
</strong> 'https://api.sfox.com/v1/enterprise/users'
 
 #Retrieve all end users with account_role = client
curl -H "Authorization: Bearer ${ENTERPRISE_API_TOKEN}" \
 'https://api.sfox.com/v1/enterprise/users?accountRole=client'
 
  #Retrieve all end users with account_role = advisor
curl -H "Authorization: Bearer ${ENTERPRISE_API_TOKEN}" \
 'https://api.sfox.com/v1/enterprise/users?accountRole=advisor'
</code></pre>

{% endtab %}

{% tab title="NodeJS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
//Retrieve all end users
const axios = require('axios');

const config = {
  method: 'get',
  url: 'https://api.sfox.com/v1/enterprise/users',
  headers: {
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
  }
}

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



//Retrieve all end users with account_role = client
const axios = require('axios');

const config = {
  method: 'get',
  url: 'https://api.sfox.com/v1/enterprise/users?accountRole=client',
  headers: {
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
  }
}

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

  
  
//Retrieve all end users with account_role = advisor
const axios = require('axios');

const config = {
  method: 'get',
  url: 'https://api.sfox.com/v1/enterprise/users?accountRole=advisor',
  headers: {
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
  }
}

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

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
#Retrieve all end users
import requests
import os

data = requests.get(
  "https://api.sfox.com/v1/enterprise/users",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  }
)
print(data.status_code)
print(data.json())


#Retrieve all end users with account_role = client
import requests
import os

data = requests.get(
  "https://api.sfox.com/v1/enterprise/users?accountRole=client",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  }
)
print(data.status_code)
print(data.json())


#Retrieve all end users with account_role = advisor
import requests
import os

data = requests.get(
  "https://api.sfox.com/v1/enterprise/users?accountRole=advisor",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  }
)
print(data.status_code)
print(data.json())
```

{% endcode %}
{% endtab %}
{% endtabs %}

***

## Response

Returns a `data` array of end user objects with the following fields.

### Response Fields

<table><thead><tr><th width="245">Field</th><th valign="top">Description</th></tr></thead><tbody><tr><td><code>account_type</code></td><td valign="top">The end user's account type.<br><em>Possible values:</em> <code>individual</code>, <code>corporation</code></td></tr><tr><td><code>account_role</code>string</td><td valign="top">The end user's role.<br><em>Possible values:</em> <code>Client</code>, <code>Advisor</code></td></tr><tr><td><code>user_id</code>string</td><td valign="top">End user's unique ID, defined by you.</td></tr><tr><td><code>advisor_user_id</code><em>nullable,</em> string</td><td valign="top"><code>user_id</code> of the end user's, if applicable.</td></tr><tr><td><code>email</code>string</td><td valign="top">Email address of the user.</td></tr><tr><td><code>first_name</code>string</td><td valign="top">First name of the user.</td></tr><tr><td><code>last_nam</code>string</td><td valign="top">Last name of the user.</td></tr><tr><td><code>phone_number</code>string</td><td valign="top">Phone number of the user in <a href="https://www.twilio.com/docs/glossary/what-e164">E.164 format</a> (e.g. <code>+14155552671</code>).</td></tr><tr><td><code>account_purpose</code> string</td><td valign="top">Primary purpose or use case for the account.</td></tr><tr><td><code>account_purpose_other</code> string</td><td valign="top">The account purpose free text entry when <code>account_purpose</code> = <code>other</code>.</td></tr><tr><td><code>source_of_funds</code> string</td><td valign="top">Primary source of end user's funds transferred to their account.</td></tr><tr><td><code>source_of_funds_other</code> string</td><td valign="top">Source of funds free text entry when <code>source_of_funds</code> = <code>other</code></td></tr><tr><td><code>id</code> string</td><td valign="top">This ID is provided by the sFOX system and should be used as a unique ID for this other endpoints.</td></tr><tr><td><code>phone_country_code</code> string</td><td valign="top">The <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166-1 alpha-2</a> country code of the phone number.</td></tr><tr><td><code>intermediary_status</code> string</td><td valign="top">Will the end user be receiving or sending funds on behalf of someone other than themselves.</td></tr><tr><td><code>expected_transfer_volume</code> string</td><td valign="top">Expected monthly USD notional volume of transfers (sent and received).</td></tr><tr><td><code>expected_trade_volume</code> string</td><td valign="top">Expected monthly USD notional volume of trading (buys and sells).</td></tr><tr><td><code>individual</code> <a href="create-end-user">object</a></td><td valign="top">The user's identity information provided during registration.</td></tr><tr><td><code>status</code>string</td><td valign="top">Verification status of the user’s sFOX account.<br><em>Possible values:</em> <code>PENDING</code>, <code>VERIFIED</code>, <code>UNSUPPORTED</code></td></tr><tr><td><code>requirements</code>object</td><td valign="top">The remaining requirements to complete account verification.</td></tr></tbody></table>

### Responses

<details>

<summary><mark style="color:green;"><strong>200</strong></mark><strong>: OK</strong></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "data": [{
    "account_type": "individual",
    "account_role": "Client",
    "user_id": "client_account_1",
    "advisor_user_id": "advisor_account_1",
    "email": "sean_fox@sfox.com",
    "first_name": "Sean",
    "last_name": "Fox",
    "phone_number": "+12345678900",
    "advisor_user_id": "advisor_account_1",
    "status": "PENDING",
    "requirements": {
      "email": true,
      "sms": true
    }
  },
  {
    "account_type": "individual",
    "account_role": "Advisor",
    "user_id": "advisor_account_1",
    "advisor_user_id": null,
    "email": "jane_doe@sfox.com",
    "first_name": "Jane",
    "last_name": "Doe",
    "phone_number": "+12345678922",
    "status": "VERIFIED",
    "requirements": {
      "email": false,
      "sms": false
    }
  }]
}
```

{% endcode %}

</details>
