Adding servers
Manage servers through the API
For suppliers with many servers: create an API key and manage them from your own scripts.
Updated
Who this is for
Suppliers with many servers can manage them from their own scripts through our public REST API. Everything here can also be done by hand in the panel, so skip this if you only run a few servers.
Create an API key
- Open the Account app → "API keys" and create a new key with a name you will recognize.
- Pick the scopes: "Supplier — read" for servers, earnings, dashboard and catalog; "Supplier — write" also lets the key add and remove servers.
- Copy the key right away. It starts with "mtp_" and is shown only once.
Calling the API
Send the key as a bearer token (Authorization: Bearer mtp_…) to https://mtproxy.cloud/api. The API docs list every endpoint with examples.
- Read: GET /supplier/catalog, /supplier/dashboard, /supplier/servers, /supplier/servers/:id, /supplier/earnings, /wallet/balance, /wallet/transactions, /wallet/withdrawals.
- Write: POST /supplier/servers/ssh, /supplier/servers/hetzner, /supplier/servers/tunnel, and DELETE /supplier/servers/:id for your own servers.
- Buying a server from us, deposits and withdrawals are done in the panel only. The API can read your wallet but never moves money out of it.
- Any charge for adding a server comes from your wallet, and the call fails if the balance is too low.
Good practice
- Treat the key like a password: keep it in an environment variable or a secret store, never in a repository.
- To rotate, create a new key, switch your scripts to it, then revoke the old one.
- Adding a server is not safe to retry blindly: a retry after a network error can add it twice. Wait for the response, or check your server list first.
Frequently asked questions
- Can one key be limited to a single server?
- Keys are limited by scope (read or write), not by server. For a key that cannot change anything, give it only "Supplier — read" in "API keys".
- Can the same key also have advertiser scopes?
- Yes. A key can combine supplier and advertiser scopes if your account uses both.