APIs & Integrations


How can I use the CRM Import API to create associations with labels?

Does anyone know if there is a way to use the CRM import API to import a CSV that contains associations and labels?


I know that you can have a spreadsheet with two columns, both containing the internal hubspot ID of a records (ie a contact & a custom object), but I haven’t been able to figure out how to add a third column that specifies the labels for that association.


Specifically, I'm not sure what the column should be named or how to build the columnMappings for the importRequest JSON object to describe that column, since it seems to always want a columnObjectTypeId and the label kinda describes both objects and doesn't really have a dedicated object it describes?

1 Reply 1
Community Manager
Community Manager

How can I use the CRM Import API to create associations with labels?

Hi, @Brody 👋 I run into the same limitations you are seeing. Namely, that the documentation doesn't show this an option via the Imports API. We can do this in-app, and I notice in the documentation, it mentions accessing and setting associations after you've done your import via the API. 

CleanShot 2023-03-20 at 12.30.12.png


In my experience, there isn't an underlying “why” that is public about the difference between in-app and endpoints. Only what's documented.


I hope this helps get you moving forward. This is likely not the answer you wanted, and I don't want you to be stuck seeking an option that doesn't exist.





Jaycee Lewis

Developer Community Manager

Community | HubSpot