
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
npm install h9
h9.js - Node.js Wrapper for the HostNine API
This wrapper attemps to normalize the HostNine API that is provided to Resellers. The following coding practices are employed to make this API as flexible as possible.
package_id, the package name with package or automatically lookup the package with packcreateAccount method.Each callback returns data with the following practices:
success attribute is always persistant on all requestsresult attribute is persistant on most requests. This is passed through based on the API resultsdata attributeaccounts.message attrible useful for user friendly errors. var h9 = require('h9')('API-KEY-GOES-HERE');
// list all active accounts
h9.getAccounts({status:1},function(err, results){
if(err){
console.error(err)
}else{
if(results.success){
console.log('Accounts:', results.accounts);
}else{
console.log('Failed to list accounts:', results.result);
}
}
});
// create new account (note this normally takes several seconds to complete) https://cp.hostnine.com/api/docs/accounts.html#createAccount
h9.createAccount({
domain: 'exampledomain.com',
username: 'username',
password: 'ChangeThisPassword',
location: '(US) Central)',
pack_id: 'PackageName',
contact: 'example@email.com'
},function(err,results){
if(results.success){
console.log('Account Created');
}else{
console.error('Failed to create account with error: '+results.result);
}
});
// view account https://cp.hostnine.com/api/docs/accounts.html#viewAccount
h9.viewAccount('exampledomain.com',function(err,results){
if(results.success){
console.log('Account Created');
}else{
console.error('Failed to create account with error: '+results.result);
}
});
// edit account https://cp.hostnine.com/api/docs/accounts.html#modifyAccount
h9.modifyAccount('exampledomain.com',{
quota: 1024*50
},function(err,results){
if(results.success){
console.log('Account Created');
}else{
console.error('Failed to create account with error: '+results.result);
}
});
// fix permissions https://cp.hostnine.com/api/docs/scriptstools.html#fixPermissions
h9.fixPermissions('exampledomain.com',function(err,results){
if(results.success){
console.log('Account permissions fixed');
}else{
console.error('Failed to fix communications with error: '+results.result);
}
});
If you need documentation on what the methods or data points are, I would recommend matching the methods here with the API Docs
callback - Object
err - Error Objectresults - Object
successmessagesdata - (optional) Object
page - (optional) Integer of current pageperPage - (optional) Integer of number results per pagecallback - Object
err - Error Objectresults - Object
successresultsmessagesmessageId - Integercallback - Object
err - Error Objectresults - Object
successresultsdatalimit - (optional) Integercallback - Object
err - Error Objectresults - Object
successresultspostspostID - Integercallback - Object
err - Error Objectresults - Object
successresultsdatafilters - (optional) Object
search - (optional) Stringstatus - (optional) Integerpack_id - (optional) Integercallback - Object
err - Error Objectresults - Object
successresultsdatameta
filtersfiltersstrsortsortstraccountsdata - Object
domain - Stringusername - *String*password - *String*location - *String*pack - *String* OR *Integer*contact - (optional) Stringskeleton - (optional) Stringcallback - Object
err - Error Objectresults - Object
successresultsdomain - String OR Integercallback - Object
err - Error Objectresults - Object
successresultsdatadomain - String OR Integerdata - Object
domain - (optional) Stringusername - *(optional) String*password - *(optional) String*location - *(optional) String*pack - *(optional) String* OR *Integer*quota - *(optional) Integer*bandwidth - *(optional) Integer*theme - *(optional) String*ns1 - *(optional) String*nss - *(optional) String*callback - Object
err - Error Objectresults - Object
successresultsdomain - String OR Integerpassword - Stringcallback - Object
err - Error Objectresults - Object
successresultsdomain - String OR Integerpackage - String OR Integercallback - Object
err - Error Objectresults - Object
successresultsdomain - String OR Integerreason - Stringcallback - Object
err - Error Objectresults - Object
successresultsdomain - String OR Integercallback - Object
err - Error Objectresults - Object
successresultsdomain - String OR Integercallback - Object
err - Error Objectresults - Object
successresultscallback - Object
err - Error Objectresults - Object
successlocationscallback - Object
err - Error Objectresults - Object
successlocationscallback - Object
err - Error Objectresults - Object
successpackagescallback - Object
err - Error Objectresults - Object
successmigrationsdomain - String OR Integerlocation - String OR Integercallback - Object
err - Error Objectresults - Object
successresultdomain - String OR Integercallback - Object
err - Error Objectresults - Object
successresultip - Stringdomain - String OR Integercallback - Object
err - Error Objectresults - Object
successresultip - Stringdomain - String OR Integercallback - Object
err - Error Objectresults - Object
successresultFAQs
node.js wrapper for Hostnine Reseller API
The npm package h9 receives a total of 11 weekly downloads. As such, h9 popularity was classified as not popular.
We found that h9 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.