1. Home
  2. Docs
  3. Developer Guide
  4. API
  5. Accounts

Accounts

The account function creates, updates, suspends, unsuspends, lists and deletes hosting accounts. Two small related functions change an account’s package (changepack) and password (changepass).

URL: https://YOUR-SERVER:2304/v1/account/ — all requests are POST and include key and action.

Create an account (action=add)

ParameterRequiredDescription
domainyesMain domain of the account, for example example.com
useryesUsername: lower-case letters and numbers, no spaces
passyesAccount password (see encodepass)
emailyesContact email of the account owner
server_ipsyesIP address the account’s websites will use
packagenoPackage name or ID. If it does not exist, the first available package is used.
inodenoInode (number of files) limit, 0 = unlimited
limit_nprocnoMaximum number of processes
limit_nofilenoMaximum number of open files
autosslno1 = install a free SSL certificate for the domain (the domain must already point to the server)
backupnoon = include the account in backups (default off)
langnoUser panel language, for example en (default)
resellerno1 = create the account as a reseller
encodepassnoSend only as encodepass=true, and then send pass base64-encoded. To send a plain password, leave this parameter out completely.

Warning: Do not send encodepass=false. Any value — even false — makes the API base64-decode the password, and the account would get a different password than you intended. Either omit the parameter or send true with a base64-encoded password.

curl -k -X POST https://203.0.113.10:2304/v1/account/ \
  -d "key=YOUR_API_KEY&action=add&domain=example.com&user=john&pass=S3cretPass&email=john@example.com&package=default&server_ips=203.0.113.10&autossl=1"
{"status":"OK"}

If the username is invalid or already exists:

{"status":"Error","msj":"Check All Fields (only lower caps are allowed and no special characters or empty spaces..."}

List accounts (action=list)

curl -k -X POST https://203.0.113.10:2304/v1/account/ -d "key=YOUR_API_KEY&action=list"
{"status":"OK","msj":[{"package_name":"default","idpackage":"1","id":"2","backup":"on","username":"john","email":"john@example.com","setup_date":"2026-10-25 16:17:53","ip_address":"203.0.113.10","domain":"example.com","reseller":"","owner":"root","diskused":1,"disklimit":"20000","bandwidth":"","bwlimit":"100000","status":"active"}]}
FieldMeaning
username, domain, emailAccount identity
package_name, idpackageAssigned package
ip_addressAccount IP
diskused / disklimitDisk usage and limit in MB
bandwidth / bwlimitBandwidth usage and limit in MB
statusactive or suspended
ownerroot or the reseller that owns the account
setup_dateCreation date

Note: list always returns all accounts the key may see (all accounts for a root key, the reseller’s customers for a reseller key). Filter the result by username in your code; use accountdetail for details of one account.

Update an account (action=udp)

ParameterDescription
userAccount to update (required)
emailNew contact email
packageNew package (name or ID)
server_ipsNew IP address
backupon / off
inode, processes, openfilesNew resource limits
curl -k -X POST https://203.0.113.10:2304/v1/account/ -d "key=YOUR_API_KEY&action=udp&user=john&email=info@example.com&package=premium"
{"status":"OK"}

Suspend and unsuspend (action=susp / action=unsp)

curl -k -X POST https://203.0.113.10:2304/v1/account/ -d "key=YOUR_API_KEY&action=susp&user=john"
curl -k -X POST https://203.0.113.10:2304/v1/account/ -d "key=YOUR_API_KEY&action=unsp&user=john"
{"status":"OK"}

A suspended account’s websites, email and panel login stop working until it is unsuspended — typical for unpaid invoices.

Delete an account (action=del)

curl -k -X POST https://203.0.113.10:2304/v1/account/ -d "key=YOUR_API_KEY&action=del&user=john"
{"status":"OK"}<pre>… User john deleted from server. … Account Removal Script Completed!</pre>

Warning: Deletion removes the account’s files, databases, email and DNS zones permanently. The response starts with {"status":"OK"} followed by an HTML log of the removal — parse only the beginning, or check with list afterwards.

Change the package (changepack)

URL: /v1/changepack/ — action=udp, user, package = package ID (from packages list).

curl -k -X POST https://203.0.113.10:2304/v1/changepack/ -d "key=YOUR_API_KEY&action=udp&user=john&package=3"
{"status":"OK"}

With a package name instead of an ID the call fails with {"status":"Error","msl":"Something went wrong"}. (You can also change the package by name with account action=udp.)

Change the password (changepass)

URL: /v1/changepass/ — action=udp, user, pass. Changes the panel/SSH/FTP password of the account and its main MySQL user.

curl -k -X POST https://203.0.113.10:2304/v1/changepass/ -d "key=YOUR_API_KEY&action=udp&user=john&pass=N3wS3cret"
{"status":"OK"}

Related

Was this article helpful to you? No Yes