Docs
API
bPanel accepts WHM API 1 and UAPI style calls so WHMCS and similar billing tools can provision accounts, using a per-server API key.
Compatibility
bPanel implements the calls that billing and automation tools need, using the names and parameters of WHM API 1 (server and reseller level) and UAPI (account level). Tools written for cPanel/WHM, including WHMCS, can usually be pointed at a bPanel server by changing the host and the credentials.
Compatible does not mean identical. Check the OpenAPI page in BMH Manager for the list of calls that exist, and test each call your tool uses before you go live.
Authentication
Each server has its own API key. Create it in BMH Manager, give it a name, and store it in your billing system. Send it in the Authorization header:
# Example shape only. Take the exact path and function names from the
# OpenAPI page in BMH Manager.
curl -sS -H "Authorization: Bearer YOUR_API_KEY" \
"https://your-hostname:2087/<api-path>"
Rules for keys:
- One key per integration, so you can revoke one without breaking another.
- Keys are shown once. Store them in a secrets manager, never in a repository.
- Revoke a key from BMH Manager as soon as you suspect a leak.
- Restrict port 2087 to the addresses your billing system uses.
WHMCS
In WHMCS, add a server of type cPanel, set the hostname to your bPanel server, and use the API key for access. Create a product from a bPanel package name. Run create, suspend, unsuspend and terminate on a test account before you sell anything.
Hooks
Scripts can run on account create, remove, suspend, domain add, and when a backup finishes. Hooks have a timeout and a log. A blocking hook that fails stops the action it guards.
Errors
Calls return a result with a status and a message. Treat any non-success status as a failure, log the message, and do not retry blindly on a create call, which could produce a duplicate.