HubSpot API Overview

Welcome to the HubSpot API.

The API is built to allow you to create a functional application or integration quickly and easily. We know from experience - these are the APIs that power the HubSpot application. The ecosystem of developers creating integrations on top of the APIs is strong and diverse, ranging from webinar providers to CRMs to social media.

All of the HubSpot APIs are organized around REST - if you've interacted with a RESTful API already, many of the concepts will be familiar to you. All API calls to HubSpot should be made to the https://api.hubapi.com base domain. We use many standard HTTP features, like HTTP verbs, which can be understood by many HTTP clients. JSON will be returned in all responses, including errors. The APIs are designed to have predictable, straightforward URLs and to use HTTP response codes to indicate API errors.

Getting listed on our App Marketplace

If you're considering an integration with HubSpot for commercial use - i.e. installation by mutual customers - you can learn how to get listed here.

Rate limits and accounts

HubSpot's APIs are subject to rate limiting. These limits are applied per account for custom integrations using API keys or per app per account for integrations using OAuth. You can see the specific limits detailed in our full API guidelines.

Each HubSpot account will have access to different APIs based on the products and product levels it has. You can see a detailed breakdown for which APIs are supported for each product level on our APIs by Product Tier page.

Authentication

The HubSpot APIs allow for two types of authentication, OAuth and API keys. See our Authentication Overview for more details about authenticating requests.

API keys are great for rapid prototyping, but for security and commercial use, all integrations should strive to use OAuth.

Testing

Note: The demo API key can only be used to make GET requests. Other requests methods will return an error. Please create a test account for any further testing.

The first thing you'll want to do is create a developer account, where you can create and manage test accounts or create an application and get started with OAuth.

Most documentation pages will have example URLs that can be used to quickly check the data returned by the endpoint, using public demo data. Once you're ready to start testing, you should create a test account. They have access to Enterprise versions of the HubSpot Marketing, Sales, and Service Hubs, allowing you to test most of the HubSpot APIs and tools.

If you ever have questions, check out our developer forum or to leave us some feedback using the Submit Feedback button throughout the site.

Client Libraries

To make working with HubSpot's APIs easier, the community and HubSpot have created and maintained client libraries to handle a lot of the basic calls you might use. Below is a list of the ones HubSpot knows about and who supports them.

Library Language Supported by
HubSpot/hubspot-php PHP HubSpot
adimichele/hubspot-ruby Ruby Community
MadKudu/node-hubspot Node.js Community
jpetrucciani/hubspot3 Python Community
hubspot-net/HubSpot.NET C# .NET Community

In addition there are also example apps available in Node.js, PHP, and Ruby to help see how to use some of these libraries in your app.