Create Company creates dupicates


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 ?



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


As above that is what I am doing.


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


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


@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.