HubSpot API Wrapper

Usage no npm install needed!

<script type="module">
  import hubspotApi from '';


Build Status (Release)

Hubspot Client API

A client wrapper for the HubSpot API at


npm install --save hubspot-api


Full documentation available at


const HubSpotClient = require('hubspot-api');
const hs = new HubSpotClient({ hapikey });
// or const hs = new HubSpotClient({ accessToken });
// or const hs = new HubSpotClient(); # for public methods, eg. Forms, HubDB

async function getContact(id){
  const contact = await hs.contacts.getById(827398123);
  return contact

// Or using traditional thenable Promises.
hs.contacts.getById(827398123).then(contact => {

Entities available

  • Blogs
  • Blog posts
  • Blog authors
  • Blog topics
  • Contacts
  • Contacts Properties (partial implementation)
  • Companies
  • Calendar
  • Deals (partial implementation)
  • Domains
  • Email Events (partial implementation)
  • Engagements (partial implementation)
  • Forms (partial implementation)
  • HubDB (partial implementation)
  • Layouts
  • Page Publishing
  • Social (partial implementation)
  • Workflows

Please check out the full documentation available at


At the moment of writing the HubSpot APIs do not support CORS / AJAX requests due to security reasons, so you must use this library only on a Node.js server.

Authors and Contributors

Currently maintained by the lovely folks on HubSpot's Web Team, but we need your help. Please feel free to submit pull requests to add new functionality.

How to Contribute

Contributions are welcome. Please refer to the contributing guidelines