Passer au contenu principal
POST
/
crm-object-schemas
/
v3
/
schemas
/
{objectType}
/
associations
Créer une association pour un type d'objet spécifié.
curl --request POST \
  --url https://api.hubapi.com/crm-object-schemas/v3/schemas/{objectType}/associations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromObjectTypeId": "2-123456",
  "name": "my_object_to_contact",
  "toObjectTypeId": "contact"
}
'
{
  "fromObjectTypeId": "2-123456",
  "id": "105",
  "name": "my_object_to_contact",
  "toObjectTypeId": "0-1"
}
Produits pris en charge
Exige l'un des produits suivants ou un produit supérieur.
Marketing HubMarketing HubEntreprise
Sales HubSales HubEntreprise
Service HubService HubEntreprise
Content HubContent HubEntreprise

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

objectType
string
requis

Nom complet ou identifiant de type d'objet de votre schéma.

Corps

application/json

Attributes that define the association.

Defines an association between two object types.

fromObjectTypeId
string
requis

ID du type d'objet principal depuis lequel lier.

toObjectTypeId
string
requis

ID du type d'objet cible ID vers lequel lier.

name
string

Un nom unique pour cet objet. Pour un usage interne uniquement.

Réponse

successful operation

La définition d'une association

fromObjectTypeId
string
requis

ID du type d'objet principal depuis lequel lier.

id
string
requis

Un identifiant unique pour ce type d'objet. Sera défini comme {meta-type}-{unique ID}.

toObjectTypeId
string
requis

ID du type d'objet cible ID vers lequel lier.

createdAt
string<date-time>

Lorsque le type d'objet a été créé.

name
string

Un nom unique pour cet objet. Pour un usage interne uniquement.

updatedAt
string<date-time>

Lors de la dernière mise à jour du type d'objet.

Last modified on January 23, 2026