Zum Hauptinhalt springen
PUT
/
crm
/
v4
/
objects
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
Erstellen
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>"
}

Unterstützte Produkte

Erfordert eines der folgenden Produkte oder höher.
Marketing HubMarketing Hub -Kostenlos
Sales HubSales Hub -Kostenlos
Service HubService Hub -Kostenlos
Content HubContent Hub -Kostenlos

Autorisierungen

Authorization
string
header
erforderlich

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

Pfadparameter

objectId
string
erforderlich

Die eindeutige ID für das Quellobjekt in der zu erstellenden Zuordnung.

objectType
string
erforderlich

Gibt den Typ des Quellobjekts in der zu erstellenden Zuordnung an.

toObjectId
string
erforderlich

Die eindeutige ID für das Zielobjekt in der zu erstellenden Zuordnung.

toObjectType
string
erforderlich

Gibt den Typ des Zielobjekts in der zu erstellenden Zuordnung an.

Body

application/json
associationCategory
enum<string>
erforderlich

Die Kategorie der Zurodnung, z. B. „HUBSPOT_DEFINED“.

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

Die ID, die den spezifischen Typ der Zuordnung darstellt.

Antwort

successful operation

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

createdResourceId
string
erforderlich

Die eindeutige ID der neu erstellten Ressource.

entity
object
erforderlich

The relationship descriptors applicable between two object types.

location
string

Der URL-Ort der neu erstellten Ressource.

Last modified on December 9, 2025