Passer au contenu principal
POST
/
communication-preferences
/
v3
/
subscribe
Subscribe a contact
curl --request POST \
  --url https://api.hubapi.com/communication-preferences/v3/subscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "emailAddress": "<string>",
  "subscriptionId": "<string>",
  "legalBasis": "CONSENT_WITH_NOTICE",
  "legalBasisExplanation": "<string>"
}
'
{
  "description": "<string>",
  "id": "<string>",
  "name": "<string>",
  "sourceOfStatus": "BRAND_WIDE_STATUS",
  "status": "NOT_SUBSCRIBED",
  "brandId": 123,
  "legalBasis": "CONSENT_WITH_NOTICE",
  "legalBasisExplanation": "<string>",
  "preferenceGroupName": "<string>"
}

Supported products

Autorisations

Authorization
string
header
requis

The access token received from the authorization server in the OAuth 2.0 flow.

Corps

application/json
emailAddress
string
requis

Contact's email address.

subscriptionId
string
requis

ID of the subscription being updated for the contact.

Legal basis for updating the contact's status (required for GDPR enabled portals).

Options disponibles:
CONSENT_WITH_NOTICE,
LEGITIMATE_INTEREST_CLIENT,
LEGITIMATE_INTEREST_OTHER,
LEGITIMATE_INTEREST_PQL,
NON_GDPR,
PERFORMANCE_OF_CONTRACT,
PROCESS_AND_STORE

A more detailed explanation to go with the legal basis (required for GDPR enabled portals).

Réponse

successful operation

description
string
requis

A description of the subscription.

id
string
requis

The ID for the subscription.

name
string
requis

The name of the subscription.

sourceOfStatus
enum<string>
requis

Where the status is determined from e.g. PORTAL_WIDE_STATUS if the contact opted out from the portal.

Options disponibles:
BRAND_WIDE_STATUS,
PORTAL_WIDE_STATUS,
SUBSCRIPTION_STATUS
status
enum<string>
requis

Whether the contact is subscribed.

Options disponibles:
NOT_SUBSCRIBED,
SUBSCRIBED
brandId
integer<int64>

The ID of the brand that the subscription is associated with, if there is one.

The legal reason for the current status of the subscription.

Options disponibles:
CONSENT_WITH_NOTICE,
LEGITIMATE_INTEREST_CLIENT,
LEGITIMATE_INTEREST_OTHER,
LEGITIMATE_INTEREST_PQL,
NON_GDPR,
PERFORMANCE_OF_CONTRACT,
PROCESS_AND_STORE

A more detailed explanation to go with the legal basis.

preferenceGroupName
string

The name of the preferences group that the subscription is associated with.

Last modified on April 2, 2026