Create Company creates dupicates


#1

Hi,
When I use the create companies api it will allow me to create duplicate entries.
I am specifying the domain name in the data.
Is there anything I can do to avoid duplicates ?
Cheers
Dave


#2

Hi,

To avoid duplicates, you must specify the domain name in the data.


#3

As above that is what I am doing.


#4

I am specifying the domain in the data but still get duplicate entries,


#5

A domain check alone would not function correctly. Consider where you deal with a company who has multiple branches but a single domain.


#6

@david.pearce if you’re trying to update an existing company, you’ll need to use the separate update endpoint:

As you mentioned domain won’t be required to be unique in the same way that email would be for contacts, and we don’t have a single endpoint that would allow you to either update or create a company, so if you’re updating a company you’d need to store the companyId of the existing HubSpot record and then use the update endpoint.