Client — Account
GET /api/v1/client/accounts
List reseller sub-accounts
List hosting accounts owned by the calling reseller with pagination, sorting, status / plan filter, and search (username, e-mail, primary domain, subdomains). include_usage=true adds the last measured disk use (usage, taken every 15 minutes). data is {accounts, total, limit, offset, counts}; counts covers the reseller's accounts before the filters.
Query parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
limit |
integer | no | minimum=1; maximum=200 |
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 | — |
plan_id |
string | no | — |
include_usage |
boolean | no | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"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/client/accounts
POST /api/v1/client/accounts
Create reseller sub-account
Create a new hosting account owned by the calling reseller. Reseller-scoping fields are forced server-side.
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_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"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/client/accounts
DELETE /api/v1/client/accounts/{username}
Terminate reseller sub-account
Permanently terminate a sub-account owned by the calling reseller.
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/client/accounts/{username}
GET /api/v1/client/accounts/{username}
Get reseller sub-account
Return detailed metadata for a sub-account owned by the calling reseller.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"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/client/accounts/{username}
PUT /api/v1/client/accounts/{username}
Update reseller sub-account
Update sub-account fields owned by the calling reseller. Admin-only fields are stripped server-side.
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_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"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/client/accounts/{username}
PATCH /api/v1/client/accounts/{username}/password
Change reseller sub-account password
Reset the password of a sub-account owned by the calling reseller. Requires session cookie (HMAC forbidden).
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/client/accounts/{username}/password
POST /api/v1/client/accounts/{username}/suspend
Suspend reseller sub-account
Suspend a sub-account owned by the calling reseller with an optional reason.
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/client/accounts/{username}/suspend
POST /api/v1/client/accounts/{username}/unsuspend
Unsuspend reseller sub-account
Reactivate a previously suspended sub-account owned by the calling reseller.
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/client/accounts/{username}/unsuspend
GET /api/v1/client/accounts/{username}/waf
Sub-account WAF status
The WAF mode of a sub-account owned by the calling reseller (inherit follows the server's engine mode), the mode in force on its sites, its rule exclusions and its CRS application exclusion sets. Needs the reseller ACL's modsecurity_manage.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_WafAccountStatus_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"apps": [
"..."
],
"effective_mode": "off",
"mode": "inherit",
"rule_exclusions": [
"..."
],
"server_mode": "off",
"username": "alice",
"waf_enabled": false
},
"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/client/accounts/{username}/waf
PUT /api/v1/client/accounts/{username}/waf
Toggle sub-account WAF
On / off switch over a sub-account's WAF mode (off sets off; on keeps a mode of the account's own and turns an account that is off back to inherit). Sub-account owned by the calling reseller; needs modsecurity_manage.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
enabled |
boolean | yes | — |
Request body example:
{
"enabled": false
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_WafAccountStatus_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"apps": [
"..."
],
"effective_mode": "off",
"mode": "inherit",
"rule_exclusions": [
"..."
],
"server_mode": "off",
"username": "alice",
"waf_enabled": false
},
"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/client/accounts/{username}/waf
PUT /api/v1/client/accounts/{username}/waf/apps
Choose a sub-account's application exclusion sets
Per CRS application exclusion set: on (every site of the sub-account), off, auto (WordPress only: the sites WordPress is found on). Sub-account owned by the calling reseller; needs modsecurity_manage.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
apps |
object | yes | — |
Request body example:
{
"apps": {}
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_WafAccountStatus_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"apps": [
"..."
],
"effective_mode": "off",
"mode": "inherit",
"rule_exclusions": [
"..."
],
"server_mode": "off",
"username": "alice",
"waf_enabled": false
},
"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/client/accounts/{username}/waf/apps
GET /api/v1/client/accounts/{username}/waf/audit-log
Sub-account WAF log
The newest ModSecurity audit entries whose Host header names one of the sub-account's own domains. Sub-account owned by the calling reseller; needs modsecurity_manage.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Query parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
limit |
integer | no | minimum=1; maximum=1000 |
offset |
integer | no | minimum=0 |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_list_WafAuditLogEntry__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": [
{
"action": "...",
"client_ip": "...",
"host": "...",
"request_uri": "...",
"rule_id": "...",
"rule_ids": "...",
"rule_message": "...",
"severity": "...",
"timestamp": "..."
}
],
"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/client/accounts/{username}/waf/audit-log
PUT /api/v1/client/accounts/{username}/waf/mode
Set a sub-account's WAF mode
inherit follows the server's engine mode; off, detection_only and on set the sub-account's own. Sub-account owned by the calling reseller; needs modsecurity_manage. Answers 409 FEATURE_DISABLED while modsecurity.per_account_overrides is off.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
mode |
string | yes | enum: inherit, off, detection_only, on |
Request body example:
{
"mode": "inherit"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_WafAccountStatus_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"apps": [
"..."
],
"effective_mode": "off",
"mode": "inherit",
"rule_exclusions": [
"..."
],
"server_mode": "off",
"username": "alice",
"waf_enabled": false
},
"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/client/accounts/{username}/waf/mode
POST /api/v1/client/accounts/{username}/waf/rules/exclude
Exclude a CRS rule for a sub-account
The rule no longer triggers for the sub-account's sites, or, with uri, only on paths that begin with it (a path prefix; no query string). Sub-account owned by the calling reseller; needs modsecurity_manage.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
description |
string | no | — |
rule_id |
integer | yes | minimum=900000.0; maximum=999999.0 |
uri |
string | no | — |
Request body example:
{
"description": "string",
"rule_id": 900000.0,
"uri": "string"
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_WafAccountStatus_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"apps": [
"..."
],
"effective_mode": "off",
"mode": "inherit",
"rule_exclusions": [
"..."
],
"server_mode": "off",
"username": "alice",
"waf_enabled": false
},
"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/client/accounts/{username}/waf/rules/exclude
DELETE /api/v1/client/accounts/{username}/waf/rules/exclude/{rule_id}
Remove a sub-account's rule exclusion
Removes the exclusion of the rule without a URI scope, or — with uri — the one scoped to that path prefix. Sub-account owned by the calling reseller; needs modsecurity_manage.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
username |
string | yes | — |
rule_id |
integer | yes | — |
Query parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
uri |
string | no | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_WafAccountStatus_ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {
"apps": [
"..."
],
"effective_mode": "off",
"mode": "inherit",
"rule_exclusions": [
"..."
],
"server_mode": "off",
"username": "alice",
"waf_enabled": false
},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
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/client/accounts/{username}/waf/rules/exclude/{rule_id}
Our support team is here around the clock for anything you can't find above.