Contacts API: "batch create or update" with merged contacts




We’re using the POST /contacts/v1/contact/batch/ endpoint for thousands of contacts to sync our customers database with Hubspot. The association between our database and Hubspot is based on the email (as the documentation states: “Each set of property data must include either an email address or a vid”)

However, in case of merged contacts in Hubspot, we have some conflicts.

We push a value for a custom field to -> it updates the contact with the following id: 961965
We push a different value for the same field to -> this is the associated contact: 961963 -> but because the contact is merged, it updates the same contact: 961965

So depending on which updates is made first, we could have at the end a wrong value for our contact

Is there a way (parameter) so that the batch create or update API endpoint does not update merged contacts? (In our example, it does not follow the link 961963 -> 961965.)

Our portal id: 2123903




Hi @jereze

When two contact records are merged, both of the original vids and email addresses get associated with the resulting merged contact, so any updates for either email address or vid will update the resulting merged record.

What would you want to happen in these cases? Are there still two separate records in your external system? If that’s the case, why would the records be merged in HubSpot but still separate in your system?


Thank you for your answer.

Yes, there are two separate records on the external system.
Sometimes we cannot merge them for various reasons.

So the only workaround I see: make calls in advance to check if the contacts were merged in Hubspot, and if so, not including these contacts in the update batch.