Account Functions
The below functions allow you to view, setup, modify, and terminate accounts setup within your Reseller Central.
getAccounts
Retieve a list of the accounts you have created in your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- Optional Parameters:
- filters (string) - string of advanced filtering options
- search (string) - domain of the account to search for
- status (int) - status of account, 1 = active, 2 = suspended
- pack_id (int) - id of the package set on accounts to search for
- filters (string) - string of advanced filtering options
- sort (string) - string of advanced sorting options
- Example: https://cp.hostnine.com/api/?module=getAccounts&api_key=mygeneratedapikey
&filters=%search:mydomainhere.com%status:1 - Return: Show
createAccount
Create a new account within your Reseller Central using the options provided.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- domain (string) - primary domain of the new account
- username (string) - username of the new account
- note: must be 3-8 characters, starting with a letter, cannot contain the word 'test'
- password (string) - password to set for the new account control panel
- location (string) - location to create the new account
- Use one of the following:
- pack_id (int) - id of the package to set for the new account
- package (string) - name of the package to set for the new account
- Optional Parameters:
- contact (string) - contact email for the new account control panel
- skeleton (string) - the name of your skeleton package to be used with new accounts
- Example: https://cp.hostnine.com/api/?module=createAccount&api_key=mygeneratedapikey
&domain=mydomainhere.com&username=myuser&password=myaccountpassword
&location=(US)%20Central&package=MyGoldPackage - Return: Show
viewAccount
View the details of an account setup within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Example: https://cp.hostnine.com/api/?module=viewAccount&api_key=mygeneratedapikey&domain=mydomainhere.com
- Return: Show
modifyAccount
Modify the hosting options of an account within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Optional Parameters:
- newdomain (string) - new domain name for the account
- username (string) - new username for the account
- password (string) - new password for the account
- quota (int) - new quota limit for the account
- bandwidth (int) - new bandwidth limit for the account
- theme (string) - new control panel theme for the account
- ns1 (string) - new first nameserver for the account
- ns2 (string) - new second nameserver for the account
- Optionally one of the following:
- pack_id (int) - id of the package to set for the account
- package (string) - name of the package to set for the account
- Example: https://cp.hostnine.com/api/?module=modifyAccount&api_key=mygeneratedapikey
&domain=mydomainhere.com&newdomain=mynewdomainhere.com - Return: Show
changeAccountPassword
Change the password of an account's control panel within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- password (string) - password to set for the account control panel
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Example: https://cp.hostnine.com/api/?module=changeAccountPassword&api_key=mygeneratedapikey
&domain=mydomainhere.com&password=mynewaccountpassword - Return: Show
changeAccountPackage
Change the package currently set on an account setup within your Reseller Central. This module is equivilent to using the Upgrade/Downgrade Account feature within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Use one of the following:
- pack_id (int) - id of the package to set for the account
- package (string) - name of the package to set for the account
- Example: https://cp.hostnine.com/api/?module=changeAccountPackage&api_key=mygeneratedapikey
&domain=mydomainhere.com&package=MyGoldPackage - Return: Show
suspendAccount
Suspend an account's hosting service that is setup within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- reason (string) - the reason for the suspension
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Example: https://cp.hostnine.com/api/?module=suspendAccount&api_key=mygeneratedapikey
&domain=mydomainhere.com&reason=Suspended%20for%20nonpayment - Return: Show
unsuspendAccount
Unsuspend and restore an account's hosting service that is setup within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Example: https://cp.hostnine.com/api/?module=unsuspendAccount&api_key=mygeneratedapikey&domain=mydomainhere.com
- Return: Show
terminateAccount
Terminate and remove an account's hosting service that is setup within your Reseller Central.
- Required Parameters:
- api_key (string) - Reseller Central generated API Key
- Use one of the following:
- domain_id (int) - primary domain id of the account
- domain (string) - primary domain of the account
- Example: https://cp.hostnine.com/api/?module=terminateAccount&api_key=mygeneratedapikey&domain=mydomainhere.com
- Return: Show