Email address already exists

Highlighted
Occasional Participant

Email address already exists

Hi,

 

I am able to create new contact through API, however after removing the existing account I am unable to add any email to a specific list. Getting below error response,

 

As per the screenshot below there is no contact(s) exist. 

 

[{"error_key":"http.status.email_address.conflict","error_message":"Email address xxxx@gmail.com already exists."}]

 

contact_exist.PNG

 

Any help would be appreciated. 

 

Thanks
Deepu

3 REPLIES 3
Highlighted
Honored Contributor

Re: Email address already exists

Hello Deepu,

 

In this case what you're seeing is that Constant Contact uses a persistent data model where deleted contacts are hidden from view with their data preserved. This is largely to protect our customers from accidental data loss, as it gives the ability to recover contacts that were deleted. From the perspective of the API, these contacts are simply removed, rather than deleted.

 

As a result of this, you cannot create a new contact under the same email address, since one already exists. As a general rule, the proper flow for adding a new contact in the API should be:

  • Search for an existing contact by email address
  • If a contact exists, update it instead of creating new.
  • If a contact does not exist, create a new contact.

Following the above flow will allow you to automatically handle a case where there is a deleted contact who already has the desired email address, and simply update that contact to make it active once again.

 

If you have any questions about this, please feel free to ask!

 

Sincerely,

Elijah G.
API Support Engineer
Highlighted
Occasional Participant

Re: Email address already exists

Thanks Elijah_G,

 

How to add same contact to multiple list through API?

Highlighted
CTCT Employee

Re: Email address already exists

Hi there,

 

Elijah described the general process for this above (search for the contact through the API, then add it if it doesn't exist, or update it if it does). All of our SDK's have an example that shows how to do that.

 

If your question was more that you didn't see how to do this for more than one list, the answer is to use the method that adds lists to a contact more than once. At the JSON level, this will mean adding an additional list object in the lists array described here.

 

Best Regards,

Shannon Wallace

Partner API Support Engineer

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured