Skip to content

HubSpot: Communication preferences schemas

23 HubSpot schemas with complete fields and constraints.

← Communication preferences operations · All schemas

Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

FieldTypePresenceDescription and constraints
$objectRoot
subscriberIdStringstringRequired within parentThe contact's email address.
wideStatusesarrayRequired within parentAn array containing the wide status results for the operation.
wideStatuses[]ModelEach itemExpand Retrieve a contact's unsubscribed status — response body — results item

Referenced models: Retrieve a contact's unsubscribed status — response body — results item

Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Public Wide Status Bulk Response

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch process was completed.
Format: date-time
linksobjectOptionalA collection of related links associated with the batch response.
Additional keys: see wildcard field
links.*stringAdditional keys
requestedAtstringOptionalThe date and time when the batch request was made.
Format: date-time
resultsarrayRequired within parentThe array of results from the batch process, each containing subscription status information.
results[]ModelEach itemExpand Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
startedAtstringRequired within parentThe date and time when the batch process began.
Format: date-time
statusstringRequired within parentThe current status of the batch process, with possible values: PENDING, PROCESSING, CANCELED, COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Public Wide Status Bulk Response With Errors

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the operation was completed.
Format: date-time
errorsarrayOptionalAn array of error objects detailing any issues encountered during the operation.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalAn object containing related links, where each key is a link name and each value is a URL.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the operation was requested.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the operation.
results[]ModelEach itemExpand Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
startedAtstringRequired within parentThe date and time when the operation started.
Format: date-time
statusstringRequired within parentThe current status of the operation, which can be PENDING, PROCESSING, CANCELED, or COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Batch retrieve contacts who have opted out of all communications — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

Batch retrieve subscription statuses — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentA list of strings representing the inputs for batch operations.
inputs[]stringEach item

Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

FieldTypePresenceDescription and constraints
$objectRoot
statusesarrayRequired within parentAn array of subscription status objects for the contact.
statuses[]ModelEach itemExpand Batch update subscription status — response body — results item
subscriberIdStringstringRequired within parentThe email address of the contact.

Referenced models: Batch update subscription status — response body — results item

Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Public Status Bulk Response

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch process was completed.
Format: date-time
linksobjectOptionalA collection of related links associated with the batch response.
Additional keys: see wildcard field
links.*stringAdditional keys
requestedAtstringOptionalThe date and time when the batch request was made.
Format: date-time
resultsarrayRequired within parentThe array of results from the batch process, each containing subscription status information.
results[]ModelEach itemExpand Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
startedAtstringRequired within parentThe date and time when the batch process began.
Format: date-time
statusstringRequired within parentThe current status of the batch process, with possible values: PENDING, PROCESSING, CANCELED, COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Public Status Bulk Response With Errors

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the operation was completed.
Format: date-time
errorsarrayOptionalAn array of error objects detailing any issues encountered during the operation.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalAn object containing related links, where each key is a link name and each value is a URL.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the request was made.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the operation.
results[]ModelEach itemExpand Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
startedAtstringRequired within parentThe date and time when the operation started.
Format: date-time
statusstringRequired within parentThe current status of the operation, which can be PENDING, PROCESSING, CANCELED, or COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Batch retrieve subscription statuses — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

Batch unsubscribe contacts from all subscriptions — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the bulk opt-out operation was completed.
Format: date-time
errorsarrayOptionalAn array of error objects detailing any issues encountered during the bulk opt-out operation.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalA collection of URLs linking to related resources or documentation.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe total number of errors encountered during the bulk opt-out operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the bulk opt-out request was made.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the bulk opt-out from all communications operation.
results[]ModelEach itemExpand Batch unsubscribe contacts from all subscriptions — response body — results item
startedAtstringRequired within parentThe date and time when the bulk opt-out operation began.
Format: date-time
statusstringRequired within parentThe current status of the bulk opt-out operation, which can be PENDING, PROCESSING, CANCELED, or COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Batch unsubscribe contacts from all subscriptions — response body — results item

Batch unsubscribe contacts from all subscriptions — response body — results item

