ActiveCampaign Forum

Avoiding duplicates using the API

Hello all, I’m looking into syncing some data with one of my own systems with ActiveCampaign. One of the first things i’m looking into is making sure to avoid duplicates.
I see that “contact_sync” allows for matching on email when it comes to contacts, but what I’m missing in the documentation is how matching is done by AC when i “create” an account or contact.
for account i’d like to match it on name or URL
for contact i’d like to match it on name or email
in order to avoid duplicates, from what I currently see i’d have to fetch the lists of accounts/contacts and then match it myself with some simple business logic…

Is that the most efficient way or are there methods like merge based on url or email that I don’t see in the documentation?

Many thanks in advance!