createacct — WAP API
Create a hosting account through the WAP root administrator API, with request fields, response details, errors and cURL/Python/PHP examples.
/api/v1/createacct/Also accepts GETCreates an operating-system hosting user, its account configuration and associated hosting services. Choose an unused username and domain, an existing package and a valid contact email. The domain field normalizes the DNS name, including supported internationalized names, before checking existing/restricted domains. Usernames follow the installed Linux-style validator: lowercase letter or underscore first, then lowercase letters, digits, underscores or hyphens, up to 32 characters, with an optional final dollar sign within that limit; existing system names and existing account data are rejected. The handler sets real_owner to root; owner is root unless resellerself is exactly on. Omitted package overrides inherit the selected package. The API does not accept arbitrary panel form fields: only the parameters below are declared.
Request
| Property | Value |
|---|---|
| Methods | GET, POST |
| Versioned path | /api/v1/createacct/ |
| Default path | /api/createacct/ |
| Authentication | WAP root administrator API credentials. |
| Header | Required value |
|---|---|
X-API-USER | Your WAP API username. |
X-API-PASSWORD | Its API password. |
Parameters
| Field | Required | Type and behavior |
|---|---|---|
domain | Yes | String. New, valid and unused primary domain; restricted names are rejected. |
user | Yes | String. New, unused hosting username; see the naming constraints above. |
password | No | String. Plaintext hosting password sent over HTTPS. Omitted/blank generates 15 characters; password changes do not return the generated value. |
email | Yes | String. Valid contact email address. |
package | Yes | String. Existing hosting package name, without the .yaml suffix. |
language | No | String. Configured language code; default en. |
theme | No | String. Installed user theme; default default. |
mailserver | No | String. local or remote; default local. |
dkim | No | String. on or off; default off. Enable account DKIM configuration. |
spf | No | String. on or off; default off. Enable account SPF configuration. |
reseller | No | String. on or off; default off. Enable reseller privileges on creation. |
resellerself | No | String. on or off; default off. Exactly on makes the new account self-owned. |
use_registrar_ns | No | String. on or off; default off. Use registrar nameserver configuration. |
ipv4 | No | String. on or off; default off. Request dedicated IPv4 allocation; this is a flag, not an IP address. Package settings also affect allocation. |
ipv6 | No | String. on or off; default off. Request dedicated IPv6 allocation; this is a flag, not an IP address. Package settings also affect allocation. |
shell | No | String. on or off; default off. Request jail-shell access; package shell settings also apply. |
reseller_limt | No | String. Maximum reseller account count: unlimited or nonnegative numeric string; default unlimited. |
reseller_bandwidth | No | String. Reseller bandwidth limit in MB: unlimited or nonnegative numeric string; default unlimited. |
reseller_quota | No | String. Reseller disk limit in MB: unlimited or nonnegative numeric string; default unlimited. |
addondomains | No | String. Resource count override: unlimited or nonnegative numeric string; omission inherits package. |
parkeddomains | No | String. Resource count override: unlimited or nonnegative numeric string; omission inherits package. |
subdomains | No | String. Resource count override: unlimited or nonnegative numeric string; omission inherits package. |
email_accounts | No | String. Resource count override: unlimited or nonnegative numeric string; omission inherits package. |
ftp | No | String. Resource count override: unlimited or nonnegative numeric string; omission inherits package. |
sql | No | String. Resource count override: unlimited or nonnegative numeric string; omission inherits package. |
bandwidth | No | String. Bandwidth allocation in MB: unlimited or nonnegative numeric string; omission inherits package. |
quota | No | String. Disk allocation in MB: unlimited or nonnegative numeric string. Omission inherits the selected package. |
mailquota | No | String. Per-mailbox quota in MB: unlimited or nonnegative numeric string; omission inherits package. |
POST reads the JSON/form body; GET reads query parameters. The examples use form-encoded POST. Although GET is supported, use POST for account changes and login-link generation so action fields are not placed in URLs. Authentication remains in the two headers. Undeclared fields are not additional API options.
The on/off validators also accept On and Off, but downstream checks compare the lowercase on literally. Use lowercase values consistently. Custom resource overrides accept unlimited or numeric strings; they do not add new package fields beyond those listed. A generated password is not returned as a plaintext credential.
Replace server.example.com, billing_api and YOUR_API_PASSWORD in each standalone example. Replace operation sample values with your actual target and an existing package where required. Python needs Requests; PHP needs the cURL extension. These examples make real calls when run.
Success response
HTTP 200. Illustrative values; account records and server values vary. Stored account examples show only selected fields.
{
"data": {
"user": "exampleuser",
"domain": "example.com"
},
"info": "Hosting account created successfully",
"status": 200
}| Field | Type | Meaning |
|---|---|---|
status | integer | 200 on the documented success branch. |
info | string | Operation description. |
data | object | Operation data described below. |
data.user | string | Stored account fields vary by configuration. |
data.domain | string | Stored account fields vary by configuration. |
data.is_suspended | string | Stored account fields vary by configuration. |
data.is_reseller | string | Stored account fields vary by configuration. |
Account record contents are not a fixed public schema. Fields such as user/domain and nested limits depend on account configuration; reseller_data appears only where the handler adds it. Do not expose entire administrator responses to an end-user browser.
Errors and demo mode
| Condition | Actual HTTP status | Response behavior |
|---|---|---|
| Missing credentials with no other authenticated identity | 403 | detail: Authentication credentials were not provided. |
| Rejected password or source IP | 403 | detail: Invalid API credentials |
| Demo server | 400 | error: Demo server; info: Api Operations not available in demo server; JSON status: 403. |
| Invalid/missing operation fields or invalid target state | 400 | Field errors in error; JSON status: 400. |
| Backend reports failure | 400 | Operation error in error; JSON status: 500. |
| Unsupported method | 405 after authentication | Method-not-allowed response. |
Validation failure description: Unable to create hosting account. This data is invalid..
Check both the HTTP status and JSON shape. Authentication failures do not use the operation envelope. Unexpected uncaught server errors are not guaranteed to return the documented JSON shape. Do not automatically retry account creation, password changes, deletions or SSO generation after a timeout: confirm the actual state first.