# Remove Account From User

## Overview

This API endpoint enables you to unbind a particular trading account from an existing user.

## Remove Account From User

<mark style="color:red;">`DELETE`</mark> `baseURL/v{version}/accounts/{accountId}/users/{userId}`

#### Path Parameters

| Name                                         | Type    | Description                                                                                        |
| -------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------- |
| apiVersion<mark style="color:red;">\*</mark> |         | The version of API. By default, set it to `1.0`.                                                   |
| accountId<mark style="color:red;">\*</mark>  | integer | This is the internal id of the trading account which is to be unbound from an existing user.       |
| userId	<mark style="color:red;">\*</mark>    | String  | This is the internal identifier of the user from whom an existing trading account must be unbound. |

#### Headers

| Name                                            | Type   | Description                                                                                                                                                             |
| ----------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | This is the authorization token from the token request. The value of this header must have the following format: `Bearer BQ898r9fefi` (`Bearer` + 1 space + the token). |

{% tabs %}
{% tab title="200: OK Successful request, JSON data is returned, containing updated information about the user and trading accounts." %}

```javascript
[
  {
    "UserModel": {
      "UserId": 0,
      "FirstName": "string",
      "MiddleName": "string",
      "LastName": "string",
      "Login": "string",
      "Email": "string",
      "Role": 0,
      "AddedDate": "2023-07-28T14:00:07.132Z",
      "Salutation": "NoSalutation",
      "Suffix": "NoSuffix"
    },
    "AccountAccessType": "Full"
  }
]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.autoshares.dev/api-documentation/managing-users/get-users-info/list-users-accounts-5.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
