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

# Public endpoint reference

> All broker routes in the documented build, grouped by role.

Use the running instance's `/docs` for interactive requests and `/openapi.json` for its exact deployed contract. A [public OpenAPI snapshot](https://mamx-api.exuratech.com/reference/openapi.json) accompanies this guide. A full schema from the operator-only documentation path is not the broker contract.

## Webhooks

| Method | Full path | Purpose |
| - | - | - |
| `POST` | `/api/v1/mamx/webhooks` | Register the broker webhook |
| `PATCH` | `/api/v1/mamx/webhooks` | Update the webhook URL or rotate the signing secret |

## Health

| Method | Full path | Purpose |
| - | - | - |
| `GET` | `/health` | Get API health |

## Preview

| Method | Full path | Purpose |
| - | - | - |
| `POST` | `/api/v1/mamx/preview-close` | Preview a close allocation |

## Operations

| Method | Full path | Purpose |
| - | - | - |
| `GET` | `/api/v1/mamx/operations/{operation_id}` | Get operation status and results |
| `GET` | `/api/v1/mamx/operations/{operation_id}/credentials` | Get account credentials |

## Accounts

| Method | Full path | Purpose |
| - | - | - |
| `POST` | `/api/v1/mamx/accounts/create` | Create an MT5 account |
| `POST` | `/api/v1/mamx/accounts/add` | Register an existing MT5 account in MAMX |
| `GET` | `/api/v1/mamx/accounts` | List accounts |
| `GET` | `/api/v1/mamx/accounts/{account_login}` | Get an account by MT5 login |
| `DELETE` | `/api/v1/mamx/accounts/{account_login}` | Delete an account from MAMX |
| `PATCH` | `/api/v1/mamx/accounts/{account_login}` | Update an account |
| `POST` | `/api/v1/mamx/accounts/{account_login}/deposit` | Deposit funds into a trading account |
| `POST` | `/api/v1/mamx/accounts/{account_login}/withdraw` | Withdraw investor funds after collecting performance fees |

## Leaders

| Method | Full path | Purpose |
| - | - | - |
| `POST` | `/api/v1/mamx/leaders` | Register a master and link its payment account |
| `GET` | `/api/v1/mamx/leaders` | List masters |
| `GET` | `/api/v1/mamx/leaders/{leader_id}` | Get a master profile |
| `PATCH` | `/api/v1/mamx/leaders/{leader_id}` | Edit a master strategy and fee terms |

## Allocations

| Method | Full path | Purpose |
| - | - | - |
| `POST` | `/api/v1/mamx/allocations` | Subscribe an investor |
| `GET` | `/api/v1/mamx/allocations` | List allocations |
| `GET` | `/api/v1/mamx/allocations/{allocation_id}` | Get an allocation |
| `PATCH` | `/api/v1/mamx/allocations/{allocation_id}` | Update allocation settings |
| `POST` | `/api/v1/mamx/allocations/{allocation_id}/unsubscribe` | Unsubscribe an investor |

## Payment Accounts

| Method | Full path | Purpose |
| - | - | - |
| `GET` | `/api/v1/mamx/leaders/{master_login}/payment-account/balance` | Get a payment account balance |
| `POST` | `/api/v1/mamx/leaders/{master_login}/payment-account/balance/refresh` | Refresh a payment account balance |
| `POST` | `/api/v1/mamx/leaders/{master_login}/payment-account/withdraw` | Withdraw from a payment account |

## Performance Fees

| Method | Full path | Purpose |
| - | - | - |
| `GET` | `/api/v1/mamx/allocations/{allocation_id}/fees` | List allocation fees |
| `GET` | `/api/v1/mamx/leaders/{leader_id}/performance-fees/credit-batches` | List master credit batches |


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