Showing results for 
Search instead for 
Did you mean: 

Adding New Contact Record: 400 Error

Regular Visitor

Adding New Contact Record: 400 Error

Hello! I'm a developer trying to build a simple add contact script in .NET. (I'm talking about a brand-new contact here, not about adding an existing contact to a contact list.)  I'm authenticating fine using basic HTTPS, but I'm getting a 400 error every time I try to send new contact XML. According to the documentation, that means my XML is probably ill-formed, but I built my code based on the sample ASP.NET signup form project on SourceForge (  Can someone please take a look and tell me what I'm missing?


<entry xmlns="">
	<title type="text"></title>
	<summary type="text">Contact</summary>
	<content type="application/vnd.ctct+xml">
		<Contact xmlns="">
			<statename>West Virginia</statename>
				<ContactList id="" />


Regular Advisor

Re: Adding New Contact Record: 400 Error

Hi Stephen,


I notice in your XML that many of the tags are all lower-case. However, XML is case sensitive. So, for example, you have <optinsource>, but the correct casing is <OptInSource>. Our XML elements are camel cased.



Richard Maxwell
Support Engineer, Constant Contact
Regular Visitor

Re: Adding New Contact Record: 400 Error

Thank you sincerely!  I'm not sure how some of the tags got that way, since I literally copy-pasted right out of the sample project.  But sure enough, the sample project had good capitalization and my code did not.  (I think maybe it was because, to start with, I commented out those particular lines of code... maybe Visual Studio did something crazy, or else I accidently hit some other shortcut while those lines were highlighted).


In any case, I fixed the capitalization and now I'm set.  Thanks for your help!

Still need help?
You can post a new message in the Community or find us on Twitter Mon-Fri 8am - 8pm ET. We've got real people waiting to help you out. Click below to start a conversation!