Hello,
I’m trying to set up associations between a custom object and various contact records, but I’m getting an error when entering the name of the association (Enter a unique internal name value). The UI shows one association…
…I’m trying to add two more (Booking Host and Booking Makr) to match our sandbox account…
…but whenever I try to add the booking_host or booking_makr associations, it tells me they already exist. They aren’t visible in the UI and throw errors when trying to associate items with the API.
Is there anywhere else I can look to delete those association types? Thanks.
Hey, @JustACodeMonkey! Welcome to the community
This may be worth filing a support ticket, but let’s try something first. Worst case, we end up with additional information you can include in your support ticket 
To clarify, this association is set up from your custom object to the Contacts object? If so, here are our next steps:
-
we can use the v4 Associations API to return all association labels between two objects. Specifically, this endpointGET /crm/v4/associations/{fromObjectType}/{toObjectType}/labels
Accounts Dashboard | HubSpot
-
The from objectId will be your custom object ID (you can get at this ID from your browser (see screenshot) For example, the ID of my test custom object is 2-7913954 and the ID for Contacts is always 0-1
-
This will return the labels for your object
-
Here’s my request:
curl --request GET \
--url https://api.hubapi.com/crm/v4/associations/2-7913954/0-1/labels \
--header 'authorization: Bearer MY_PRIVATE_APP'
-
Here’s the response:
HTTP 200
{
"results": [
{
"category": "USER_DEFINED",
"typeId": 15,
"label": null
},
{
"category": "USER_DEFINED",
"typeId": 17,
"label": "tacos"
}
]
}
-
This should reveal all association labels created between two objects
Please don’t hesitate to share your endpoint results here. Or if you get stuck trying to use the endpoint, I am happy to help there too.
Best,
Jaycee
Thanks for the reply @Jaycee_Lewis.
The endpoint to fetch all of the association was returning all of the ones I expected, but the HubSpot UI wasn’t displaying any them. In each case the label was null (like the 1st in your example). I tried using the API to update the association to change the null label value to an actual label. That failed with an error saying “Can not update unlabeled type with associationTypeId: 30”.
So, … I blew away all references to the custom object and re-created it from scratch. I made the object schema with the API and created the associations on the HubSpot website. So, the Dev sandbox is OK for that object now.
The issue I’m left with is that the production objects have similar issues. Null labels that can’t be updated in the UI because they don’t appear in the UI and can’t be updated with the API because it throws the error saying null values can’t be updated.