Passer au contenu principal
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

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

objectId
string
requis
objectType
string
requis
toObjectId
string
requis
toObjectType
string
requis

Corps

application/json
associationCategory
enum<string>
requis

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

Options disponibles:
HUBSPOT_DEFINED,
INTEGRATOR_DEFINED,
USER_DEFINED,
WORK
associationTypeId
integer<int32>
requis

The ID representing the specific type of association.

Réponse

successful operation

The relationship descriptors applicable between two object types.

fromObjectId
string
requis

The ID of the source object in the association.

fromObjectTypeId
string
requis

The type ID of the source object in the association.

labels
string[]
requis

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

toObjectId
string
requis

The ID of the target object in the association.

toObjectTypeId
string
requis

The type ID of the target object in the association.

Last modified on April 2, 2026