Skip to content

HubSpot: Associations schemas

26 HubSpot schemas with complete fields and constraints.

← Associations operations · All schemas

Associate records (default) — response body

FieldTypePresenceDescription and constraints
$objectRootThe response returned after performing a batch operation on associations.
completedAtstringRequired within parentThe timestamp when the batch process was completed, in ISO 8601 format.
Format: date-time
errorsarrayOptionalAn array of errors that occurred during the batch operation, if any.
errors[]ModelEach itemExpand Remove associations — response body — errors item
linksobjectOptionalAn object containing relevant links related to the batch request.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the batch processing.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe timestamp when the batch process was initiated, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array of results from the batch operation, each representing a default association created between objects.
results[]ModelEach itemExpand Associate records (default) — response body — results item
startedAtstringRequired within parentThe timestamp when the batch process began execution, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe status of the batch processing request: "PENDING", "PROCESSING", "CANCELLED", or "COMPLETE".
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Remove associations — response body — errors item, Associate records (default) — response body — results item

Associate records (default) — response body — results item

FieldTypePresenceDescription and constraints
$objectRootThe PublicDefaultAssociation component represents the default association configuration between two objects in HubSpot. It is used to define how objects are related to each other within the platform.
associationSpecModelRequired within parentExpand Associate records (default) — response body — results item association Spec
fromModelRequired within parentExpand Associate records (default) — response body — results item to
toModelRequired within parentExpand Associate records (default) — response body — results item to

Referenced models: Associate records (default) — response body — results item to, Associate records (default) — response body — results item association Spec

Associate records (default) — response body — results item association Spec

FieldTypePresenceDescription and constraints
$objectRootDefines the type, direction, and details of the relationship between two CRM objects.
associationCategorystringRequired within parentThe category of the association, such as "HUBSPOT_DEFINED".
Known values: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK
associationTypeIdJSONRequired within parent
associationTypeId (anyOf 1)integerAlternativeThe ID representing the specific type of association.
Format: int32
associationTypeId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Associate records (default) — response body — results item to

FieldTypePresenceDescription and constraints
$objectRootContains the Id of a Public Object
idstringRequired within parentID of the object

Associate records (labelled) — associations update Association Labeled — request body — body item

FieldTypePresenceDescription and constraints
$objectRootDefines the type, direction, and details of the relationship between two CRM objects.
associationCategorystringRequired within parentThe category of the association, such as "HUBSPOT_DEFINED".
One of: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK
associationTypeIdintegerRequired within parentThe ID representing the specific type of association.
Format: int32

Associate records (labelled) — associations update Association Labeled — response body

FieldTypePresenceDescription and constraints
$objectRootThe relationship descriptors applicable between two object types.
fromObjectIdstringRequired within parentThe ID of the source object in the association.
fromObjectTypeIdstringRequired within parentThe type ID of the source object in the association.
labelsarrayRequired within parentAn array of labels associated with the relationship between the objects.
labels[]stringEach item
toObjectIdstringRequired within parentThe ID of the target object in the association.
toObjectTypeIdstringRequired within parentThe type ID of the target object in the association.

Associate records (labelled) — associations.batchCreateAssociationsLabeled — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Labels Between Object Pair

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe timestamp when the batch processing was completed, in ISO 8601 format.
Format: date-time
linksobjectOptionalAn object containing relevant links related to the batch request.
Additional keys: see wildcard field
links.*stringAdditional keys
requestedAtstringOptionalThe timestamp when the batch request was initially made, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array of results for the batch operation, each representing a set of labels between an object pair.
results[]ModelEach itemExpand Associate records (labelled) — associations update Association Labeled — response body
startedAtstringRequired within parentThe timestamp when the batch processing began, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe status of the batch processing request: "PENDING", "PROCESSING", "CANCELLED", or "COMPLETE".
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Associate records (labelled) — associations update Association Labeled — response body

Associate records (labelled) — associations.batchCreateAssociationsLabeled — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Labels Between Object Pair With Errors

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch operation was completed, in ISO 8601 format.
Format: date-time
errorsarrayOptionalAn array of errors encountered during the batch operation, each detailing the nature of the error.
errors[]ModelEach itemExpand Remove associations — response body — errors item
linksobjectOptionalA map of link names to associated URIs, providing additional resources or documentation related to the batch operation.
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 batch operation was requested, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array of results from the batch operation, each representing a label between an object pair.
results[]ModelEach itemExpand Associate records (labelled) — associations update Association Labeled — response body
startedAtstringRequired within parentThe date and time when the batch operation started, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Associate records (labelled) — associations update Association Labeled — response body, Remove associations — response body — errors item

