Suspend, change package, password or terminate via the API
On this page
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:
| Field | Meaning |
|---|---|
username, domain, email, package | Username, main domain, contact email, package name |
status | active or suspended; suspend_reason is the reason or null |
ip | The account's IP address |
disk_used_mb, disk_limit_mb | Disk used (files, email, databases) and the package limit |
bandwidth_used_mb, bandwidth_limit_mb | Traffic this month and the monthly limit |
created_at | When 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}}
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
422Account not found.— no such username, or it belongs to another reseller.422Package not found.— no package with that name for this token's owner.422Admin only.— a reseller called/server/status.403This reseller does not have the privilege for this action.
More in API errors.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- REST API overview: authentication, requests and responses
How the REST API v1 works: base URL, Bearer token authentication, JSON or form bodies, the response envelope, HTTP status codes and every endpoint.
- How to create a hosting account with the API
Create a hosting account with POST /api/v1/accounts: the required fields, a complete curl example, the account object you get back and the errors to expect.
- Single sign-on: one-time login link to the control panel
Create a one-time link that signs a customer in to their control panel from your client area. Valid 60 seconds, single use, with code examples.
- API returns 401 Unauthorized, 403 or IP blocked
Fix API errors: 401 Unauthorized, expired token, address not allowed, IP blocked after failed attempts, read-only token, missing privilege and 422.