FieldTypePresenceDescription and constraints
$objectRoot
statusesarrayOptionalAn array of subscription status objects for the contact.
statuses[]ModelEach itemExpand Batch update subscription status — response body — results item
subscriberIdStringstringRequired within parentThe email address of the contact.

Referenced models: Batch update subscription status — response body — results item

Batch update subscription status — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of PublicStatusRequest objects, each representing a subscription status update request. This property is required.
inputs[]ModelEach itemExpand Batch update subscription status — request body — body inputs item

Referenced models: Batch update subscription status — request body — body inputs item

Batch update subscription status — request body — body inputs item

FieldTypePresenceDescription and constraints
$objectRoot
channelstringRequired within parentThe type of communication channel. Currently, only `EMAIL` is supported.
One of: EMAIL
legalBasisstringOptionalThe legal basis for communication.
One of: CONSENT_WITH_NOTICE, LEGITIMATE_INTEREST_CLIENT, LEGITIMATE_INTEREST_OTHER, LEGITIMATE_INTEREST_PQL, NON_GDPR, PERFORMANCE_OF_CONTRACT, PROCESS_AND_STORE
legalBasisExplanationstringOptionalThe explanation for the legal basis.
statusStatestringRequired within parentThe status of the contact's subscription.
One of: NOT_SPECIFIED, SUBSCRIBED, UNSUBSCRIBED
subscriberIdStringstringRequired within parentThe contact's email address.
subscriptionIdintegerRequired within parentThe ID of the subscription to update.
Format: int64

Batch update subscription status — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch operation was completed.
Format: date-time
errorsarrayOptionalAn array of error objects detailing any issues encountered.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalURLs linking to related resources or documentation.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the batch operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the request was made.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the batch operation.
results[]ModelEach itemExpand Batch update subscription status — response body — results item
startedAtstringRequired within parentThe date and time when the batch operation started.
Format: date-time
statusstringRequired within parentThe current status of the batch operation, which can be PENDING, PROCESSING, CANCELED, or COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Batch update subscription status — response body — results item

Batch update subscription status — response body — errors item

FieldTypePresenceDescription and constraints
$objectRootYe olde error
categorystringRequired within parentA string that categorizes the type of error.
contextobjectRequired within parentAn object containing additional context about the error condition, with keys as context names and values as arrays of strings.
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
errorsarrayRequired within parentAn array of ErrorDetail objects providing further information about the error.
errors[]ModelEach itemExpand Batch insert events — response body — errors item errors item
idstringOptionalA string representing the unique identifier of the error.
linksobjectRequired within parentAn object mapping link names to associated URIs that contain documentation about the error or recommended remediation steps.
Additional keys: see wildcard field
links.*stringAdditional keys
messagestringRequired within parentA string containing a human-readable message describing the error.
statusstringRequired within parentA string indicating the status of the error.
subCategoryobjectOptionalAn object providing more specific categorization of the error.

Referenced models: Batch insert events — response body — errors item errors item

Batch update subscription status — response body — results item

FieldTypePresenceDescription and constraints
$objectRoot
businessUnitIdJSONOptional
businessUnitId (anyOf 1)integerAlternativeThe ID of the business unit associated with the subscription.
Format: int64
businessUnitId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
channelstringRequired within parentThe type of communication channel, with 'EMAIL' as the only supported option.
Known values: EMAIL
legalBasisstringOptionalThe legal basis for communication, with options including 'LEGITIMATE_INTEREST_PQL', 'LEGITIMATE_INTEREST_CLIENT', 'PERFORMANCE_OF_CONTRACT', 'CONSENT_WITH_NOTICE', 'NON_GDPR', 'PROCESS_AND_STORE', and 'LEGITIMATE_INTEREST_OTHER'.
Known values: CONSENT_WITH_NOTICE, LEGITIMATE_INTEREST_CLIENT, LEGITIMATE_INTEREST_OTHER, LEGITIMATE_INTEREST_PQL, NON_GDPR, PERFORMANCE_OF_CONTRACT, PROCESS_AND_STORE
legalBasisExplanationstringOptionalAn explanation for the legal basis used for communication.
setStatusSuccessReasonstringOptionalThe reason for the successful change in subscription status, such as 'RESUBSCRIBE_OCCURRED' or 'NO_STATUS_CHANGE'.
Known values: NO_STATUS_CHANGE, REQUESTED_CHANGE_OCCURRED, RESUBSCRIBE_OCCURRED, UNSUBSCRIBE_FROM_ALL_OCCURRED
sourcestringRequired within parentThe origin or method through which the subscription status was set.
statusstringRequired within parentThe current subscription status of the contact, which can be 'SUBSCRIBED', 'UNSUBSCRIBED', or 'NOT_SPECIFIED'.
Known values: NOT_SPECIFIED, SUBSCRIBED, UNSUBSCRIBED
subscriberIdStringstringRequired within parentThe contact's email address.
subscriptionIdJSONRequired within parent
subscriptionId (anyOf 1)integerAlternativeThe unique identifier of the subscription.
Format: int64
subscriptionId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subscriptionNamestringOptionalThe name of the subscription.
timestampstringRequired within parentThe date and time when the subscription status was last updated.
Format: date-time

