Create company with an existing name via api

Hi all!

I’m trying, via API, to create a company that has the same name as an existing one (as i can do through the browser).

I POST to /api/companies/new with only one param (companyname)

instead of creating a second company with the existing name, it updates and returns the existing one…

Is it the expected behavior ? If it is, how can i achieve the creation of a company with a name that already exists ?

Thank you !

Hi, are you using the “Primary Company” of the contact in your call?

No i am not using the “primary company”.

The field companyname is actually a default primary key for companies, and the post request “deduplicates” using the primary key. The primary key can be changed via “custom fields”, and that did the trick for me.

Thanks for you help i’m closing the thread

make sure this move doesn’t have an affect on pairing contacts to companies.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.