Resellers can automate their business with the CWP API — for example connect WHMCS, Blesta or their own shop so that paid orders create hosting accounts automatically and overdue invoices suspend them.
Reseller-owned API keys
A key owned by a reseller works exactly like a normal API key, but is limited to that reseller:
account listreturns only the reseller’s own customers,packagessees and manages only the reseller’s packages,- new accounts are created as the reseller’s customers and count towards the reseller’s limits.
Create the key in the user panel under Reseller → Api Manager:
- Click Create new api token.
- Enter a Short Name, the Ip Origin of your billing system and click Generate for the key.
- Tick only the API Functions you need — typically Account creation, Account Update, Suspend account, Activate account, Account Delete, Change of password, List packages and Autologin.
- Save.
The server administrator can also create a key in the admin API Manager with the reseller as Owner — it has the same limits.
Calling the API
The API address, parameters and responses are the same for resellers and administrators:
curl -X POST https://server.example.com:2304/v1/account/ \
-d "key=YOUR_RESELLER_KEY&action=add&domain=customer.com&user=customer1&pass=S3cretPass&email=owner@customer.com&package=Starter&server_ips=203.0.113.10"
See the full reference:
Note: Use the package names you created as a reseller (or their IDs from packages list). If the reseller account limit is reached, account add fails — check the Reseller Dashboard.