I just got off the phone with support (for an hour) and there's been a HUGE change that was not communicated to developers.




When your account moves to the new contact format (I'm not sure what percentage of customers are already converted), the APIs will no longer filter out duplicates. If you make a request to add a contact whose address already exists, it will be added even if the email address is already in your contacts


This also affects bulk imports via the APIs! Beware!


Needless to say, I'm very upset that this wasn't properly communicated to developers. This will take me weeks to fix in my applications. 




Thanks for the post on this.  I want to clear up a few things regarding the API, bulk imports and contact duplicates.  First off, the API does not currently support multiple contacts with the same email address.  This is true for both v1 and v2 API and true for both single contact and bulk contact actions.  I am truly sorry that you got incorrect information from our phone support team.  They are not trained to handled detailed API questions and, as such, can often times give confusing or misleading answers.  In the future, if you have questions about how the API does or doesn't work, the forums here or our email support (webservices@constantcontact.com) is the best option for getting API specific answers.  As you can imagine, the API is far more technical than our normal product and our phone support staff just can't all be trained to answer those infrequent and very specific questions.


If you create a bulk import and have multiple entries with the same email address, the import will be processed in the exact same way.  The duplicates will be detected based on email address and only email address.  The last entry in the import with the same email address will "win", in that it will be the last update on the Contact and will be the remaining information that the Contact has.  For example, if you imported test@example.com twice, first with the first name Bob, second with the first name Jane, the contact record with test@example.com will end up with the first name of Jane.


We have done extensive testing around this to ensure that there are no issues with this and that you can't have duplicate contacts created through the API as this would create an inconsistent and unpredictable experience from one customer to the next.  This morning, we ran our tests in production again after this post to ensure that is still the case and we came back without any duplicates created.  I just manually did this in my account and confirmed it as well.


Regarding the new Contact Management system you referenced, we are in fact migrating our customer base onto a new and far more advanced Contact Management system.  This has been in development for a very long time and we've made many public mentions on earnings calls, press releases and communications to customers about this.  One area where we haven't done a great job of communicating yet, and this was intentional, is to our developer ecosystem.  This is because the majority of our developer ecosystem hasn't yet been impacted by this and we weren't ready to message them until they were going to be impacted.  The communications are planned to cover what we're doing, how these changes impact integrations and how we can support our developer ecosystem and these communications will be going out in the not too distant future.


It is true, one of the new features that will be rolling out will be email address no longer being a unique field for Contacts.  However, at this time we don't have this feature rolled out to 100% of our customer base and to prevent inconsistencies in the API we are not allowing this through the API.  We will never be allowing this through our v1 API, it simply is too difficult to update that version to support this.  However, we do plan to add this feature to the v2 API sometime in 2014 when we have all of our customer base migrated to the new CRM features.  We will also be offering multiple email addresses per contact, multiple physical addresses, multiple notes and tagging.  All of these features will not be available to the API until 2014 and the API, in the interim, will continue to behave exactly the same as it has over the past 6 years.


If you have any more questions about this new platform, feedback on it or concerns, please feel free to reach out to our API support team or PM me your contact information.  I'm more than happy to have a call with developers to understand needs, concerns and discuss what we're doing.  We always are looking for feedback from our customers on how to make the product better and my customers are you, the developer ecosystem.  Again, I apologize for the inaccurate information you received on the phone.  I will work with our support training team to get some more educational materials out to them and help prevent this from happening again. 

Dave Berard
Senior Product Manager, Constant Contact

I'm PMing you now. Your APIs have accepted duplicates for over a week. The proof was in my account this morning. 

To be clear, adding contacts via the bulkUrlEncoded method from your V1 XML API .NET library allows duplicates. Here's a VB.NET example (directly converted from your C# library) that inserts duplicates (as of this morning at 7am CST):


        ''' <summary>
        ''' Uploads text/csv file dumped to string to specified lists
        ''' </summary>
        ''' <param name="authdata">Authentication Data</param>
        ''' <param name="data">CSV or text, dumped to string</param>
        ''' <param name="listIds">ID(s) of target lists to upload to</param>
        ''' <returns>Calls urlEncodedPost, which then returns response from server (string)</returns>
        Public Shared Function bulkUrlEncoded(ByVal authdata As ConstantContactUtility.AuthenticationData, ByVal data As String, ByVal listIds As IList(Of ConstantContactBO.QRLendingLists)) As String
            If String.IsNullOrEmpty(data) Then
                Throw New ArgumentException("No data to be uploaded specified.", "data")
            End If
            If listIds.Count = 0 Then
                Throw New ArgumentException("No target list ID(s) Specified.", "listIds")
            End If
            Dim encodeddata As String = "&data=" & HttpUtility.UrlEncode(data)
            'SV_ADD is add contact, REMOVE_CONTACTS_FROM_LISTS self explanatory. CLEAR_CONTACTS_FROM_LISTS 
            'sent with no data will clear the list.
            Dim i As Integer = 0
            Dim JoinedURIs As String = ""
            For i = 0 To listIds.Count - 1
                JoinedURIs = JoinedURIs & "&lists=" & Convert.ToString(authdata.AccountContactListsUri) & "/" & listIds(i)
            Dim fullrequest As String = "activityType=SV_ADD" & encodeddata & JoinedURIs
                Return Utility.urlEncodedPost(authdata, authdata.accountActivitiesUri, fullrequest)
            Catch e As Exception
                Throw New ConstantException(e.Message, e)
            End Try
        End Function


        ''' <summary>
        ''' HTTP POST using URLEncoded Content Type
        ''' </summary>
        ''' <param name="Authdata">Authentication Data</param>
        ''' <param name="URI">URI to POST URLEncoded data to</param>
        ''' <param name="content">URLencoded data to POST</param>
        ''' <returns>string containing XML response from server</returns>
        Public Shared Function urlEncodedPost(ByVal Authdata As ConstantContactUtility.AuthenticationData, ByVal URI As String, ByVal content As String) As String
            ' Create a request
            Dim request As WebRequest = WebRequest.Create(URI)
            ' Set API+UN/PWD Credentials
            request.Credentials = New NetworkCredential(Authdata.AccountUserName, Authdata.Password)
            ' Set Method type
            request.Method = "POST"
            ' Create POST data and convert it to a byte array.
            Dim postData As String = content
            Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
            ' Set the ContentType of Request
            request.ContentType = "application/x-www-form-urlencoded"
            ' Set the ContentLength
            request.ContentLength = byteArray.Length
            ' Get the request stream.
            Dim dataStream As Stream = request.GetRequestStream()
            ' Write the data to the request stream.
            dataStream.Write(byteArray, 0, byteArray.Length)
            ' Close the Stream object.
            ' Get the response.
            Dim response As WebResponse = request.GetResponse()
            ' Get the stream containing content returned by the server.
            dataStream = response.GetResponseStream()
            ' Open the stream using a StreamReader for easy access.
            Dim reader As New StreamReader(dataStream)
            ' Read the content.
            Dim responseFromServer As String = reader.ReadToEnd()
            ' Clean up the streams.
            Return (responseFromServer)
        End Function


If I include email addresses within the CSV [data] string that are already in my contacts, the email addresses will be added again. 

Thanks for posting the code samples.  Definitely looks like there is a problem with your imports not getting appropriate duplicate detection and we need to take a look at this.  If possible, could you log the actual request being created by the wrapper library and sent in the HttpWebRequest to us and then email it to webservices@constantcontact.com?  While we are definitely able to see something is off in your account, we still haven't been able to reproduce which will slow down our troubleshooting and getting a fix.  Your payload would help us out greatly to eliminate as many variables as possible.

Dave Berard
Senior Product Manager, Constant Contact

I send the content of the requests I'm sending to your webservices account.  Let me know if you need anything else to help troubleshoot. 

Thanks for sending the additional information.  We have reproduced the error you described using our v1 bulk API.  We are looking into why this is happening and why it's only happening for the v1 bulk API but not the v2 bulk API.  Will hopefully have an update soon, however this is a holiday week with Thanksgiving so we are not sure if we'll be able to get this solved this week.


A workaround to avoid this issue is to use the v2 API instead of the v1 API.  While we have deprecated the v1 API and it may have degraded experiences in the future as we continue to roll out Contact Management enhancements, this was unintentional and we do intend to fix this.  In the long term, we do plan on retiring the v1 API and moving to the v2 API is highly recommended.

Dave Berard
Senior Product Manager, Constant Contact

It does, of course, make sense to move to the V2 API if possible. Unfortunately, until you fix, or at least document the validation and filtering items for, the email_content error in the V2 API, there's just no chance that I'll be able to do that.


I'll consider moving some of my API calls to the new API, but it's impossible for me to use the new API for creating or updating campaign content until your validation is usable.

We have an update on the duplicate emails issue.  In the investigation, it looks like we have a bug in one of our frameworks where if the only field provided in the bulk import is email address, or the last field provided is email address, than duplicates will be created.  We are working on fixing this bug and also investigating how to correct the duplicate contacts in accounts with this scenario without any interaction from impacted customers.  We expect to have a fix for this issue tested and in production in early Dec (currently targeting Dec. 10th). 


The good news is that there is a simple workaround you can put in place today that will stop the problem from continuing.  If you add an additional field, such as first name or custom field 15, to the request and simply leave the information blank, no duplicates will be created. 


We have also identified all customers affected by this issue so we can proactively fix their accounts and ensure that no billing issues were created for any of these customers.  If any billing tiers were changed because of duplicate Contacts, we will make sure to have our billing group apply credits to the accounts to account for the issue on our end.  Due to the specific scope of this issue we have only identified a handful of affected accounts so far and are really greatful to you for pointing this out and helping us troubleshoot so effectively and quickly.

Dave Berard
Senior Product Manager, Constant Contact

Regarding the email_content issues, we are actively working on adjusting the validation now to be much more open.  We hugely appologize for the issues that is causing developers.  The inconsistency on the validation in our UI and our API is unforgivable and we are working very hard to adjust it and get them in sync.

Dave Berard
Senior Product Manager, Constant Contact

I've put the "add an additional field" workaround in place. I'll look forward to your bug fix, but this will do in the meantime.


Can you provide an update regarding correcting the duplicate contacts? I have close to 20,000 duplicates in my account!

Will check on the update with our Contacts engineering team today, though I don't believe we will have one in hand this side of the holiday. We do have a fix in testing now for the issue itself which we believe will resolve all the duplicates without any further changes by any developers.  Once they have completed verifying the test, they will move on to the data cleanup work.   Working on the old adage of trying to stop digging the hole deeper first before we start to fix the damage. 

Dave Berard
Senior Product Manager, Constant Contact

On a separate note, what happened to developer.constantcontact.com? It's redirecting to www and the developer pages seem to be missing.

Just checked on our internal network and from an external ISP network (Comcast) and both resolved the developer website correctly.  Are you being redirected when going to http://developer.constantcontact.com or a different page?

Dave Berard
Senior Product Manager, Constant Contact

I'm redirected to http://www.constantcontact.com/welcomeback... but I think it's a cookie issue, as I can open it in an incognito tab. I'll clear my cache and give it another shot. 

I'm attempting to move to the V2 API for my bulk activities, but I'm having some difficulty doing so. 


My first issue is with the Remove Contacts - Bulk Activities API. I'm posting the following json :



And I get the following response:




When I check on the activity status, I get the following response, which is showing a bunch of errors. 



Are these errors related to the duplicates in my account? The contact is not removed from the list I've requested, so whatever is happening is causing the action to fail. 


Also, bulk activities added through the API don't show up on the UI Activities page (https://contacts-ui.constantcontact.com/ui/accounts/{account_id}/activities/). They used to show up there, but now I'm stuck having to make API calls to check on my bulk activities. That's a disappointing loss of functionality. 



The errors you got back are because of the duplicate contacts.  We don't have a method for developers to clear out duplicate contacts right now.  We will most likely be removing the duplicates ourselves once the bug has been fixed.


You should still be able to view the bulk activities performed by the API through the UI.  The URL may have changed.  When you look at your contacts in the UI, there is a tab labeled "Activity" that should provide that information.




Andrew B.

Constant Contact, API Support




Sorry, you are correct.  The new UI does not currently show API activities.  I have been told that this is supposed to be fixed in the near future, but I don't have a time for this.

This is frustrating. Everything was working fine until the "upgrade." 

Can we get an update re: duplicate contact removal? I'm sick of searching through thousands of duplicates.

Anyone? Update? Please? 


This is getting ridiculous.

We have been working with the development team and product manager for our Contacts product over the past few weeks to get this resolved.  The issue is complicated to solve without causing more damage than we are fixing.  The last thing we want to do at this point is make a bad situation worse. 


That said, the team is hopeful that we will have a fix for this and correct the data in mid-January.  We were hoping to have something complete on this prior to the holidays, but that does not appear likely at this point in time. 

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page