Re: Deleted contacts accidentally

DublinCookerySchool
Rookie
0 Votes

Hi @Zoe_H,

 

Further to the above thread, I am experiencing this same (or at least similar) issue. When I use your API via our website to add the contact, I get a similar message as mentioned above - "Email address ****.*.******@gmail.com already exists.". This error message is generated by your API and not something that we validate or control. However, when I search for that email address in the Constant Contact admin UI, it does not appear under the "All subscribers" list or within any of the filtered lists (e.g. Unsubscribed, Awaiting confirmation, etc.). I have been able to get around it by manually creating it as a new contact within the Constant Contact admin UI as you have described above but obviously I wouldn't expect this to be possible if it did actually already exist.

 

To confirm that this was an issue and not a random blip/fluke, I did a test whereby I subscribed to our mailing list using your API on our website with a brand new email address that did not exist in any of our lists. I then visited the Constant Contact admin UI and searched for the new email and found it there. I then proceeded to delete that email contact (not unsubscribed, just deleted) and searched for it again, and confirmed that I could not find it in any lists. I then re-visited our website and tried to re-subscribe the same email address using your API via our website and was shown the same error message mentioned above, suggesting that the email address was already subscribed, which was not the case...

 

As mentioned above, I don't require a solution as I am able to manually add the email address via the CC admin UI, but would appreciate if your development team could investigate and confirm the issue.

 

Cheers

John

1 REPLY 1
Courtney_E
Moderator
0 Votes

Hello John,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Once a contact (email address) has been added into the system, even if it is deleted, the contact entry and details still remain on the back end of the system for reporting and compliance purposes. When using the API, there are a couple of different endpoint options to bypass the 409 response. Typically this error occurs when making a POST call to the /contacts endpoint, which can only add new contacts whose email addresses have not previously been added to the account.

 

For example, if a contact unsubscribes from your organization’s mailing list, and you were to delete and then re-add that contact, they would be re-added as unsubscribed rather than as a new contact. This allows us to be compliant with the CAN-SPAM Act, as well as other applicable laws and regulations. 

 

CAN-SPAM Act and how it affects your campaigns

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5825-can-spam-act-and-how-it-affect...

 

Frequently Asked Questions for Contacts

https://www.constantcontact.com/legal/about-constant-contact-faqs

 

Essentially, deleting a contact never really deletes them. It just strips their list memberships, moves them into a “deleted” status, and hides them from being visible in the account.

 

It looks like you may be using our V2 legacy API. You can use this flow to add/update your contacts which incorporates three contact endpoints:

 

Step 1: Check to see if the contact exists in the account using the email query parameter to search for a contact using a specific email address.

 

(GET) contacts in the user's account

https://v2.developer.constantcontact.com/docs/contacts-api/contacts-collection.html?method=GET

 

Step 2: If the contact comes back as non-existent, use POST to create the contact:

 

(POST) to create a new contact

https://v2.developer.constantcontact.com/docs/contacts-api/contacts-collection.html?method=POST

 

Step 3: If the contact comes back as already existing in the account. You need to append the returned data with the desired list memberships and send that back with PUT to update the contact:

 

*When Updating a contact, we need to append the new information to the old information and send all of it back in the request, because when you update a contact using a PUT, all properties are updated, overwriting all existing property values. Any properties left blank or not included in the PUT will be overwritten with a null value.

 

(PUT) to update a contact

https://v2.developer.constantcontact.com/docs/contacts-api/contacts-resource.html?method=PUT

 

If you decide to migrate to our current V3 API in the future, you can still use the solution mentioned above for V2, but we also have other solutions available for V3 that may better meet your needs:

 

Option 1:

 

Use the sign-up form endpoint, to add a new contact to an account or update an existing contact based on their email address. Only use this method when a contact gives you their explicit permission to send them emails.

 

Create or Update a Contact Using a Single Method (less recommended)

https://v3.developer.constantcontact.com/api_guide/contacts_create_or_update.html

 

Option 2:

 

You can use our bulk activity endpoints to import new contacts and update existing contacts when syncing local data with Constant Contact. These endpoints use the email addresses you provide in the import to determine if each contact is new or not. When you import an existing contact, these endpoints only update the contact properties you include in the import request.

 

Import Contacts Using Bulk Activity Endpoints

https://v3.developer.constantcontact.com/api_guide/import_contacts.html

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up