There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Get associations for a CRM object

Last updated May 12, 2023

GET /crm-associations/v1/associations/:objectId/HUBSPOT_DEFINED/:definitionId

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

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

Use this endpoint to get the IDs of CRM objects associated with a given object, based on the specified association type. Check out the table on the CRM Associations Overview for a full list of IDs.

Use cases for this endpoint: To get the ticket IDs for all tickets associated with a specific contact record, the objectId would be the contact vid, and the definitionId would be 15.

To get all companies associated with a specific ticket record, the objectId would be the objectId of the ticket, and the definitionId would be 26.

Required parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
Object ID /:objectId
Used in the request URL
The ID of the object that you want to get the associations for.
Association type /:definitionId
Used in the request URL
The ID of the type of associations you want. See  the table on the overview page for a list of these IDs.
Association category /HUBSPOT_DEFINED The category of the association HubSpot defines between objects.

Optional parameters How to use Description
Limit &limit=
Used in the request URL
The number of associations to return in a single response. Defaults to 10 if the parameter is not included, supports a maximum value of 100.
Offset &offset=
Used in the request URL
Used to page through the results. Each response will include an offset, which can be used to get the next set of results in the next request.