Use this guide to search your existing Mercury Person (Contacts) records by email address using a GET API request. This is useful when you need to confirm whether a person already exists before creating or updating records.
What is the Person search API?
The Person search API allows you to query the Mercury Contacts database using specific search parameters, such as an email address. It returns any matching Person records in the response.
This helps you avoid duplicate records and ensures data consistency across your integrations.
Search for a person record by email
To search for a Person record, use a GET request with search=true and include the email address in the searchParams query parameter.
The email address must be passed as a URL-encoded JSON object.
Example GET request
Use the following format when making your API call:
Replace:
:tokenwith your Mercury API token[email protected]with the email address you want to search for
What happens next
When the request is successful, Mercury searches the Contacts database for records matching the email address and returns a list of matching Person records in the API response.
If no records are found, the response will return an empty result set.
Tip: Use this search before creating a new Person record to reduce duplicate contacts.
Important: Ensure your API key and token are valid and have permission to access Contacts data.
If you see an error
Check that your searchParams value is correctly URL encoded and that the email address is formatted correctly.
Need help?
If you need help using the Mercury API or troubleshooting API access, contact your Partnership Manager or email [email protected].