Skip to main content
PUT
/
crm
/
v4
/
objects
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
Create
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>"
}

Supported products

Requires one of the following products or higher.
Marketing HubMarketing Hub -Free
Sales HubSales Hub -Free
Service HubService Hub -Free
Content HubContent Hub -Free
Data HubData Hub -Free

Authorizations

Authorization
string
header
required

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

Path Parameters

objectId
string
required

The unique identifier for the source object in the association to be created.

objectType
string
required

Specifies the type of the source object in the association to be created.

toObjectId
string
required

The unique identifier for the target object in the association to be created.

toObjectType
string
required

Specifies the type of the target object in the association to be created.

Body

application/json
associationCategory
enum<string>
required

The category of the association, such as "HUBSPOT_DEFINED".

Available options:
HUBSPOT_DEFINED,
INTEGRATOR_DEFINED,
USER_DEFINED
associationTypeId
integer<int32>
required

The ID representing the specific type of association.

Response

successful operation

createdResourceId
string
required

The unique identifier of the newly created resource.

entity
object
required
location
string

The URL location of the newly created resource.

Last modified on December 16, 2025