VorticPanel

API and billing

Authentication and tokens

Panel API keys and personal tokens

There are two kinds, used the same way:

  • Panel API keys belong to the panel, not to a person. Use one for your billing panel and anything else that must keep working when staff come and go. Create them under Admin → API & webhooks → Panel API keys; managing them needs the Panel API keys permission (Owners have it; give it to a role on purpose). A key can’t have a permission the staff member making it doesn’t have, and it can’t be given SSH key, DNS, network (floating IPs and private networks) or reseller permissions. A key with Customers: sign-in links or Customers: write signs customers in and changes their emails, and only someone whose role has Sign in as customer can make one. It keeps working when that staff member is disabled, removed or has their sign-in reset, until someone revokes it. The panel can have up to 50.
  • Personal tokens belong to one account and act as it: Account → API tokens (staff: Admin → Account → API tokens). Use them for your own scripts. Resellers and customers use these. Resetting the account’s password from an emailed link revokes all of its personal tokens; make new ones afterwards.

The secret is shown once. Send it as a bearer token:

Authorization: Bearer pnl_…

Tokens start with pnl_. Only a hash is stored. A lost secret can’t be recovered: revoke the token and make a new one.

Setting Notes
Name 1–64 characters, unique for your account (or among the panel’s keys)
Permissions The scopes it holds (scopes in the API). At least one.
Allowed IP addresses Addresses or CIDR ranges it may be used from, up to 64 (ipAllowlist). Empty means anywhere.
Expires 30 days, 90 days, 1 year or No expiry (expiresInDays: 1–365, or null)
  • An account can have up to 25 personal tokens.
  • A personal token can’t do more than its owner: it holds only scopes the owner has, and the owner’s role and permissions still apply on every call. A panel API key can do exactly what its scopes allow.
  • A personal token stops working if its owner can’t sign in, and a customer’s tokens stop working while you switch off API tokens under Customer features.
  • Calls made with a panel API key are recorded in the audit log under Panel API and the key’s name, such as Panel API · whmcs. The staff sign-in allowlist doesn’t apply to them; give each key its own IP allowlist.
  • Tokens can’t be created or revoked during a support session.
  • Creating a token asks for your password, and the account’s owner is emailed when one is created.
  • Tokens made in a staff member’s own client area work only while the staff member is active, only from the addresses staff can sign in from, and are revoked when the staff member is disabled or removed.
  • The token’s last use and address are shown on the tokens page, and actions are recorded in the audit log under the token’s name.
  • Every call made with a token, reads and refused calls included, is listed for staff under API requests, with what was sent and answered (secrets blanked out). A call with a token the panel doesn’t accept is listed too, by the first characters of what was sent, up to 600 a minute from everyone together. Past 30 a minute from one address, such calls are refused with 429 rate_limited and not listed. A valid token’s calls refused for scope, address or rate are listed up to 60 a minute for each person (each panel API key on its own).
  • A scheduled task set up with a token stops running when the token is revoked or expires, or no longer has the scope for the task’s action.

A request from outside the allowlist gets 403 ip_not_allowed. Behind a proxy, set PANEL_TRUSTED_PROXIES so the controller sees the caller’s real address.

Scopes

Scope Allows Available to
servers:read List servers, IPs, usage and jobs Everyone
servers:power Start, stop, restart, force off and hard reset Everyone
servers:reinstall Wipe and reinstall from an image Everyone
servers:console Open VNC and serial console sessions Everyone
servers:rdns Change PTR records Everyone
servers:snapshots Take, restore and delete snapshots Everyone
servers:backups Change the schedule, back up, restore and download (a full copy of the disk) Everyone
servers:firewall Change firewall rules Everyone
servers:settings Hostname, ISO, boot order, root password resets and rescue mode, which give full control of the server Everyone
ssh_keys:read List SSH keys Everyone
ssh_keys:write Add and remove SSH keys Everyone
dns:read List DNS zones and records Customers and resellers, when DNS hosting is on
dns:write Add, change and delete records, e.g. to get certificates Customers and resellers, when DNS hosting is on
networks:read Floating IPs and private networks Customers and resellers, when either is on
networks:write Move floating IPs for failover, change private networks Customers and resellers, when either is on
servers:create Provision servers for any customer when an order is paid Staff
servers:resize Upgrades, downgrades and extra IPv4 addresses Staff
servers:suspend Suspend and unsuspend servers for overdue invoices Staff
servers:terminate Destroy canceled servers and free their addresses Staff
customers:read Look up customer accounts, their SSH keys and usage reports Staff
customers:write Create and update customer accounts from billing, not a reseller’s account Staff
customers:delete Delete customer accounts that have nothing left running Staff
customers:sign_in One-time links that sign a customer in to the panel from billing (how) Staff
nodes:read Node health, usage and placement Staff
nodes:write Drain, resume and change nodes Staff
nodes:enroll Add nodes and enroll them again Staff
network:write Firewall policies, reverse DNS zones and reverse DNS for any address Staff whose role has Manage IP pools
servers:move Move servers between nodes, empty nodes and cancel moves Staff
metrics:read Read /metrics for Prometheus: nodes, storage, IP pools and the controller, no customer data Staff whose role has See nodes, and panel API keys
reseller:read Usage, quotas, locations, packages and customers Resellers
reseller:customers Sign up customers, with the client ID from your billing Resellers
reseller:servers Create, change, suspend and terminate customers’ servers and GPU instances Resellers

Presets

The token form has presets for common jobs:

Preset Scopes
Read-only servers:read, ssh_keys:read
Automation servers:read, servers:power, servers:rdns
Failover servers:read, networks:read, networks:write
Full server control servers:read, servers:power, servers:reinstall, servers:console, servers:rdns, servers:snapshots, servers:backups, servers:firewall, servers:settings, ssh_keys:read, ssh_keys:write
Billing module (staff) servers:read, servers:create, servers:resize, servers:suspend, servers:terminate, servers:power, servers:reinstall, servers:settings, customers:read, customers:write, customers:sign_in
Billing module (resellers) reseller:read, reseller:customers, reseller:servers, servers:read, servers:power, servers:reinstall, servers:settings

Calls only the panel can make

Some calls work only from a signed-in browser session, not with a token: changing passwords, two-factor and passkeys, managing API tokens and sessions, team access, notification settings, imports, and most staff administration (settings, staff and roles, the audit log, and changing packages, IP pools and templates). A token gets 403 token_not_allowed for these. The Endpoints list marks each one Signed in.

Browser sessions

The panel itself signs in with an HttpOnly session cookie (panel_session), not a token kept in JavaScript or browser storage. Every request that changes something must send an X-CSRF-Token header matching the csrf_token cookie, and requests from other sites are refused. Token requests skip these checks.

  • When the panel’s address is https://, the cookies are called __Host-panel_session and __Host-csrf_token. Browsers keep cookies with that prefix for this exact host only. On a plain http:// test install they keep the names above.
  • A session ends after the inactivity time under Settings → Sign-in and sessions, and in any case 30 days after signing in.

Every word has to appear. ↑ ↓ to move, Enter to open.