メインコンテンツへスキップ
PUT
/
crm
/
v4
/
objects
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
作成
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>"
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -無料ツール

認証

Authorization
string
header
必須

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

パスパラメータ

objectId
string
必須

作成する関連付けのソースオブジェクトの固有ID。

objectType
string
必須

作成する関連付けのソースオブジェクトのタイプを指定します。

toObjectId
string
必須

作成する関連付けのターゲットオブジェクトの固有ID。

toObjectType
string
必須

作成する関連付けのターゲットオブジェクトのタイプを指定します。

ボディ

application/json
associationCategory
enum<string>
必須

「HUBSPOT_DEFINED」など、関連付けのカテゴリー。

利用可能なオプション:
HUBSPOT_DEFINED,
INTEGRATOR_DEFINED,
USER_DEFINED
associationTypeId
integer<int32>
必須

特定のタイプの関連付けを表すID。

レスポンス

successful operation

createdResourceId
string
必須

新しく作成されたリソースの固有ID。

entity
object
必須
location
string

新しく作成されたリソースのURLの場所。

Last modified on December 9, 2025