APIs & Integrations

MMonaco
Member

Unable to perform update/upsert using email a unique property

SOLVE

Hi
I am trying to integrate the HubSpot private app with a script to keep in sync with the contacts with my database accounts.

I would like to use email as a unique property to create/update a batch of accounts but I couldn't find any solution to make this property unique to use it.

I just tried to do the API call using the endpoint described on https://developers.hubspot.com/docs/api/crm/contacts to update/create a batch of contacts using "email" as a unique identifier.

Getting the following error 
POST https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert failed on HTTP 400 {'status': 'error', 'message': 'Unable to perform update/upsert by non-unique 0-1 property email in portal ID 145134109', 'correlationId': '3de49551-42ab-4518-8e5b-6c77dbf35588', 'category': 'VALIDATION_ERROR'}

There is any way to use "email" as a unique key for this purpose?

0 Upvotes
1 Accepted solution
topher-rafa
Solution
Member

Unable to perform update/upsert using email a unique property

SOLVE
0 Upvotes
1 Reply 1
topher-rafa
Solution
Member

Unable to perform update/upsert using email a unique property

SOLVE

Looks like the batch upsert API is broken. There're have been a few reports about it, and I'm having the same issue with companies.

 

0 Upvotes