> ## Documentation Index
> Fetch the complete documentation index at: https://pamm-api.codench.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Masters

> Provision or register Master accounts and keep trading and fee balances separate.

A Master operates the strategy and represents the aggregate operating capital of its active Investors. Every Master requires a separate payment account for performance fee credits.

## Choose the correct path

| Scenario                  | Endpoint                               | Guidance                                                        |
| ------------------------- | -------------------------------------- | --------------------------------------------------------------- |
| New integration           | `POST /api/v1/master/create`           | Recommended. Creates the trading and payment accounts together. |
| Coordinated migration     | `POST /api/v1/master/add`              | Registers two distinct MT5 accounts that already exist.         |
| Catalog synchronization   | `GET /api/v1/master/directory`         | Always send `engine=PAMM` for this integration.                 |
| Read or update one Master | `GET/PATCH /api/v1/master/{master_id}` | Use the internal `id`, not `mt5_login`.                         |

## New Master provisioning

`/master/create` returns the Master login, payment account login, and MT5 credentials. Store the two accounts as distinct entities and restrict password access to authorized backend processes.

<Info>
  The payment account group is configured by Codench. The CRM supplies the agreed `platform_group` only for the Master trading account.
</Info>

## Existing account registration

Before calling `/master/add`, confirm that:

* both MT5 accounts already exist on the assigned server;
* the payment account is different from the trading account;
* the payment account is not assigned to another Master;
* neither account is being used for the other's purpose.

Registering existing accounts does not create CRM users, wallets, products, or frontend relationships.

## Updating presentation fields

Send only fields that should change to `PATCH /api/v1/master/{master_id}`. Supported integration fields are `name`, `strategy_name`, `strategy`, and `min_deposit`. A new minimum affects future assignment validation; it does not move existing funds.

<Warning>
  Do not credit a Master account through an external MT5 deposit. Only PAMM-generated movements should alter its pool balance.
</Warning>

<CardGroup cols={2}>
  <Card title="Previous: End-to-end workflow" icon="arrow-left" href="/guides/end-to-end">
    Return to the complete lifecycle.
  </Card>

  <Card title="Next: Investors" icon="arrow-right" href="/guides/investors">
    Provision the accounts that hold customer capital.
  </Card>
</CardGroup>