Generate subscription links — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
languagestringOptionalThe language in which the generated link should be presented, represented as a string.
subscriberIdStringstringRequired within parentA string representing the unique identifier of the subscriber. This property is required.
subscriptionIdintegerOptionalThe unique identifier for the subscription, represented as an integer in int64 format.
Format: int64

Generate subscription links — response body

FieldTypePresenceDescription and constraints
$objectRoot
managePreferencesUrlstringRequired within parentThe URL where the subscriber can manage their communication preferences.
subscriberIdStringstringRequired within parentA string representing the unique identifier of the subscriber.
unsubscribeAllUrlstringRequired within parentA string containing the URL for unsubscribing the subscriber from all communications.
unsubscribeSingleUrlstringOptionalA string containing the URL to unsubscribe the subscriber from a single communication.

Retrieve a contact's unsubscribed status — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the operation was completed.
Format: date-time
errorsarrayOptionalAn array of error objects detailing any issues encountered during the operation.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalAn object containing related links, where each key is a link name and each value is a URL.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the request was made.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the operation.
results[]ModelEach itemExpand Retrieve a contact's unsubscribed status — response body — results item
startedAtstringRequired within parentThe date and time when the operation started.
Format: date-time
statusstringRequired within parentThe current status of the operation, which can be PENDING, PROCESSING, CANCELED, or COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Retrieve a contact's unsubscribed status — response body — results item

Retrieve a contact's unsubscribed status — response body — results item

FieldTypePresenceDescription and constraints
$objectRoot
businessUnitIdJSONOptional
businessUnitId (anyOf 1)integerAlternativeThe ID of the business unit associated with the status.
Format: int64
businessUnitId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
channelstringRequired within parentThe type of communication channel, with 'EMAIL' as the only supported option.
Known values: EMAIL
statusstringRequired within parentThe subscription status of the contact, which can be 'SUBSCRIBED', 'UNSUBSCRIBED', or 'NOT_SPECIFIED'.
Known values: NOT_SPECIFIED, SUBSCRIBED, UNSUBSCRIBED
subscriberIdStringstringRequired within parentThe email address of the contact.
timestampstringRequired within parentThe date and time when the status was recorded.
Format: date-time
wideStatusTypestringRequired within parentThe type of wide status, which can be 'PORTAL_WIDE' or 'BUSINESS_UNIT_WIDE'.
Known values: BUSINESS_UNIT_WIDE, PORTAL_WIDE

Retrieve all subscription status definitions — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the operation was completed.
Format: date-time
errorsarrayOptionalAn array of errors that occurred during the operation.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalA collection of related links associated with the operation.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the operation was requested.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the operation.
results[]ModelEach itemExpand Retrieve all subscription status definitions — response body — results item
startedAtstringRequired within parentThe date and time when the operation started.
Format: date-time
statusstringRequired within parentThe current status of the operation, which can be PENDING, PROCESSING, CANCELED, or COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Retrieve all subscription status definitions — response body — results item

