HubSpot: Associations schemas
26 HubSpot schemas with complete fields and constraints.
← Associations operations · All schemas
Associate records (default) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The response returned after performing a batch operation on associations. |
completedAt | string | Required within parent | The timestamp when the batch process was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of errors that occurred during the batch operation, if any. |
errors[] | Model | Each item | Expand Remove associations — response body — errors item |
links | object | Optional | An object containing relevant links related to the batch request. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors encountered during the batch processing. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The timestamp when the batch process was initiated, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of results from the batch operation, each representing a default association created between objects. |
results[] | Model | Each item | Expand Associate records (default) — response body — results item |
startedAt | string | Required within parent | The timestamp when the batch process began execution, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The 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. |
associationSpec | Model | Required within parent | Expand Associate records (default) — response body — results item association Spec |
from | Model | Required within parent | Expand Associate records (default) — response body — results item to |
to | Model | Required within parent | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines the type, direction, and details of the relationship between two CRM objects. |
associationCategory | string | Required within parent | The category of the association, such as "HUBSPOT_DEFINED". Known values: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK |
associationTypeId | JSON | Required within parent | |
associationTypeId (anyOf 1) | integer | Alternative | The ID representing the specific type of association. Format: int32 |
associationTypeId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Associate records (default) — response body — results item to
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Contains the Id of a Public Object |
id | string | Required within parent | ID of the object |
Associate records (labelled) — associations update Association Labeled — request body — body item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines the type, direction, and details of the relationship between two CRM objects. |
associationCategory | string | Required within parent | The category of the association, such as "HUBSPOT_DEFINED". One of: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK |
associationTypeId | integer | Required within parent | The ID representing the specific type of association. Format: int32 |
Associate records (labelled) — associations update Association Labeled — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The relationship descriptors applicable between two object types. |
fromObjectId | string | Required within parent | The ID of the source object in the association. |
fromObjectTypeId | string | Required within parent | The type ID of the source object in the association. |
labels | array | Required within parent | An array of labels associated with the relationship between the objects. |
labels[] | string | Each item | |
toObjectId | string | Required within parent | The ID of the target object in the association. |
toObjectTypeId | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The timestamp when the batch processing was completed, in ISO 8601 format. Format: date-time |
links | object | Optional | An object containing relevant links related to the batch request. Additional keys: see wildcard field |
links.* | string | Additional keys | |
requestedAt | string | Optional | The timestamp when the batch request was initially made, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of results for the batch operation, each representing a set of labels between an object pair. |
results[] | Model | Each item | Expand Associate records (labelled) — associations update Association Labeled — response body |
startedAt | string | Required within parent | The timestamp when the batch processing began, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The date and time when the batch operation was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of errors encountered during the batch operation, each detailing the nature of the error. |
errors[] | Model | Each item | Expand Remove associations — response body — errors item |
links | object | Optional | A map of link names to associated URIs, providing additional resources or documentation related to the batch operation. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors encountered during the batch operation. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The date and time when the batch operation was requested, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of results from the batch operation, each representing a label between an object pair. |
results[] | Model | Each item | Expand Associate records (labelled) — associations update Association Labeled — response body |
startedAt | string | Required within parent | The date and time when the batch operation started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | An array of PublicDefaultAssociationMultiPost objects, each specifying the details of the default association to be created between two objects. This property is required. |
inputs[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
from | Model | Required within parent | Expand Associate records (default) — response body — results item to |
to | Model | Required within parent | Expand Associate records (default) — response body — results item to |
Referenced models: Associate records (default) — response body — results item to
Delete Specific Labels — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | An 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[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
from | Model | Required within parent | Expand Associate records (default) — response body — results item to |
to | Model | Required within parent | Expand Associate records (default) — response body — results item to |
types | array | Required within parent | An array of AssociationSpec objects that define the types of associations to be created between the source and target objects. |
types[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | An array of PublicAssociationMultiArchive objects, each specifying the associations to be archived. This is a required field. |
inputs[] | Model | Each item | Expand Remove associations — request body — body inputs item |
Referenced models: Remove associations — request body — body inputs item
Remove associations — request body — body inputs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
from | Model | Required within parent | Expand Associate records (default) — response body — results item to |
to | array | Required within parent | An array of target objects to which the associations from the source object will be archived. Each target object is represented by a PublicObjectId. |
to[] | Model | Each item | Expand Associate records (default) — response body — results item to |
Referenced models: Associate records (default) — response body — results item to
Remove associations — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The date and time when the batch operation was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of errors encountered during the batch operation. Each item is a StandardError object detailing the error. |
errors[] | Model | Each item | Expand Remove associations — response body — errors item |
links | object | Optional | An 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.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors encountered during the batch operation. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The date and time when the batch operation was requested, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array containing the results of the batch operation. Each item is an object representing the outcome of an individual operation. |
results[] | object | Each item | |
startedAt | string | Required within parent | The date and time when the batch operation started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request. |
category | string | Required within parent | The main category of the error. |
context | object | Required within parent | Additional context-specific information related to the error. Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
errors | array | Required within parent | The detailed error objects. |
errors[] | Model | Each item | Expand Batch insert events — response body — errors item errors item |
id | string | Optional | A unique ID for the error instance. |
links | object | Required within parent | URLs linking to documentation or resources associated with the error. Additional keys: see wildcard field |
links.* | string | Additional keys | |
message | string | Required within parent | A human-readable string describing the error and possible remediation steps. |
status | string | Required within parent | The HTTP status code associated with the error. |
subCategory | object | Optional | A more specific error category within each main category. |
Referenced models: Batch insert events — response body — errors item errors item
Report high usage — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
enqueueTime | Model | Required within parent | Expand Report high usage — response body — enqueue Time |
userEmail | string | Required within parent | Email of the user |
userId | JSON | Required within parent | |
userId (anyOf 1) | integer | Alternative | ID of the user Format: int32 |
userId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Report high usage — response body — enqueue Time
Report high usage — response body — enqueue Time
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
dateOnly | boolean | Required within parent | Indicates whether the DateTime value represents only a date without a time component. |
timeZoneShift | JSON | Required within parent | |
timeZoneShift (anyOf 1) | integer | Alternative | The integer value representing the shift in minutes from UTC for the DateTime value. Format: int32 |
timeZoneShift (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
value | JSON | Required within parent | |
value (anyOf 1) | integer | Alternative | The integer value representing a specific point in time. Format: int64 |
value (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Retrieve all associations by object type — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents 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. |
paging | Model | Optional | Expand Get all tax rates — response body — paging |
results | array | Required within parent | An 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[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an object that is associated with multiple other objects, with optional context. |
associationTypes | array | Required within parent | An array of association types with labels, defining the nature of the associations between objects. Each item in the array is an AssociationSpecWithLabel object. |
associationTypes[] | Model | Each item | Expand Retrieve all associations by object type — response body — results item association Types item |
toObjectId | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines the type, direction, and details of the relationship between two CRM objects. |
category | string | Required within parent | The category of the association, such as HUBSPOT_DEFINED, USER_DEFINED, or INTEGRATOR_DEFINED. Known values: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK |
fromObjectTypeId | string | Optional | A string representing the object type ID from which the association originates. |
label | string | Optional | A label describing the association between two objects. |
toObjectTypeId | string | Optional | A string representing the object type ID to which the association is directed. |
typeId | JSON | Required within parent | |
typeId (anyOf 1) | integer | Alternative | The unique identifier for the type of association. Format: int32 |
typeId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Retrieve associations — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | An array of PublicFetchAssociationsBatchRequest objects, each specifying the details for fetching associations for a particular object. This property is required. |
inputs[] | Model | Each item | Expand Retrieve associations — request body — body inputs item |
Referenced models: Retrieve associations — request body — body inputs item
Retrieve associations — request body — body inputs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
after | string | Optional | A paging cursor token used to retrieve the next set of results in a paginated response. |
id | string | Required within parent | The unique identifier for the object whose associations are being fetched. |
Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
from | Model | Required within parent | Expand Associate records (default) — response body — results item to |
paging | Model | Optional | Expand Return all draft tables — response body — paging |
to | array | Required within parent | An 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[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The timestamp when the batch processing was completed, in ISO 8601 format. Format: date-time |
links | object | Optional | An object containing relevant links related to the batch request. Additional keys: see wildcard field |
links.* | string | Additional keys | |
requestedAt | string | Optional | The timestamp when the batch request was initially made, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of results from the batch operation, each representing an association with labels between objects. |
results[] | Model | Each item | Expand Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item |
startedAt | string | Required within parent | The timestamp when the batch processing began, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The date and time when the batch operation was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of errors that occurred during the batch operation, with each error represented by a standard error object. |
errors[] | Model | Each item | Expand Remove associations — response body — errors item |
links | object | Optional | An object containing additional links related to the batch operation, with each link represented as a string. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors that occurred during the batch operation, represented as an integer. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The date and time when the batch operation was requested, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of results from the batch operation, each item representing a public association with labels. |
results[] | Model | Each item | Expand Retrieve associations — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING results item |
startedAt | string | Required within parent | The date and time when the batch operation started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The 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