Hello @GFrewin
To get the email addresses of contacts associated with a company using the HubSpot API, you need to use an additional endpoint to fetch the contact properties. Here’s an example URL that will return a list of companies with their associated contacts and their email addresses:
https://api.hubapi.com/crm/v3/objects/companies?includeAssociations=true&associations=contacts&properties=name&properties=lifecyclestage&properties=associatedcompanyid&properties=email&limit=100
I’ve added the following parameters:
includeAssociations=truetells the API to include associations in the responseassociations=contactstells the API to include contacts associated with the companies in the responseproperties=associatedcompanyidtells the API to include the company ID on each contact recordproperties=emailtells the API to include the email property on each contact record
Note that we’ve also added a limit parameter to limit the number of results to 100. You can adjust this parameter to get more or fewer results per page.
When you make this API call, you should receive a JSON response containing an array of companies with their associated contacts and their email addresses. You can then parse the response to extract the data you need.
Thanks & Regards
Himanshu Rauthan