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

# Delete accounts safely

> Analyze impact, create an asynchronous operation, and monitor its result.

MAM deletion is asynchronous and idempotent because it may affect allocations and copied positions. The process removes the account and its relationships from the MAM service; it does not delete the user from the MT5 server.

**1. Retrieve the impact**

For a master, use `GET /api/v1/mam/account-deletions/impact?master_login={login}`. For an investor, use the equivalent `investor-account-deletions/impact` path.

**2. Review conflicts**

Present related allocations, positions, and accounts to the operator. Do not create the operation until the scope is accepted.

**3. Create the operation**

Send an explicit policy and a stable `idempotency_key`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "master_login": "139682",
  "scope": "MASTER_ACCOUNT_ONLY",
  "investor_logins": [],
  "transmitted_positions_policy": "CLOSE_TRANSMITTED",
  "idempotency_key": "delete-master:139682:20260818",
  "requested_by": "bridge-crm"
}
```

**4. Monitor and retry**

Call `GET /api/v1/mam/account-deletions/{operation_id}`. If the status remains `PARTIAL`, correct the cause and use the `/retry` endpoint.

## Statuses

| Status | Integrator action |
| - | - |
| `PENDING` | Operation accepted. |
| `WAITING_CLOSE` | Wait for positions to close. |
| `PARTIAL` | Review `error_message`, correct the issue, and retry. |
| `PURGING` | Do not create a second operation. |
| `COMPLETED` | Update your local system. |
| `FAILED` | Requires intervention before retrying. |

> [!WARNING]
>
> Do not archive or delete the account in external systems until you receive `COMPLETED`.

An account involved in a cascade-fee charge with status `PENDING`, `CLAIMED`, or `DEBITED` cannot be deleted yet. Wait for the charge to reach a terminal state and then retry the deletion operation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.