There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API Keys are being deprecated and are no longer supported. Continued use of HubSpot API Keys is a security risk to your account and data. Your API Keys could be deactivated at any time after Nov. 30th, and we recommend that you migrate to Private Apps as soon as possible so you do not lose business-critical functionality.

Associate Engagement with CRM object

Last updated June 17, 2020

PUT /engagements/v1/engagements/:engagementId/associations/:objectType/:objectId

This endpoint is deprecated. Please use the new CRM Associations API to view and manage associated engagements.

Method Details

HTTP Methods:

PUT

Content Type:

application/json

Response Format:

N/A

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

crm.objects.companies.write
crm.objects.contacts.write
crm.objects.deals.write
tickets
e-commerce

Associate an engagement with a contact, company, or deal.

Note: You only need to use this endpoint when updating existing engagement records. If you are creating new engagements, you can make these associations when creating the record by including the associations data as documented on the create engagement page.

Required Parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
Used to authenticate the request. Please see this page for more details about authentication.
Engagement ID Used in the request URL (see above) The ID of the engagement to be associated. The id will be included in the response when creating an engagement with the API.
Object Type Used in the request URL (see above) One of contact, company, or deal, depending on the object you want the engagement associated with.
Object ID Used in the request URL (see above) The ID of the object you want to associate with the engagement. This will be the vid for a contact, companyId for a company, or dealId for a deal.
Optional Parameters How to use Description
None None No additional parameters for this endpoint.

If request is successful you'll receive a 204 response.

Returns a 404 response if either the engagement or the CRM object is not found.