Export Contact-based List with Company properties via API

I have a Contact-based List created in HubSpot.

I’m able to export this list via API by sending the following payload to `/crm/v3/exports/export/async`:

{
 "exportType": "LIST",
 "listId": 14,
 "exportName": "Customer List",
 "format": "csv",
 "language": "EN",
 "objectType": "CONTACT",
 "objectProperties": [
 "hs_object_id",
 "firstname",
 "lastname",
 "email",
 "hs_persona",
 "implementation_role",
 "company"
 ]
}

When I add “data_product” and “segment_id” into the export payload I get the following response from the HubSpot server:

Please fix or remove these properties as they are not a part of the object: data_product, segment_id

When trying to export the list from the HubSpot website, I have the option to add columns Data Product and Segment ID and it works just fine.

However, when trying to EDIT the list I do NOT have that option. Why is that? Is there a way to include Data Product and Segment ID into the list “by default?” I think this has something to do with “mapping” company properties to contacts, but even after reviewing Accounts Dashboard | HubSpot I still don’t know how to do that.

Q: How do I export a Contact-based List including some Company properties?

Please help!

Hi @JZajic,

To the best of my knowledge the Exports API doesn’t support what you are trying to do.

What it can do is provide some of the default properties of the object associated with a contact providing you include “associatedObjectType” in your request which represents the name or ID of the associated object to include in the export. Those properties include:

  • Associated Company Name
  • Associated Company Record ID

The alternative solution to this is to consider using the CRM Object APIs to extract contact and company information and generate a CSV/XLSX programmatically with the raw data. Not ideal but it’s what is technically possible given the current endpoints offered by HubSpot.

Best of luck with the project regardless and hope this is in some way helpful!