Retrieve all subscription status definitions — response body — results item

FieldTypePresenceDescription and constraints
$objectRoot
businessUnitIdJSONOptional
businessUnitId (anyOf 1)integerAlternativeThe ID of the business unit associated with the subscription.
Format: int64
businessUnitId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
communicationMethodstringOptionalThe method of communication for the subscription.
createdAtstringRequired within parentThe date and time when the subscription was created.
Format: date-time
descriptionstringRequired within parentA description of the subscription.
idstringRequired within parentThe unique identifier for the subscription.
isActivebooleanRequired within parentIndicates whether the subscription is active.
isDefaultbooleanRequired within parentIndicates whether the subscription is the default option.
isInternalbooleanRequired within parentIndicates whether the subscription is internal.
namestringRequired within parentThe name of the subscription.
purposestringOptionalThe purpose of the subscription.
subscriptionTranslationsarrayOptionalA list of translations associated with the subscription.
subscriptionTranslations[]ModelEach itemExpand Retrieve all subscription status definitions — response body — results item subscription Translations item
updatedAtstringRequired within parentThe date and time when the subscription was last updated.
Format: date-time

Referenced models: Retrieve all subscription status definitions — response body — results item subscription Translations item

Retrieve all subscription status definitions — response body — results item subscription Translations item

FieldTypePresenceDescription and constraints
$objectRoot
createdAtJSONRequired within parent
createdAt (anyOf 1)integerAlternativeThe timestamp indicating when the subscription translation was created.
Format: int64
createdAt (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
descriptionstringRequired within parentA text description of the subscription translation.
languageCodestringRequired within parentThe code representing the language of the subscription translation.
namestringRequired within parentThe name of the subscription translation.
subscriptionIdJSONRequired within parent
subscriptionId (anyOf 1)integerAlternativeThe unique identifier for the subscription associated with the translation.
Format: int64
subscriptionId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
updatedAtJSONRequired within parent
updatedAt (anyOf 1)integerAlternativeThe timestamp indicating when the subscription translation was last updated.
Format: int64
updatedAt (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Update a contact's subscription status — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
channelstringRequired within parentThe type of communication channel, with 'EMAIL' as the only supported option.
One of: EMAIL
legalBasisstringOptionalThe legal basis for communication, with options including 'LEGITIMATE_INTEREST_PQL', 'LEGITIMATE_INTEREST_CLIENT', 'PERFORMANCE_OF_CONTRACT', 'CONSENT_WITH_NOTICE', 'NON_GDPR', 'PROCESS_AND_STORE', and 'LEGITIMATE_INTEREST_OTHER'.
One of: CONSENT_WITH_NOTICE, LEGITIMATE_INTEREST_CLIENT, LEGITIMATE_INTEREST_OTHER, LEGITIMATE_INTEREST_PQL, NON_GDPR, PERFORMANCE_OF_CONTRACT, PROCESS_AND_STORE
legalBasisExplanationstringOptionalAn explanation for the legal basis used for communication.
statusStatestringRequired within parentThe current subscription status of the contact, which can be 'SUBSCRIBED', 'UNSUBSCRIBED', or 'NOT_SPECIFIED'.
One of: NOT_SPECIFIED, SUBSCRIBED, UNSUBSCRIBED
subscriptionIdintegerRequired within parentThe unique identifier of the subscription to be updated.
Format: int64

Update a contact's subscription status — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the operation was completed.
Format: date-time
errorsarrayOptionalA list of errors that occurred during the operation.
errors[]ModelEach itemExpand Batch update subscription status — response body — errors item
linksobjectOptionalContains URLs related to the response, such as documentation or resources.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors that occurred during the operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the request was made.
Format: date-time
resultsarrayRequired within parentAn array of results from the operation.
results[]ModelEach itemExpand Batch update subscription status — response body — results item
startedAtstringRequired within parentThe date and time when the operation started.
Format: date-time
statusstringRequired within parentIndicates the current status of the operation, with possible values: PENDING, PROCESSING, CANCELED, COMPLETE.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Batch update subscription status — response body — errors item, Batch update subscription status — response body — results item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.