There's a new version of the HubSpot API
As of November 30, 2022, HubSpot API Keys are being deprecated and are no longer supported. Continued use of HubSpot API Keys is a security risk to your account and data. Your API Keys could be deactivated at any time after Nov. 30th, and we recommend that you migrate to Private Apps as soon as possible so you do not lose business-critical functionality.
Our APIs are in the midst of a transition. As part of our effort to improve API consistency and completeness, we launched the next generation of HubSpot’s API in early 2020. However, not every endpoint or API has been updated to the latest version, and our older endpoints are still stable and supported.
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.
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.
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.
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.
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.
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.
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.
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.