Create Default Associations — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of PublicDefaultAssociationMultiPost objects, each specifying the details of the default association to be created between two objects. This property is required.
inputs[]ModelEach itemExpand Create Default Associations — request body — body inputs item

Referenced models: Create Default Associations — request body — body inputs item

Create Default Associations — request body — body inputs item

FieldTypePresenceDescription and constraints
$objectRoot
fromModelRequired within parentExpand Associate records (default) — response body — results item to
toModelRequired within parentExpand Associate records (default) — response body — results item to

Referenced models: Associate records (default) — response body — results item to

Delete Specific Labels — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of PublicAssociationMultiPost objects, each specifying the details of an association to be created. This includes the source and target objects and the types of associations to be applied.
inputs[]ModelEach itemExpand Delete Specific Labels — request body — body inputs item

Referenced models: Delete Specific Labels — request body — body inputs item

Delete Specific Labels — request body — body inputs item

FieldTypePresenceDescription and constraints
$objectRoot
fromModelRequired within parentExpand Associate records (default) — response body — results item to
toModelRequired within parentExpand Associate records (default) — response body — results item to
typesarrayRequired within parentAn array of AssociationSpec objects that define the types of associations to be created between the source and target objects.
types[]ModelEach itemExpand Associate records (labelled) — associations update Association Labeled — request body — body item

Referenced models: Associate records (labelled) — associations update Association Labeled — request body — body item, Associate records (default) — response body — results item to

Remove associations — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of PublicAssociationMultiArchive objects, each specifying the associations to be archived. This is a required field.
inputs[]ModelEach itemExpand Remove associations — request body — body inputs item

Referenced models: Remove associations — request body — body inputs item

Remove associations — request body — body inputs item

FieldTypePresenceDescription and constraints
$objectRoot
fromModelRequired within parentExpand Associate records (default) — response body — results item to
toarrayRequired within parentAn array of target objects to which the associations from the source object will be archived. Each target object is represented by a PublicObjectId.
to[]ModelEach itemExpand Associate records (default) — response body — results item to

Referenced models: Associate records (default) — response body — results item to

Remove associations — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch operation was completed, in ISO 8601 format.
Format: date-time
errorsarrayOptionalAn array of errors encountered during the batch operation. Each item is a StandardError object detailing the error.
errors[]ModelEach itemExpand Remove associations — response body — errors item
linksobjectOptionalAn object containing additional links related to the batch operation, where each key is a link name and the value is a URL.
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 batch operation was requested, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array containing the results of the batch operation. Each item is an object representing the outcome of an individual operation.
results[]objectEach item
startedAtstringRequired within parentThe date and time when the batch operation started, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Remove associations — response body — errors item

Remove associations — response body — errors item

FieldTypePresenceDescription and constraints
$objectRootRepresents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request.
categorystringRequired within parentThe main category of the error.
contextobjectRequired within parentAdditional context-specific information related to the error.
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
errorsarrayRequired within parentThe detailed error objects.
errors[]ModelEach itemExpand Batch insert events — response body — errors item errors item
idstringOptionalA unique ID for the error instance.
linksobjectRequired within parentURLs linking to documentation or resources associated with the error.
Additional keys: see wildcard field
links.*stringAdditional keys
messagestringRequired within parentA human-readable string describing the error and possible remediation steps.
statusstringRequired within parentThe HTTP status code associated with the error.
subCategoryobjectOptionalA more specific error category within each main category.

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

Report high usage — response body

FieldTypePresenceDescription and constraints
$objectRoot
enqueueTimeModelRequired within parentExpand Report high usage — response body — enqueue Time
userEmailstringRequired within parentEmail of the user
userIdJSONRequired within parent
userId (anyOf 1)integerAlternativeID of the user
Format: int32
userId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Report high usage — response body — enqueue Time

Report high usage — response body — enqueue Time

