Developers
Automate Zopanel for Windows: API reference, API keys, the provisioning API, signed webhooks, WHMCS and HostBill modules, panel-cli, zopanel-setup.
Zopanel for Windows is built to be driven by other software. Billing systems create and suspend accounts through the provisioning API, your own tools react to events through signed webhooks, and administrators script the panel with panel-cli and the server with zopanel-setup.exe. This page is the starting point; the details are in the documentation.
API reference
The full reference is at /api-docs. It is generated from the panel's OpenAPI 3.1 contract (contracts/openapi.yaml), the same file the panel's own tests check every route against. Every panel also serves its contract at https://<panel>/api/v1/openapi.yaml, without signing in, so you can generate a client for the exact version you run.
API keys
- Create a key on the panel's API keys page. A key belongs to one tenant (the provider, a reseller or a customer account), and every path includes that tenant:
/api/v1/tenants/{tid}/…. Calling another tenant returns404 TENANT_NOT_FOUND. - Send it as a bearer token:
Authorization: Bearer wp_…. HTTPS only; if the panel still uses its own certificate, give your client the CA file. - A key can do what both allow: the permissions chosen when it was created and the current role of the person who created it. Remove that person's rights and the key loses them too.
- When the provider requires two-factor authentication, a key works only if it was created in a session that passed the second step and its owner still has a second factor; otherwise calls return
403 API_KEY_MFA_REQUIRED. - Each key may make 120 requests in a burst, refilled at 10 per second. Past that:
429 RATE_LIMITEDwithRetry-After.
Provisioning API
The provisioning API is for billing systems and your own CMS: plans (packages), resellers, customer accounts, plan changes, users in an account, suspension, expiry, termination and one-time login links. Status: limited — it runs against panels on Windows Server 2019, 2022 and 2025 in our tests; it has not yet run inside a real WHMCS or HostBill installation.
- Base path:
/api/v1/tenants/{tid}/provisioning/…. - Accounts, packages and resellers are addressed by your own reference (
ref, such as a service ID).PUTis idempotent: the first call returns201, the same call again returns200and creates nothing. - Send
Idempotency-KeywithPOST,PATCHandDELETE: within 24 hours the same key and the same request return the first answer again. - Long operations, such as terminating an account with mail and databases, return
202with the progress, and finish in the background even if the panel restarts. - Errors are JSON with a stable
codeand aretryableflag; retry the retryable ones with a growing delay. - A one-time login link for a "Log in to control panel" button lives 60 seconds and works once.
API=https://panel.example.com:8443/api/v1/tenants/$TID/provisioning
H=(-H "Authorization: Bearer $KEY" -H "Content-Type: application/json")
# A plan, by your reference
curl "${H[@]}" -X PUT $API/packages/basic -d '{
"name": "Basic",
"limits": {"max_sites": 2, "max_databases": 2, "max_mailboxes": 10, "runtimes": ["php","wordpress"]}
}'
# A customer account on that plan; calling it again creates nothing new
curl "${H[@]}" -X PUT $API/accounts/svc-1001 -d '{
"name": "Example Ltd", "package": "basic", "server_id": "<server id>",
"email": "owner@example.com", "password": "a-long-enough-password"
}'
# Suspend with a reason the customer can see
curl "${H[@]}" -X POST $API/accounts/svc-1001/suspend \
-H "Idempotency-Key: sus-1001-7" -d '{"reason":"Invoice #7 unpaid"}'
The whole lifecycle, with the permissions a billing key needs, is in Provisioning API.
Webhooks
The panel sends events to your HTTPS endpoint as POST JSON, signed with HMAC-SHA256 in the X-Zopanel-Signature: sha256=<hex> header; the secret is shown once when you create the endpoint. Events come from the panel's activity log, for example account.terminated, account.expired, quota.*, backup.restore_test_failed, update.* and waf.blocked, and are delivered to the tenant concerned and every tenant above it. Status: limited — delivery has been checked on Windows for some events; most events have so far been checked only in automated tests.
Billing modules
- WHMCS:
integrations/whmcsin the release. - HostBill:
integrations/hostbill.
Both use the provisioning API: create, suspend, unsuspend, change plan, change password, terminate and single sign-on. Status: limited — tested with the module code running on a server against a real panel, not yet inside a real WHMCS or HostBill.
Command line
panel-clicovers the public API with an API key: shortcuts for common tasks, andpanel-cli apifor any operation in the contract. Configure it withpanel-cli config set --url … --key … --tenant …, orZOPANEL_URL. Long requests are followed until they finish. Status: limited.zopanel-setup.exeruns on the server, as Administrator:preflight,install,repair,update,rollback,uninstall,setup-link,admin-login,letsencrypt,unban,support-bundleandversion.
See Command line for both.