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.

Error 400 when attempting to submit new contact to list

Highlighted
New Member

Error 400 when attempting to submit new contact to list

hi all,


new to this forum.  We downloaded all the C# examples and integrated them into our system.  all seems to work - it authenticates and all that fine but we do get the 400 errors when trying to either submit a new contact or delete one from a list.   Below is a copy of the xml we are sending.  Please note we are not building this out rather we are using the utility classes you have provided us to create the user and do the processing against the API.


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

  <title type="text" />

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

  <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>mike90929@testingthis.com</EmailAddress>

      <FirstName>Test</FirstName>

      <MiddleName />

      <LastName>User</LastName>

      <HomePhone />

      <Addr1>slkdfj</Addr1>

      <Addr2>lkjsdf</Addr2>

      <Addr3 />

      <City>toronto</City>

      <StateCode />

      <StateName />

      <PostalCode>M5V1B1</PostalCode>

      <SubPostalCode />

      <CountryCode />

      <CompanyName />

      <JobTitle />

      <WorkPhone />

      <EmailType>HTML</EmailType>

      <OptInSource>ACTION_BY_CUSTOMER</OptInSource>

      <Note />

      <CustomField1 />

      <CustomField2 />

      <CustomField3 />

      <CustomField4 />

      <CustomField5 />

      <CustomField6 />

      <CustomField7 />

      <CustomField8 />

      <CustomField9 />

      <CustomField10 />

      <CustomField11 />

      <CustomField12 />

      <CustomField13 />

      <CustomField14 />

      <CustomField15 />

      - <ContactLists>

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

      </ContactLists>

    </Contact>

  </content>

</entry>

1 REPLY 1
Highlighted
Moderator

I used your XML through my

I used your XML through my account and the error I received was that contact list 4 did not exist (in my account, it doesn't).  Once I updated that to an existing account, I was able to create a contact without issue.  Did you check the error response message to see what the response is?  The XML itself is valid and able to create contacts, the only problems I could imagine would be invalid list ID or a 409 Contact Already Exists error in case you are trying to create a contact with a duplicate email address.

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