When you create, update, or upsert a contact, the same person might already exist in the contact list. For example, a visitor could subscribe to a newsletter and later register as a site member using the same email. This guide explains how the Contacts API detects these cases and what happens when it finds a match.
The Contacts API matches contacts using only 3 fields, called identifiers:
externalIdemail.emailphone.phoneAdditional emails and additional phones aren't identifiers and aren't used for matching.
Which contacts count as a match depends on which identifiers you provide:
| Identifiers you provide | Matching contacts |
|---|---|
externalId only | All contacts with the same externalId. |
email.email only | All contacts with the same email. |
phone.phone only | All contacts with the same phone. |
externalId and email.email | All contacts with the same externalId, plus contacts with the same email that don't have a different externalId. |
externalId and phone.phone | All contacts with the same externalId, plus contacts with the same phone that don't have a different externalId. |
email.email and phone.phone | All contacts with the same email or the same phone. |
externalId, email.email, and phone.phone | All contacts with the same externalId, plus contacts with the same email or phone that don't have a different externalId. |
When you provide both an email and a phone, with or without an externalId, a contact needs to match only one of them to count as a match. For example, if you provide email = a@example.com and phone = +1 111, a contact with email = a@example.com but a different phone number still counts as a match, and so does a contact with phone = +1 111 but a different email address.
The Contacts API fetches up to 100 matching contacts for a single request.
When more than 1 contact matches, the Contacts API chooses a single duplicate contact based on how many, and which, identifiers each match shares with the ones you provided. Matches with more identifiers, or with higher-priority identifiers, rank higher. Identifier priority, from highest to lowest, is externalId, then email.email, then phone.phone.
For example, if you provide all 3 identifiers, matches rank in this order:
externalId, email.email, and phone.phone.externalId and email.email.externalId and phone.phone.externalId only.email.email and phone.phone.email.email only.phone.phone only.allowDuplicates to true to bypass the duplicate check.allowDuplicates to true to allow the update even if it creates a duplicate.The following examples use this contact list:
externalId = E1, email = a@example.com, phone = +1 111externalId, email = a@example.com, phone = +1 111externalId = E2, email = a@example.com, no phoneexternalId, email = a@example.com, phone = +1 999externalId, email = z@example.com, phone = +1 111If you call Create Contact with externalId = E1, email = a@example.com, and phone = +1 111:
externalId, email.email, and phone.phone. Contact B has no externalId to conflict with the request, so it matches on email.email and phone.phone.allowDuplicates to true.If you instead call Upsert Contact with the same identifiers, the Contacts API updates Contact A instead of creating a new contact.
If you call Find Matching Contacts with externalId = E1 and email = a@example.com:
externalId.externalId is different: E2 instead of E1.externalId to conflict with the request.If you call Find Matching Contacts with email = a@example.com and phone = +1 111, without an externalId:
Last updated: 13 July 2026