Get ALL contacts by company id

I am using this endpoint:

https://api.hubapi.com/crm/v3/objects/companies/companyid/associations/contacts

But it only returns primary contacts for the company not ALL contacts.

There are several instances where there are additional contacts that are not “primary” or even just one contact for the company but it is not set as “primary”.

What is the best way to get ALL CONTACTS for a company by company id regardless of primary/non-primary or label?

@VBossio - using the v4 API call, you should be able to find all possible associations listed by type I think.

https://api.hubapi.com/crm/v4/objects///associations/?limit=500

Steve

That url results in a “Sorry, you have been blocked” message regardless of which environment I try it in (ie. which bearer token I use)

Hmm. Did you fill out the missing elements of the URL per the endpoint documentation? Accounts Dashboard | HubSpot

It requires Object types and an source Object ID at least.

Also check scopes required - the detail of the error messsge on the private app log should help.

Steve