Suspend, change package, password or terminate via the API

For server administrators · Updated 2026-10-29

On this page
  1. List accounts and show one
  2. Suspend and unsuspend
  3. Change the password
  4. Change the package
  5. Terminate
  6. List packages
  7. Task status
  8. Server status (administrators only)
  9. Errors

These endpoints manage accounts that already exist. All use https://<server>:2087/api/v1, the header Authorization: Bearer YOUR_TOKEN, and answer {"status": 1, "data": …} or {"status": 0, "error": "…"}. {username} is the account's username.

List accounts and show one

curl -s -H "Authorization: Bearer $TOKEN" \
  "https://server1.example.com:2087/api/v1/accounts?search=shop"

curl -s -H "Authorization: Bearer $TOKEN" \
  https://server1.example.com:2087/api/v1/accounts/shop1

search matches part of the username, domain or contact email. Each account has these fields:

FieldMeaning
username, domain, email, packageUsername, main domain, contact email, package name
statusactive or suspended; suspend_reason is the reason or null
ipThe account's IP address
disk_used_mb, disk_limit_mbDisk used (files, email, databases) and the package limit
bandwidth_used_mb, bandwidth_limit_mbTraffic this month and the monthly limit
created_atWhen the account was created

A limit of 0 means unlimited.

Suspend and unsuspend

curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"reason":"Unpaid invoice"}' \
  https://server1.example.com:2087/api/v1/accounts/shop1/suspend
# {"status": 1, "data": {"suspended": true}}

curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  https://server1.example.com:2087/api/v1/accounts/shop1/unsuspend
# {"status": 1, "data": {"suspended": false}}

reason is optional (up to 255 characters). See what a suspension stops in suspend an account.

Change the password

curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"password":"N3w-Passw0rd!2026"}' \
  https://server1.example.com:2087/api/v1/accounts/shop1/password
# {"status": 1, "data": {"changed": true}}

Change the package

curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"package":"Business"}' \
  https://server1.example.com:2087/api/v1/accounts/shop1/package
# {"status": 1, "data": {"package": "Business"}}

Terminate

curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  https://server1.example.com:2087/api/v1/accounts/shop1/terminate
# {"status": 1, "data": {"terminated": true}}
Important: this deletes the account with its websites, email and databases at once. There is no confirmation and no undo.

List packages

curl -s -H "Authorization: Bearer $TOKEN" https://server1.example.com:2087/api/v1/packages

Each package has its id, name, every limit (disk_quota_mb, max_inodes, bandwidth_mb, max_addon_domains, max_subdomains, max_parked_domains, max_email_accounts, max_databases, max_cron_jobs, max_ftp_accounts, max_mailing_lists, max_emails_per_hour, cpu_limit, memory_limit_mb, process_limit), shell_access, php_version, feature_list_id, and accounts (how many accounts use it).

Task status

curl -s -H "Authorization: Bearer $TOKEN" https://server1.example.com:2087/api/v1/jobs/1234
# {"status": 1, "data": {"id": 1234, "type": "account.create", "status": "done", "created_at": "…", "finished_at": "…"}}

status is queued, running, done or failed. The task numbers are shown in Task Queue. A reseller sees only tasks they started.

Server status (administrators only)

curl -s -H "Authorization: Bearer $TOKEN" https://server1.example.com:2087/api/v1/server/status

Returns load (1, 5 and 15 minute averages), memory_mb and disk_mb (total and used), services (each service with the state the system reports, for example active or failed) and the panel version.

Errors

  • 422 Account not found. — no such username, or it belongs to another reseller.
  • 422 Package not found. — no package with that name for this token's owner.
  • 422 Admin only. — a reseller called /server/status.
  • 403 This reseller does not have the privilege for this action.

More in API errors.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.