Skip to Content
Browse documentation

removeacct — Reseller API

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

POST/api/v1/removeacct/Also accepts GET

Permanently removes an existing hosting account and its associated resources. For a reseller account, the form requires its subaccounts to be removed first; terminatereseller is the separate reseller-wide operation. There is no dry-run or additional confirmation parameter in this endpoint. Verify the target and retain a tested backup before calling it.

Request

The selected account must be in the authenticated reseller accounts list and have a hosting-user file. Other resellers’ accounts are rejected with HTTP 400 and JSON status 400; this is an ownership check, not an authentication failure.

PropertyValue
MethodsGET, POST
Versioned path/api/v1/removeacct/
Default path/api/removeacct/
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
userYesString. Existing hosting username; required account state is described above.

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.

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.

Permanent removal

This request deletes hosting resources. Verify the target and affected account tree and retain tested backups before running an example.

Success response

HTTP 200. Illustrative values; account records and server values vary. Stored account examples show only selected fields.

{
  "data": "User account terminated exampleuser",
  "info": "Hosting account terminated successfully",
  "status": 200
}
FieldTypeMeaning
statusinteger200 on the documented success branch.
infostringOperation description.
datastringSuccess message.

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 terminate hosting account. The 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.