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.

is there a simple example on how to remove a contact?

Highlighted
Occasional Participant

update

Can you post the sample code used for updating a contact?

Highlighted
Employee

An example of the XML used to

An example of the XML used to update a contact is as follows:


<entry xmlns="http://www.w3.org/2005/Atom">

  <id>http://api.constantcontact.com/ws/customers/USERNAME/contacts/145</id>

  <title type="text">Contact: joe@test.com</title>

  <updated>2008-04-25T19:29:06.096Z</updated>

  <author> </author>

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

    <Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/
USERNAME/contacts/145">

      <EmailAddress>
joe@test.com</EmailAddress>

      <FirstName>Joe</FirstName>

      <LastName>Fakeman</LastName>

      <OptInSource>ACTION_BY_CUSTOMER</OptInSource>

      <ContactLists>

        <ContactList id="http://api.constantcontact.com/ws/customers/
USERNAME/lists/2"></ContactList>

        <ContactList id="http://api.constantcontact.com/ws/customers/
USERNAME/lists/3"></ContactList>

      </ContactLists>

    </Contact>

  </content>

</entry>


More information can be found in the API Documentation.

Dan H

Support Engineer, Constant Contact

Highlighted
Moderator

The best way to get the

The best way to get the Contact URI when dealing with Exports through the Bulk Activities collection is to do a query on the Contacts collection with the few email addresses you want to delete.  The responding XML will contain the URI for that contact which you can then send a delete back on to move them to Do Not Mail.

Dave Berard
Senior Product Manager, 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
Featured