addsubscriber generates 400 error


addsubscriber generates 400 error

Hi I am getting a 400 error when i try and create a new subscriber: 

The xml I am generating is as follows:

<?xml version="1.0"?>
<entry xmlns="">
<author><name>CTCT Samples</name></author><id>urn:uuid:E8553C09F4xcvxCCC53F481214230867087</id><summary type="text">Customer document</summary><content type="application/vnd.ctct+xml"><Contact xmlns="">Customer document<EmailAddress></EmailAddress><FirstName>Scott</FirstName><LastName>Normal</LastName><MiddleName></MiddleName><CompanyName></CompanyName><JobTitle></JobTitle><OptInSource>ACTION_BY_CONTACT</OptInSource><HomePhone></HomePhone><WorkPhone></WorkPhone><Addr1></Addr1><Addr2></Addr2><Addr3></Addr3><City></City><StateCode></StateCode><StateName></StateName><CountryCode></CountryCode><PostalCode></PostalCode><SubPostalCode></SubPostalCode><Note></Note><EmailType>html</EmailType><ContactLists><ContactList id=""/><ContactList id="HK Web Clients"/></ContactLists></Contact></content></entry>

Please advise what may be causing the error



The 400 error you are recieving is due to your XML having an error in the list name:

1. The second Contact List id you are using (<ContactList id="HK Web Clients"/>) needs to be refrenced using that particular list id number, like you do for the first one (<ContactList id=""/>)


I would recommend that you take a look at the Creating a Contact page, as this will show you the minimum XML required to create a contact, as well as how it should be formatted. I hope this helps. Please let us know if you have any other questions. Thanks!

David J

Developer Portal

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

Visit Page