Skip to content
Integrations

Access your HubSpot API key

Last updated: November 9, 2021

Applies to:

All products and plans

With the HubSpot API key, your developers can create custom applications with HubSpot’s APIs. Each key is specific to a HubSpot account, not an individual user, and only one key is allowed at a time.

Please note: if you plan on creating multiple apps or you want more granular control over your app's scopes, you can create a private app instead of using a single API key across all your apps. Each private app has its own access token, which is implemented on top of OAuth. Learn more about private apps in HubSpot's developer documentation.

Access your API key

You must have Super Admin permissions to access your account's API key. 

  • In your HubSpot account, click the settings settings icon in the main navigation bar.
  • In the left sidebar menu, navigate to Integrations > API key.
    • If a key has never been generated for your account, click Generate API key.
    • If you've already generated an API key, click Show to display your key.

show-API-key

  • With the key displayed, click Copy to copy the key. You can then paste the key to provide it to your developers or use it in your applications.

Rotate your API key

Providing your  API key to a developer will give them full access to make changes to your account through HubSpot's API, including reading logged emails from connected email accounts and other third-party data.

For added security, consider rotating your HubSpot API key every six months. Rotating your HubSpot API key will deactivate the existing API key and generate a new one. HubSpot will display the age of the API key and recommend when you should rotate your API key.

Reminders to rotate the API key will be sent to Super Admins and users who last created or rotated the API key in the following frequencies and notification types:

  • When the API key turns five months old, email notifications are sent.
  • When the API key turns six months old, sidebar notifications are sent.
  • When the API key has not been rotated in six months, both email and sidebar notifications will be sent every six months.

While this may create downtime and require effort, it adds a layer of security by preventing malicious applications from accessing your HubSpot information with your existing API key.

To rotate your HubSpot API key:

  • In your HubSpot account, click the settings icon in the main navigation bar.
  • In the left sidebar menu, navigate to Integrations > API key.
  • Click the Actions dropdown menu, then select Rotate key.
  •  Click Rotate and expire this key now. Select the reCAPTCHA checkbox. Your existing key will be deactivated and a new API key will be created.
  •  Click Copy and replace the deactivated API key used by your applications with this new API key.

API calls using the deactivated HubSpot API key will now fail and any application using the key will no longer be able to access your information. 

Rotating your API key will not affect your connection with the Salesforce integration. However if you have a custom integration installed, you will need to update your API key after you rotate it.

Please note: Connected apps installed through the App Marketplace will not be affected when you rotate your API key.

Deactivate your API key

Deactivating your API key will not create a new key. API calls using the deactivated HubSpot API key will fail and any application using the key will no longer be able to access your information.

To deactivate your API key:
  • In your HubSpot account, click the settings settings icon in the main navigation bar.
  • In the left sidebar menu, navigate to Integrations API key.
  • Click the Actions dropdown menu.
  • Click Deactivate key and click Deactivate this key now. Select the reCAPTCHA checkbox. 

View your API audit log

You can view a dated log of users who’ve viewed, created, or deactivated your account’s API key in the Audit log section. 

  • In your HubSpot account, click the settings settings icon in the main navigation bar.
  • In the left sidebar menu, navigate to Integrations > API key.
  • Click the Audit log tab.
  • api-audit-log

View your API key call log

To help you debug one of your integrations or to ensure you’re complying with HubSpot’s API usage guidelines, you can view a log of your API key calls for the previous 7 days. 

  • In your HubSpot account, click the settings settings icon in the main navigation bar.
  • In the left sidebar menu, navigate to Integrations > API key.
  • In the Call log tab, view all activity for the past 7 days.
call-log-api