Creating legacy public apps and project-based apps is temporarily unavailable for new HubSpot accounts.
Learn more in our Trust Center.
curl --request PUT \
--url https://api.hubapi.com/email/public/v1/subscriptions/{email_address} \
--header 'Content-Type: application/json' \
--data '
{
"unsubscribeFromAll": true
}
'{
"status": "ok"
}Use this endpoint to update an email address’ email type subscription status or permanently unsubscribe an email address from all email. Note: If you OPT OUT of all emails or a specific email subscription type for a recipient, there is NO UNDO for this operation.
curl --request PUT \
--url https://api.hubapi.com/email/public/v1/subscriptions/{email_address} \
--header 'Content-Type: application/json' \
--data '
{
"unsubscribeFromAll": true
}
'{
"status": "ok"
}Scope requirements
The email address for which you are updating subscription status.
Subscription update details
Whether to unsubscribe from all emails
Show child attributes
Legal basis for portal-level subscription
LEGITIMATE_INTEREST_PQL, LEGITIMATE_INTEREST_CLIENT, PERFORMANCE_OF_CONTRACT, CONSENT_WITH_NOTICE, NON_GDPR Explanation for portal-level legal basis
Email subscription status updated successfully
Status of the update operation
Was this page helpful?