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.

Update email subscription status for an email address

Last updated June 17, 2020

PUT /email/public/v1/subscriptions/:email_address

Method Details

HTTP Methods:


Content Type:


Response Format:


Requires Authentication?


Rate Limited?






Required Scope:


Use this endpoint to update an email address' email type subscription status or permanently unsubscribe an email address from all email.

Use case for this endpoint: The endpoint is useful if a system collects opt-out information outside of HubSpot, but needs to prevent future mailings to those contacts inside of HubSpot.

Status updates and contact records

The subscription status is tied to the email address, and not a specific contact record. Because of this, it is possible to update the status for an email address even if there is not currently a contact with that email address. If the status is updated for an email address that isn't currently associated with a contact and a contact is later created, the status update will apply to the new contact. The same would be true if there was an existing contact was deleted and a new contact with the same email address was created.

Note: If you OPT OUT of all emails or a specific email subscription type for a recipient, there is NO UNDO for this operation.

Required parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
Used to authenticate the request. Please see this page for more details about authentication.
Email address :email_address - Used in the request URL The email address for which you are updating subscription status.
JSON body See examples Describe whether you want to unsubscribe the email address from all emails or some subset of them. If you want to record the legal basis for GDPR, you can select from "LEGITIMATE_INTEREST_PQL", "LEGITIMATE_INTEREST_CLIENT", "PERFORMANCE_OF_CONTRACT", "CONSENT_WITH_NOTICE", or "NON_GDPR". The explanation is free-form text noting any specific consent information you wish to record.
optState Used in the JSON body Determines whether a contact is opted in or out of a given email subscription. The possible values are "OPT_IN", "OPT_OUT", and "NOT_OPTED"

These code samples use a demo API key. Using this key for anything but GET requests will result in an error. For all other requests (such as POST or PUT), you'll need to use your own API key or OAuth. For more details, please see here