Invalid Request from Form Submission (Resolved)

Occasional Participant

Invalid Request from Form Submission (Resolved)

Hi -

I've created a simple form to add a single entry to one of our CC lists.  It accepts a first name, last name, and email address, and POSTs the form using PHP, taken directly from the samples provided on this developer site.

The resulting XML string is:

<?xml version="1.0"?>

<entry xmlns="">

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




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

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

  <Contact xmlns="">






    <ContactList id="{USERNAME}/lists/5"/>






(The email address is real, but it is for a dummy testing account; number 5 is the desired list ID, and "XXXXXXX" is the account name.)

This submission returns a 400 request error.  What am I missing?


- Dave


Hey Dave,

I took a look at your XML and was successfully able to create a contact using it. The only adjustments that I had to make was to modify the list ID to be an actual list contained within my account. You may possibly be recieving a 400 error if list id number '5' does not exist. Another possible error you could be recieving is an error 409 if the contact already exists within your account.

I would recommend that you take a look at the REST Client and see if you are able to create a contact this program. If you are still running into any issues creating a contact, please reply to this post with the PHP that you are using and I'll be happy to take a look. If you would prefer, you can also send your PHP to our webservices support team and we would be happy to take a look at it. Thanks.

David J

Occasional Participant

Thanks for getting back to me -- the REST Client really made a difference.

My problem was that I was not programmaticaly generating a response containing my collection of lists.

Instead I was trying to pass a specific list directly, by what I assumed was the ID number ("5").

Turns out that's actually the content of the "ContactCount" element.  A little note clarifying the distinction might be helpful, for future reference!

Thanks again,

- Dave


Developer Portal

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

Visit Page