The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Opting Back In

Occasional Participant

Opting Back In

I am trying to create a form to opt a customer back into our list.   Using the same code, I can update a user and remove a user from a list without any issues.

I successfully get their user information.  I delete the Status node.  I add the OptInSource Node to the Contact node  I also make sure that ContactLists and ContactList nodes are present.  When I use the XMLDom to add the nodes, it does add an xmlns attribute to the new nodes.  I am not getting any errors, but the user is still in the do not mail lsit.

Here is the xml after I make my modifications.  I am using PUT and sending it to ../contacts/{ThecorrectUserId}

Any ideas on the problem?

<entry xmlns="">

<link href="/ws/customers/BeckerHolding/contacts/7" rel="edit">

<name>Constant Contact</name>
<content type="application/vnd.ctct+xml">

<contact xmlns="" id="">
<name>test person</name>




<optinsource xmlns="">ACTION_BY_CONTACT</optinsource><contactlists xmlns=""><contactlist id=""></contactlist></contactlists>


<link href="contacts">
<link href="contacts" rel="self">





opting contact back in


I did some testing and it does appear the issue you are having is with the xlmns="" on both the OptInSource and ContactLists nodes.  If you are able to remove these it should work.  Also please note that these nodes are case sensitive, so optinsource will not work, it must be OptInSource.


Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More