Welcome to the Reseller Central JSON API
The JSON API allows you to issue commands to Reseller Central in a familar URL type request scheme that returns JSON data.
You must generate an API Key in your Reseller Central's Account Settings page under the Account Management tab. If you already have an API Key generated it is not neccessary to create a new one, doing so will invalidate your current API Key.
Formatting the Request URL
Every call to the JSON API is made using a specially formatted URL as detailed below:
- Every request starts with: http (or) https://cp.hostnine.com/api/
- Specify the module you wish to use: ?module=getLocations
- Authenticate with your API Key: &api_key=mygeneratedapikey
- Additional and Optional Parameters: &domain=mydomainhere.com&username=myuser
A complete call to the API will resemble one of the following depending on if the call requires Authentication, Additional, and/or Optional Parameters:
- https://cp.hostnine.com/api/?module=getLocations
- https://cp.hostnine.com/api/?module=getPackages&api_key=mygeneratedapikey
Available Modules
Below is an overview of the modules available for usage through the JSON API. You may request additional modules be added to the API by opening a ticket to [email protected]
My Account
- viewMyAccount - Retrieve your account details.
- getMessages - Retrieve a list of messages within your account.
- viewMessage - View an individual message within your account.
- getNewsPosts - Retrieve a list of news posts.
- viewNewsPost - View an individual news post.
Accounts
- getAccounts - Retrieve a list of your accounts.
- createAccount - Setup a new account.
- viewAccount - View an account's details.
- modifyAccount - Modify hosting options of an account.
- changeAccountPassword - Change the password of an account.
- changeAccountPackage - Change the package of an account.
- suspendAccount - Suspend an account's hosting service.
- unsuspendAccount - Unsuspend an account's hosting service.
- terminateAccount - Remove an account's hosting service.
Locations
- getLocations - Retrieve a list of the available locations.
- getNetworkStatus - View the status and availbility of locations.
Packages
- getPackages - Retrieve a list of your available packages.
Migrations
- getMigrations - Retrieve a list of your past and pending migrations.
- addMigration - Add a new account migration to the queue.
Scripts & Tools
- fixPermissions - Fix the permissions of an account.
- checkFirewallBan - Check for an IP blocked by the firewall.
- removeFirewallBan - Remove an IP blocked by the firewall.
Ready to use Software
Below you will find software that is already designed to use the Reseller Central API.
- WHMCS - Fully-featured billing and client administration software
Code Examples
We offer the following sample code to help you integrate the Reseller Central API into your own application.
- PHP - General purpose scripting language especially suited for Web development.
If you would like to submit an update or sample code for a different language please let us know by opening a ticket to [email protected]