> For the complete documentation index, see [llms.txt](https://guide.traderevolution.com/traderevolution-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.traderevolution.com/traderevolution-api/traderevolution-apis/backoffice-api/account-presets.md).

# Account presets

Account preset - a mechanism for defining the settings that can be reused for different accounts in the future. The most convenient way to create the preset which will be used for future user creation is via the BackOffice (*BackOffice -> Users -> Account presets list*). You can request all existing presets using the <mark style="color:blue;">`GET`</mark> method or create a new one via the <mark style="color:green;">`POST`</mark>.&#x20;

## Get a list of account presets

<mark style="color:blue;">`GET`</mark>`/accountPresets`

Returns all available account presets with their IDs. Presets can be filtered by their currency or name, this info should be added to the query.&#x20;

**Query**

| Name             | Type   | Description                             |
| ---------------- | ------ | --------------------------------------- |
| `presetCurrency` | string | Allows filtering presets by currency ID |
| `presetName`     | string | Allows filtering presets by their name  |

**CURL**

{% code overflow="wrap" %}

```json
curl -X GET "https://sandbox.traderevolution.com:8443/proftrading/rest/accountPresets?presetCurrency=4803&presetName=demo" -H "accept: application/json" -H "Authorization: Bearer eyItMjA5ODU2ODY2MSI6LTIwOTg1Njg2NjEsIjE0NDQ5Njc3MT...ckueCWrthA1RmhoDA772jww"
```

{% endcode %}

Since both filters are applied, in the response we should receive all account presets with *Currency = 4803 (ID for CAD)* and *Name = demo*.&#x20;

**Response**

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

```json
[
  {
    "presetId": 1055450,
    "presetName": "demo"
  }
]
```

{% endtab %}
{% endtabs %}

You can create an empty request, in this case, it will contain all presets currently available on this server:

**Response**

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

```json
[
  {
    "presetId": 1055450,
    "presetName": "demo"
  },
  {
    "presetId": 1055452,
    "presetName": "test"
  },
  {
    "presetId": 1012817,
    "presetName": "Bootcamp 20k Funded 20k"
  }
]
```

{% endtab %}
{% endtabs %}

{% hint style="success" %}
You can play with this method of BO REST API here:

<https://sandbox.traderevolution.com:8443/proftrading/rest/swagger-ui.html#/Account_preset/getPresetsUsingGET>
{% endhint %}

## Create account preset

<mark style="color:green;">`POST`</mark> `/accountPresets`

This method is used for creating a new account preset. Various parameters can be configured here, they will subsequently be applied to the newly created accounts.&#x20;

**Request**

```json
{
  "accountStatus": 0,
  "accountType": 0,
  "activateMamFees": false,
  "currencyId": 0,
  "externalTradingProperties": [
    {
      "brokerName": "string",
      "extName": "string"
    }
  ],
  "feeType": 0,
  "fieldFlags": [
    {
      "name": "string",
      "isOverridden": true
    }
  ],
  "mamManagerUserName": "string",
  "managementFeeValue": 0,
  "mode": 0,
  "performanceFee": 0,
  "preferredInstrumentType": -100,
  "presetDescription": "string",
  "presetName": "string",
  "rules": [
    {
      "ruleName": "string",
      "ruleValue": "string",
      "restriction": 0,
      "isOverridden": true
    }
  ],
  "smaEquity": 0,
  "waivedMargin": 0
}
```

**Response**

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

```json
{
  "presetId": 1055450
}
```

{% endtab %}
{% endtabs %}

The response will contain the unique ID of the newly created account preset. This ID may later be used for creating a new user/account (see corresponding article). &#x20;

{% hint style="success" %}
You can try this method of BO REST API here:

<https://sandbox.traderevolution.com:8443/proftrading/rest/swagger-ui.html#/Account_preset/createAccountPresetUsingPOST>
{% endhint %}
