adding emails from form

Participant

adding emails from form

I would like to know if it is possible to automatically pull out fields from our already constructed registration forms on our website and send them directly to our CC databes.  Our site is designed for customers to "register"  I would like it so when they register, we could have the few selected fields be sent to the corresponding CC list automatically.  Is this possible?


Thank you! Andy


 

1 REPLY 1
Employee

Hi Andy,


This is certainly possible, would just need to grab the persons email address and any other credentials you need, and perform an HTTP post to the contacts collection (https://api.constantcontact.com/ws/customers/{username}/contacts) using valid XML containing those details. An example of the minimum XML required would be:


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

  <title type="text"> </title>

  <updated>2008-07-23T14:21:06.407Z</updated>

  <author></author>

  <id>data:,none</id>

  <summary type="text">Contact</summary>

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

    <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">

      <EmailAddress>test_100@example.com</EmailAddress>

      <OptInSource>ACTION_BY_CONTACT</OptInSource>

      <ContactLists>

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

      </ContactLists>

    </Contact>

  </content>

</entry>

 

For more information on this, I would recommend looking at Creating a Contact. We do have samples in a number of different Code Samples available that may be able to help, depending on what language you are using.

David J

Developer Portal

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

Visit Page