Zum Hauptinhalt springen
PUT
/
crm
/
objects
/
2025-09
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
Erstellen
curl --request PUT \
  --url https://api.hubapi.com/crm/objects/2025-09/{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
objectType
string
erforderlich
toObjectId
string
erforderlich
toObjectType
string
erforderlich

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

createdResourceId
string
erforderlich

Die eindeutige ID der neu erstellten Ressource.

entity
object
erforderlich
location
string

Der URL-Ort der neu erstellten Ressource.

Last modified on December 9, 2025