Skip to Content
Browse documentation

createacct — Reseller API

Create a hosting account through the Reseller API, with request fields, response details, errors and cURL/Python/PHP examples.

POST/api/v1/createacct/Also accepts GET

Creates 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 the authenticated reseller; owner is that reseller unless resellerself is exactly on. The package must be owned by this reseller. If resellerchain is off, reseller and resellerself are forced off. When creating a subreseller under a finite parent account limit, unlimited is rejected and the requested account limit must be strictly less than the remaining allocation. Account provisioning is dispatched through the reseller task interface. Omitted package overrides inherit the selected package. The API does not accept arbitrary panel form fields: only the parameters below are declared.

Request

The selected package must be owned by the authenticated reseller; a globally existing package is not sufficient. Ownership rejection returns HTTP 400 and JSON status 400.

PropertyValue
MethodsGET, POST
Versioned path/api/v1/createacct/
Default path/api/createacct/
AuthenticationReseller API credentials.
HeaderRequired value
X-RESELLERThe reseller account owning these API credentials.
X-API-USERYour Reseller API username.
X-API-PASSWORDIts API password.

Parameters

FieldRequiredType and behavior
domainYesString. New, valid and unused primary domain; restricted names are rejected.
userYesString. New, unused hosting username; see the naming constraints above.
passwordNoString. Plaintext hosting password sent over HTTPS. Omitted/blank generates 15 characters; password changes do not return the generated value.
emailYesString. Valid contact email address.
packageYesString. Existing hosting package name, without the .yaml suffix.
languageNoString. Configured language code; default en.
themeNoString. Installed user theme; default default.
mailserverNoString. local or remote; default local.
dkimNoString. on or off; default off. Enable account DKIM configuration.
spfNoString. on or off; default off. Enable account SPF configuration.
resellerNoString. on or off; default off. Enable reseller privileges on creation.
resellerselfNoString. on or off; default off. Exactly on makes the new account self-owned.
use_registrar_nsNoString. on or off; default off. Use registrar nameserver configuration.
ipv4NoString. on or off; default off. Request dedicated IPv4 allocation; this is a flag, not an IP address. Package settings also affect allocation.
ipv6NoString. on or off; default off. Request dedicated IPv6 allocation; this is a flag, not an IP address. Package settings also affect allocation.
shellNoString. on or off; default off. Request jail-shell access; package shell settings also apply.
reseller_limtNoString. Maximum reseller account count: unlimited or nonnegative numeric string; default unlimited.
reseller_bandwidthNoString. Reseller bandwidth limit in MB: unlimited or nonnegative numeric string; default unlimited.
reseller_quotaNoString. Reseller disk limit in MB: unlimited or nonnegative numeric string; default unlimited.
addondomainsNoString. Resource count override: unlimited or nonnegative numeric string; omission inherits package.
parkeddomainsNoString. Resource count override: unlimited or nonnegative numeric string; omission inherits package.
subdomainsNoString. Resource count override: unlimited or nonnegative numeric string; omission inherits package.
email_accountsNoString. Resource count override: unlimited or nonnegative numeric string; omission inherits package.
ftpNoString. Resource count override: unlimited or nonnegative numeric string; omission inherits package.
sqlNoString. Resource count override: unlimited or nonnegative numeric string; omission inherits package.
bandwidthNoString. Bandwidth allocation in MB: unlimited or nonnegative numeric string; omission inherits package.
quotaNoString. Disk allocation in MB: unlimited or nonnegative numeric string. Omission inherits the selected package.
mailquotaNoString. 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, examplereseller, 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
}
FieldTypeMeaning
statusinteger200 on the documented success branch.
infostringOperation description.
dataobjectOperation data described below.
data.userstringStored account fields vary by configuration.
data.domainstringStored 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

ConditionActual HTTP statusResponse behavior
Missing credentials with no other authenticated identity403detail: Authentication credentials were not provided.
Rejected password or source IP403detail: Invalid API credentials
Demo server400error: Demo server; info: Api Operations not available in demo server; JSON status: 403.
Invalid/missing operation fields or invalid target state400Field errors in error; JSON status: 400.
Backend reports failure400Operation error in error; JSON status: 500.
Unsupported method405 after authenticationMethod-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.

See Reseller API authentication and connection troubleshooting.