There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

What is the SMTP API?

The SMTP API is used when sending transactional email through HubSpot. Please note that in order to use this API, you must purchase Transactional Email as an add-on, which includes use of a unique, dedicated IP address.   

Transactional email sent using the SMTP API is automated email that is triggered by specific criteria, such as making a purchase on an e-commerce website. The SMTP API is used to integrate with any internal or third-party systems to both trigger the email and incorporate data stored outside of HubSpot (e.g. shipping data, purchase price, etc). The email is sent from your system, but is wrapped with the HubSpot tracking codes that allow full engagement tracking and measurement, so you can see the performance within HubSpot. Tracking is associated to contact records based on email address.

Using the SMTP API

In order to send emails using the SMTP API, you will need to make use of SMTP API tokens. The three methods outlined in this documentation all deal with these tokens and have counterparts in the Transactional Email UI, which can be used to obtain the same information. Here we will take a look at which parts of the UI correspond to these methods.

1. List SMTP API Tokens

  • GET a list of the tokens you have generated using this method, or 
  • Go to your settings > Marketing > Email, then select the SMTP tab

2. Generate SMTP API Tokens 

  • Generate tokens through an endpoint as outlined in this method, or
  • Generate tokens through the Transactional Email UI within the Email tool: 
    • Go to your settings > Marketing > Email, then select the SMTP tab.
    • Click the Generate token button, and enter a name for the token.
    • Be sure to record the password for the token, as you will not be able to retrieve it later, only reset it.

 list_tokens

name_token

token_name_pass

 3. Reset Password

  • Reset using endpoint as outlined in this method, or
  • Click on the Actions button for the token you'd like to reset the password for, and select "Reset Password"

 token_actions_menu

Docs for this section or API