I am using Create a Company (https://developers.hubspot.com/docs/methods/companies/create_company ) api to Crete new copmany. I have created unique id for Comany. Every time when when i sending same unique id value, creating new comany records each and every time.
Hi @tanmay
Would you be able to provide more clarification around this custom Unique ID you’re using? It’s worth noting that HubSpot only works using pre-defined unique ID’s.
In this case, the unique ID used for Companies will be the Company Domain or, if you have it, the Company ID.
I hope this helps!
I just wanted to confirm, through api if I submit the same request morethan one, it should throgh an error like already exist.
Hi, @tanmay.
Happy to clarify.
The Companies API currently does not deduplicate records.
If you send repeated requests to the Create a company endpoint with the same data, it will create duplicate companies and will not return any errors.
Once you successfully create a company and capture the companyId HubSpot assigns, you can use it as the key in the Update a company endpoint when updating that company going forward.
If that is the case, is there any way (any Api) can I check the company alreadu exist or not before create new company. If company already exist need the company id as a resopnse.
Regards,
Tanmay
Hi, @tanmay.
Yes, you can search for company records by domain with this endpoint.
If that’s not specific enough, the next best bet is the CRM Search API I mention in this other post of yours.