cURL
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>" }
Set association labels between two records.
Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
The category of the association, such as "HUBSPOT_DEFINED".
HUBSPOT_DEFINED
INTEGRATOR_DEFINED
USER_DEFINED
The ID representing the specific type of association.
successful operation
The unique identifier of the newly created resource.
Show child attributes
The URL location of the newly created resource.
Was this page helpful?