APIs & Integrations

Abhishek619
Member

Contacts Associated with Custom Objects

SOLVE

Hello!  I am working on a project for a client on Custom Objects in HubSpot. I have created a custom object named 'Builds' and I have associated some contacts to it. My goal is to get a list of associated contacts through API. How can i achieve it? And,if there is any other method too, I am happy to hear anyone's thoughts on this, Thank you.

0 Upvotes
1 Accepted solution
weiliang_lee
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Contacts Associated with Custom Objects

SOLVE

Hi there, you could use the Association endpoint like so:

{{baseUrl}}/crm/v3/objects/:objectType/:objectId?associations=contacts

 

Your objectType and objectId can be easily found in the URI when you navigate to a corresponding "Build" custom object via HubSpot. 

 

For example: https://app-eu1.hubspot.com/contacts/9999999/record/2-88888888/77777777

The objectType string would be the fragment 2-88888888 and the objectId would be 77777777

 

Hope this helps!

 

Cheers

WL

View solution in original post

1 Reply 1
weiliang_lee
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Contacts Associated with Custom Objects

SOLVE

Hi there, you could use the Association endpoint like so:

{{baseUrl}}/crm/v3/objects/:objectType/:objectId?associations=contacts

 

Your objectType and objectId can be easily found in the URI when you navigate to a corresponding "Build" custom object via HubSpot. 

 

For example: https://app-eu1.hubspot.com/contacts/9999999/record/2-88888888/77777777

The objectType string would be the fragment 2-88888888 and the objectId would be 77777777

 

Hope this helps!

 

Cheers

WL