FieldTypePresenceDescription and constraints
$objectRoot
dateOnlybooleanRequired within parentIndicates whether the DateTime value represents only a date without a time component.
timeZoneShiftJSONRequired within parent
timeZoneShift (anyOf 1)integerAlternativeThe integer value representing the shift in minutes from UTC for the DateTime value.
Format: int32
timeZoneShift (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
valueJSONRequired within parent
value (anyOf 1)integerAlternativeThe integer value representing a specific point in time.
Format: int64
value (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Retrieve all associations by object type — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a paginated collection of objects that are associated with multiple labels, including the results and pagination details. This component is used when retrieving associated objects with specific labels in a forward-paging manner.
pagingModelOptionalExpand Get all tax rates — response body — paging
resultsarrayRequired within parentAn array of objects, each representing an association with multiple labels. Each object contains details about the association, including the associated object ID and the types of associations.
results[]ModelEach itemExpand Retrieve all associations by object type — response body — results item

Referenced models: Get all tax rates — response body — paging, Retrieve all associations by object type — response body — results item

Retrieve all associations by object type — response body — results item

FieldTypePresenceDescription and constraints
$objectRootRepresents an object that is associated with multiple other objects, with optional context.
associationTypesarrayRequired within parentAn array of association types with labels, defining the nature of the associations between objects. Each item in the array is an AssociationSpecWithLabel object.
associationTypes[]ModelEach itemExpand Retrieve all associations by object type — response body — results item association Types item
toObjectIdstringRequired within parentThe unique identifier for the target object in the association.

Referenced models: Retrieve all associations by object type — response body — results item association Types item

Retrieve all associations by object type — response body — results item association Types item

FieldTypePresenceDescription and constraints
$objectRootDefines the type, direction, and details of the relationship between two CRM objects.
categorystringRequired within parentThe category of the association, such as HUBSPOT_DEFINED, USER_DEFINED, or INTEGRATOR_DEFINED.
Known values: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK
fromObjectTypeIdstringOptionalA string representing the object type ID from which the association originates.
labelstringOptionalA label describing the association between two objects.
toObjectTypeIdstringOptionalA string representing the object type ID to which the association is directed.
typeIdJSONRequired within parent
typeId (anyOf 1)integerAlternativeThe unique identifier for the type of association.
Format: int32
typeId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Retrieve associations — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of PublicFetchAssociationsBatchRequest objects, each specifying the details for fetching associations for a particular object. This property is required.
inputs[]ModelEach itemExpand Retrieve associations — request body — body inputs item

Referenced models: Retrieve associations — request body — body inputs item

Retrieve associations — request body — body inputs item

FieldTypePresenceDescription and constraints
$objectRoot
afterstringOptionalA paging cursor token used to retrieve the next set of results in a paginated response.
idstringRequired within parentThe unique identifier for the object whose associations are being fetched.

Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

FieldTypePresenceDescription and constraints
$objectRoot
fromModelRequired within parentExpand Associate records (default) — response body — results item to
pagingModelOptionalExpand Return all draft tables — response body — paging
toarrayRequired within parentAn array of objects representing the target objects in the association. Each object includes the target object's ID and the types of associations, which are specified with labels.
to[]ModelEach itemExpand Retrieve all associations by object type — response body — results item

Referenced models: Return all draft tables — response body — paging, Associate records (default) — response body — results item to, Retrieve all associations by object type — response body — results item

Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Public Association Multi With Label

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe timestamp when the batch processing was completed, in ISO 8601 format.
Format: date-time
linksobjectOptionalAn object containing relevant links related to the batch request.
Additional keys: see wildcard field
links.*stringAdditional keys
requestedAtstringOptionalThe timestamp when the batch request was initially made, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array of results from the batch operation, each representing an association with labels between objects.
results[]ModelEach itemExpand Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
startedAtstringRequired within parentThe timestamp when the batch processing began, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe status of the batch processing request: "PENDING", "PROCESSING", "CANCELED", or "COMPLETE".
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item

Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Public Association Multi With Label With Errors

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch operation was completed, in ISO 8601 format.
Format: date-time
errorsarrayOptionalAn array of errors that occurred during the batch operation, with each error represented by a standard error object.
errors[]ModelEach itemExpand Remove associations — response body — errors item
linksobjectOptionalAn object containing additional links related to the batch operation, with each link represented as a string.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors that occurred during the batch operation, represented as an integer.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the batch operation was requested, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array of results from the batch operation, each item representing a public association with labels.
results[]ModelEach itemExpand Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
startedAtstringRequired within parentThe date and time when the batch operation started, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Remove associations — response body — errors item, Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING 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.