Saltar al contenido principal
PUT
/
crm
/
v4
/
objects
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
Crear
curl --request PUT \
  --url https://api.hubapi.com/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 123
  }
]
'
{
  "createdResourceId": "<string>",
  "entity": {
    "fromObjectId": "<string>",
    "fromObjectTypeId": "<string>",
    "labels": [
      "<string>"
    ],
    "toObjectId": "<string>",
    "toObjectTypeId": "<string>"
  },
  "location": "<string>"
}

Productos compatibles

Se requiere uno de los siguientes productos o productos de ediciones superiores.
Marketing HubMarketing Hub -Gratuito
Sales HubSales Hub -Gratuito
Service HubService Hub -Gratuito
Content HubContent Hub -Gratuito

Autorizaciones

Authorization
string
header
requerido

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

Parámetros de ruta

objectId
string
requerido

El identificador único para el objeto de origen en la asociación que se creará.

objectType
string
requerido

Especifica el tipo del objeto de origen en la asociación que se creará.

toObjectId
string
requerido

El identificador único para el objeto de destino en la asociación que se creará.

toObjectType
string
requerido

Especifica el tipo del objeto de destino en la asociación que se creará.

Cuerpo

application/json
associationCategory
enum<string>
requerido

La categoría de la asociación, por ejemplo, "HUBSPOT_DEFINED"

Opciones disponibles:
HUBSPOT_DEFINED,
INTEGRATOR_DEFINED,
USER_DEFINED
associationTypeId
integer<int32>
requerido

El ID que representa el tipo de asociación específica.

Respuesta

successful operation

Contains the details of the labels that were created to define associations between a specific pair of objects.

createdResourceId
string
requerido

El identificador único del recurso recién creado.

entity
object
requerido

The relationship descriptors applicable between two object types.

location
string

La ubicación de la URL del recurso recién creado.

Last modified on December 9, 2025