We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Receiving 500 Error Code even though the operation worked


Receiving 500 Error Code even though the operation worked



I've been applying some updates to my drupal module and PHP code library (now using curl).

I have this working fine in drupal 7 but getting a weird error in drupal 6, both use the exact same code library.


I receive a 500 http error code when updating a contact even though the update is working, for example I'm updating the lists the contact is subscribed to and also have been removing all lists the contact is on, both work as when I check in constantcontact.com the changes reflect correctly however my app is always receiving the 500 error code, I've also checked this with a standalone rest tester tool and get the same response.


Example code below.


<entry xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Contact: Tester123456@example.com</title>
  <content type="application/vnd.ctct+xml">
    <Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers//*************//contacts/27">



Note that I'm using my test/trial CC account (not the one I'm logged in with now the other one ending in uk).


Can you help diagnose this please.



James Benson


Hello James,


I took a look at your XML and I believe I found the problem.  I think it is actually a defect on our end that is giving a 500 error when you try to do an update to the contact with an upper case email address.  I did some testing and I am going to send this over to our engineers to look at and fix as soon as possible.  Also note that this only seems to be happening when you have the OptInSource to be set as ACTION_BY_CONTACT, if you do not have the opt in source, or have it set to ACTION_BY_CUSTOMER, your XML will succeed.


Currently the best way to work around it would be to force the email address to be lowercase before sending the PUT call.


If you have any questions please let me know.



Benjamin Soder
NOC Analyst
Constant Contact

Thanks for the reply, I've modified my code to convert the email to lowercase and it works fine now.

Developer Portal

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

Visit Page