Accounts
Bu sayfa henüz Türkçeye çevrilmedi. İngilizce sürüm gösteriliyor.
GET /api/v1/accounts
List hosting accounts
Paginated list of accounts with optional status / search / type / plan / reseller filtering; search matches the username, e-mail, primary domain and subdomains. sort=disk orders by the last measured disk use over the plan's limit and include_usage=true adds that measurement (usage, taken every 15 minutes) to each row. Returns the standard {status, data} envelope where data is {accounts, total, limit, offset, counts}; total counts the matching accounts, counts the accounts in scope (every account, or the reseller's with reseller_owner) before the other filters.
Query parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
limit |
integer | no | minimum=1; maximum=1000 |
offset |
integer | no | minimum=0 |
sort |
string | no | pattern=^(created_at|username|status|plan|disk)$ |
order |
string | no | pattern=^(asc|desc)$ |
status |
string | no | — |
search |
string | no | — |
is_reseller |
boolean | no | — |
reseller_owner |
string | no | — |
plan_id |
string | no | — |
include_usage |
boolean | no | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_PaginatedAccountsData_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"accounts": [
"..."
],
"counts": "...",
"limit": 1.0,
"offset": 0,
"total": 0
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/accounts
POST /api/v1/accounts
Create hosting account
Provision a new account with the requested plan and primary domain. Returns the persisted account record on success.
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
auto_ssl |
boolean | no | default True |
domain |
string | yes | — |
email |
string | yes | — |
ip_address |
string | no | — |
is_reseller |
boolean | no | default False |
package |
PackageLimits | no | — |
password |
string | yes | At least 8 characters and at most 72 bytes when UTF-8 encoded. |
php_version |
string | no | — |
plan_id |
string | no | — |
reseller_acl_plan_id |
string | no | — |
reseller_limits |
ResellerLimits | no | — |
reseller_owner |
string | no | — |
setup_mail_dns |
boolean | no | default True |
shell_access |
boolean | no | default False |
username |
string | yes | — |
webserver |
string | no | nginx, nginx_apache, apache, openlitespeed or litespeed; absent means the server's web server. Where nginx serves the public ports, apache is served as nginx_apache (Apache behind nginx). openlitespeed and litespeed are server-wide modes: accepted only on a server running them (elsewhere 422 VALIDATION_ERROR). Accepted on the reseller endpoint (POST /api/v1/client/accounts) as well. |
Request body example:
{
"auto_ssl": true,
"domain": "example.com",
"email": "[email protected]",
"ip_address": "string",
"is_reseller": false,
"package": {
"bandwidth_mb": 10240,
"disk_mb": 1024,
"email_hourly_limit": 100,
"max_databases": 1,
"max_domains": 1,
"max_email_accounts": 5,
"max_ftp_accounts": 5,
"max_node_apps": 0,
"max_parked_domains": 1,
"max_python_apps": 0,
"max_subdomains": 5,
"node_max_memory_mb": 0,
"node_workers_limit": 4,
"python_workers_limit": 4,
"resource": {
"cpu_limit": "...",
"io_read_mbps": "...",
"io_write_mbps": "...",
"iops_read": "...",
"iops_write": "...",
"memory_mb": "...",
"nproc": "..."
}
},
"password": "REPLACE_ME",
"php_version": "string",
"plan_id": "string",
"reseller_acl_plan_id": "string",
"reseller_limits": {
"max_accounts": 10,
"max_bandwidth_mb": 102400,
"max_databases": 10,
"max_disk_mb": 10240,
"max_domains": 10,
"max_email_accounts": 50,
"max_ftp_accounts": 10,
"overselling": false
},
"reseller_owner": "string",
"setup_mail_dns": true,
"shell_access": false,
"username": "alice",
"webserver": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_AccountResponse_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"auto_ssl": true,
"created_at": "...",
"domain": "example.com",
"email": "[email protected]",
"home_dir": "string",
"ip_address": "...",
"is_reseller": false,
"package": "...",
"php_version": "string",
"plan_id": "...",
"post_create_issues": [
"..."
],
"reseller_acl_plan_id": "...",
"reseller_limits": "...",
"reseller_owner": "...",
"setup_mail_dns": true,
"shell_access": false,
"status": "...",
"sub_account_count": "...",
"subdomains": [
"..."
],
"suspend_reason": "...",
"updated_at": "...",
"username": "alice",
"webserver": "..."
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts
DELETE /api/v1/accounts/{username}
Terminate account
Permanently delete an account: removes home directory, Linux user, databases, FTP users, virtual hosts and metadata. Not reversible.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X DELETE \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/accounts/{username}
GET /api/v1/accounts/{username}
Get account by username
Fetch a single account's full record.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_AccountResponse_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"auto_ssl": true,
"created_at": "...",
"domain": "example.com",
"email": "[email protected]",
"home_dir": "string",
"ip_address": "...",
"is_reseller": false,
"package": "...",
"php_version": "string",
"plan_id": "...",
"post_create_issues": [
"..."
],
"reseller_acl_plan_id": "...",
"reseller_limits": "...",
"reseller_owner": "...",
"setup_mail_dns": true,
"shell_access": false,
"status": "...",
"sub_account_count": "...",
"subdomains": [
"..."
],
"suspend_reason": "...",
"updated_at": "...",
"username": "alice",
"webserver": "..."
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/accounts/{username}
PUT /api/v1/accounts/{username}
Update account
Partially update an account (only fields present in the body are mutated). May emit warnings[] for non-fatal advisories such as partial config rollback notices.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
auto_ssl |
boolean | no | — |
domain |
string | no | — |
email |
string | no | — |
ip_address |
string | no | — |
is_reseller |
boolean | no | — |
package |
PackageLimits | no | — |
php_version |
string | no | — |
plan_id |
string | no | — |
reseller_acl_plan_id |
string | no | — |
reseller_limits |
ResellerLimits | no | — |
reseller_owner |
string | no | — |
setup_mail_dns |
boolean | no | — |
shell_access |
boolean | no | — |
webserver |
string | no | Moves the account to another web server (values as on create). Every hosted name moves - primary, addons, subdomains and parked domains - each with its own PHP version, document root and redirects, and a name with a certificate keeps HTTPS (built from its certificate record). The configuration is tested once; when the web server refuses it, every file is put back, the account stays on its web server, nothing else in the request is applied and the answer is 500 VHOST_CONFIG_ERROR. The web server the account already runs changes nothing. Accepted on the reseller endpoint (PUT /api/v1/client/accounts/{username}) as well. |
Request body example:
{
"auto_ssl": false,
"domain": "string",
"email": "string",
"ip_address": "string",
"is_reseller": false,
"package": {
"bandwidth_mb": 10240,
"disk_mb": 1024,
"email_hourly_limit": 100,
"max_databases": 1,
"max_domains": 1,
"max_email_accounts": 5,
"max_ftp_accounts": 5,
"max_node_apps": 0,
"max_parked_domains": 1,
"max_python_apps": 0,
"max_subdomains": 5,
"node_max_memory_mb": 0,
"node_workers_limit": 4,
"python_workers_limit": 4,
"resource": "..."
},
"php_version": "string",
"plan_id": "string",
"reseller_acl_plan_id": "string",
"reseller_limits": {
"max_accounts": 10,
"max_bandwidth_mb": 102400,
"max_databases": 10,
"max_disk_mb": 10240,
"max_domains": 10,
"max_email_accounts": 50,
"max_ftp_accounts": 10,
"overselling": false
},
"reseller_owner": "string",
"setup_mail_dns": false,
"shell_access": false,
"webserver": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_AccountResponse_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"auto_ssl": true,
"created_at": "...",
"domain": "example.com",
"email": "[email protected]",
"home_dir": "string",
"ip_address": "...",
"is_reseller": false,
"package": "...",
"php_version": "string",
"plan_id": "...",
"post_create_issues": [
"..."
],
"reseller_acl_plan_id": "...",
"reseller_limits": "...",
"reseller_owner": "...",
"setup_mail_dns": true,
"shell_access": false,
"status": "...",
"sub_account_count": "...",
"subdomains": [
"..."
],
"suspend_reason": "...",
"updated_at": "...",
"username": "alice",
"webserver": "..."
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X PUT \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts/{username}
POST /api/v1/accounts/{username}/change-package
Change account plan
Move an account onto a different plan. Idempotent: changing to the same plan is a no-op (no 422). Returns old vs new package limits + the list of changes applied.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
plan_id |
string | yes | minLength=1 |
Request body example:
{
"plan_id": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_PackageChangeResponse_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"changes_applied": [
"..."
],
"new_package": "...",
"new_plan_id": "string",
"old_package": "...",
"old_plan_id": "...",
"username": "alice"
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts/{username}/change-package
POST /api/v1/accounts/{username}/login-token
Create a one-time client sign-in link
API keys only — an administrator in the panel uses impersonation. Returns login_url, relative to the panel address: opened in the visitor's browser it signs into the account's client panel once, without the password or a second factor, as the customer (not an impersonation; like a password sign-in it ends the account's other client sessions). The first visit consumes the link whatever the outcome; it expires after ttl seconds (default 60, 10–300) and, with ip, works only from that address. An expired, used or refused link lands on the client sign-in page. A suspended account answers 403 ACCOUNT_SUSPENDED. The link is /api/v1/auth/client/login-link#token=<token>: the token rides after #, which the browser never sends, so it stays out of access logs, proxy and CDN records and the next page's Referer; open the URL as it is.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Request body example:
{
"ip": "string",
"lang": "string",
"ttl": 60
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_LoginLinkData_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"expires_at": "string",
"expires_in": 0,
"ip": "...",
"login_url": "string",
"username": "alice"
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts/{username}/login-token
PATCH /api/v1/accounts/{username}/password
Change account password
Reset the account's login password (also the account's system user and its default FTP user). Allowed to the admin session and to a server-wide API key with full access (the key a billing system uses); a restricted key is refused at the scope check (403 SCOPE_DENIED) and every other caller with 403 HMAC_FORBIDDEN_FOR_CREDENTIAL_MUTATION. The account's open client panel sessions (its own, a remembered one, an administrator's log-in-as-client one) end with the change.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
password |
string | yes | At least 8 characters and at most 72 bytes when UTF-8 encoded. |
Request body example:
{
"password": "REPLACE_ME"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X PATCH \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts/{username}/password
GET /api/v1/accounts/{username}/resources
Get account resource limits + live usage
Bundles the account's current cgroup limits, a live usage snapshot (CPU, disk throughput and IOPS averaged since the account's previous reading, or over one second when there is none), and the cgroup_supported flag the panel uses to decide whether to render the usage chart.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_ResourceBundleData_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"cgroup_supported": false,
"limits": "...",
"usage": "..."
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/accounts/{username}/resources
PUT /api/v1/accounts/{username}/resources
Update resource limits
Patch one or more cgroup limits (CPU %, memory MB, I/O Mbps, IOPS, process count). Only fields present in the body are modified; others retain their current value.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
cpu_limit |
integer | no | — |
io_read_mbps |
integer | no | — |
io_write_mbps |
integer | no | — |
iops_read |
integer | no | — |
iops_write |
integer | no | — |
memory_mb |
integer | no | — |
nproc |
integer | no | — |
Request body example:
{
"cpu_limit": 0,
"io_read_mbps": 0,
"io_write_mbps": 0,
"iops_read": 0,
"iops_write": 0,
"memory_mb": 0,
"nproc": 0
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_ResourceLimits_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"cpu_limit": 100,
"io_read_mbps": 20,
"io_write_mbps": 10,
"iops_read": 1024,
"iops_write": 512,
"memory_mb": 512,
"nproc": 50
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X PUT \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts/{username}/resources
POST /api/v1/accounts/{username}/suspend
Suspend account
Suspend an account: disables web/mail/ftp/db access and stops outbound mail. Reversible via /unsuspend. Optional reason is recorded in the audit log.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Request body example:
{
"reason": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/accounts/{username}/suspend
POST /api/v1/accounts/{username}/unsuspend
Unsuspend account
Re-enable a previously suspended account.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
MessageResponse |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"message": "string",
"status": "success"
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/accounts/{username}/unsuspend
GET /api/v1/accounts/{username}/usage
Get account usage
Live usage snapshot: disk, bandwidth, domain / database / email / ftp counts, plus a cgroup-derived resource block when supported.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_AccountUsage_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"bandwidth_breakdown_mb": {},
"bandwidth_limit_mb": 0,
"bandwidth_period": "",
"bandwidth_used_mb": 0.0,
"database_count": 0,
"disk_limit_mb": 0,
"disk_used_mb": 0.0,
"domain_count": 0,
"email_count": 0,
"ftp_count": 0,
"resource": "..."
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/accounts/{username}/usage
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.