# Create a master or investment account using the existing MT account

Use the method described below to create a master or investment account for a client from their existing MT account.

{% hint style="info" %}
To create a master or investment account for a client, the client must be already registered on the B2COPY investment platform and assigned the client ID.\
\
For details on how to register a client in a standalone B2COPY solution, refer to the articles: [Seamless authorization](/api-documentation/seamless-authorization-only-for-a-standalone-solution.md) and [Register a client and create their payment account](/api-documentation/register-a-client-and-create-their-payment-account-only-for-a-standalone-solution.md).
{% endhint %}

<mark style="color:blue;">`POST`</mark> `[host]/api/v2/b2copy/accounts/create`

## **Request**

**Headers**

`Authorization: Bearer <access_token>`

To get the access token, use the method to [authorize in the Back Office](/api-documentation/authorization-in-the-back-office.md).

**Body**

In the request body, specify the following parameters:

<table><thead><tr><th width="251">Name</th><th width="86">Type</th><th width="104">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>clientID</code></td><td>integer</td><td>Yes</td><td>The identifier of a client for whom you want to create a master or investment account.</td></tr><tr><td><code>investmentPlatformId</code></td><td>integer</td><td>Yes</td><td><p>The identifier of the investment platform instance.</p><ul><li>If only one MT server is connected to your B2COPY investment platform, specify 1.</li><li>If you have more than one MT server connected to your B2COPY investment platform, contact the Support team for assistance.</li></ul></td></tr><tr><td><code>accountNumber</code></td><td>string</td><td>Yes</td><td>The MT login (number) of a client account that exists on MT. This account will be registered as a master or investment account on the B2COPY investment platform.</td></tr><tr><td><code>productCurrencyId</code></td><td>integer</td><td>Yes</td><td>The identifier of a product currency. Contact the Support team for assistance.</td></tr><tr><td><code>isMaster</code></td><td>integer</td><td>Yes</td><td>Specify 1 to create a master account; and 0 to create an investment account.</td></tr><tr><td><code>accountName</code></td><td>string</td><td>No</td><td>The name assigned to a master or investment account.</td></tr><tr><td><code>accountDescription</code></td><td>string</td><td>No</td><td>The description of a trading strategy used on the account.</td></tr></tbody></table>

**Request example**

```sh
curl --location --request GET 'https://host.name/api/v2/b2copy/accounts/create' \
--header 'Authorization: Bearer <accesss_token>' \
--data-raw '{
    "clientId": 4406,
    "investmentPlatformId": 1,
    "accountNumber': "2121882154",
    "productCurrencyId": 10,
    "isMaster": 0,
    "accountName": "MAM investor",
    "accountDescription": "The trading strategy applied on the account"
}'
```

## **Response**

The response includes the object providing information about the created master or investment account.

**Response example**

```json
{
  "is_master": false,
  "show_in_client_ui", true,
  "status": true,
  "id": 12574,
  "account_description": "The trading strategy applied on the account",
  "account_name": "MAM investor",
  "type": 8,
  "show_in_leaderboard": false,
  "show_opened_positions": false,
  "show_closed_positions": false,
  "hide_time_positions": false,
  "show_ivestor_opened_positions": false,
  "show_ivestor_closed_positions": false,
  "hide_investor_time_positions": false,
  "active_since": "2024-04-01T15:06:41.000000Z",
  "updated_at": "2024-04-01T15:06:41.000000Z",
  "created_at": "2024-04-01T15:06:41.000000Z"
}
```


---

# 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://docs.b2copy.b2broker.com/api-documentation/create-a-master-or-investment-account-using-the-existing-mt-account.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.
