Zum Hauptinhalt springen
PUT
/
crm
/
objects
/
2026-03
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
Associate records (labelled)
curl --request PUT \
  --url https://api.hubapi.com/crm/objects/2026-03/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 123
  }
]
'
{
  "fromObjectId": "<string>",
  "fromObjectTypeId": "<string>",
  "labels": [
    "<string>"
  ],
  "toObjectId": "<string>",
  "toObjectTypeId": "<string>"
}

Supported products

Autorisierungen

Authorization
string
header
erforderlich

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

Pfadparameter

objectId
string
erforderlich
objectType
string
erforderlich
toObjectId
string
erforderlich
toObjectType
string
erforderlich

Body

application/json
associationCategory
enum<string>
erforderlich

The category of the association, such as "HUBSPOT_DEFINED".

Verfügbare Optionen:
HUBSPOT_DEFINED,
INTEGRATOR_DEFINED,
USER_DEFINED,
WORK
associationTypeId
integer<int32>
erforderlich

The ID representing the specific type of association.

Antwort

successful operation

The relationship descriptors applicable between two object types.

fromObjectId
string
erforderlich

The ID of the source object in the association.

fromObjectTypeId
string
erforderlich

The type ID of the source object in the association.

labels
string[]
erforderlich

An array of labels associated with the relationship between the objects.

toObjectId
string
erforderlich

The ID of the target object in the association.

toObjectTypeId
string
erforderlich

The type ID of the target object in the association.

Last modified on April 9, 2026