Error 400 On Creating New Campaign (HTML may be causing issue)

PricefallsL
Regular Participant

Error 400 On Creating New Campaign (HTML may be causing issue)

Hello,

 

I know this type of question has been posted numerous times in the past, so thank you in advance to the patient members who keep answering them.

 

When trying to post a new HTML email campaign through the API, I receive: Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>.

 

My XML:

 

http://www.choodah.com/Newsletter/temp.xml

 

I strongly suspect that the ultimate problem is with the encoding of the HTML, but I'm not certain what exactly the issue is (or how to properly encode the HTML aside from '<' and '>' chars). Any help would be appreciated.

 

Thanks,

Chad

4 REPLIES 4
PricefallsL
Regular Participant

After looking through the XML again, I've found a couple spots to fix - one being that I was closing the EmailContent Tag with an EmailTextContact close tag, and the other potential issue was using an incorrect list ID number. When I attempted to post with much shorter and simpler HTML content, it worked as expected, however using the HTML I had originally intended still causes an error.

 

Any recommendations for encoding HTML?

It was an encoding problem. I'm fairly new to XML, but this tool helped: http://coderstoolbox.net/string/

Hey Pricefalls,

 

That looks like a great tool.  I wanted to make sure that your problem was resolved. 

 

Thanks,

Ryan Davis
Quality Engineer
PricefallsL
Regular Participant

Hi Ryan,

 

Thank you for your reply. My initial problem has been fixed and I'm able to submit HTML campaigns over the API, however I can only submit them as Drafts. I've requested the ability to Schedule/Send, but I haven't heard back CTCT yet (it's been about 1.5 days). How long does it normally take to get an initial response?

 

Chad

Developer Portal

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

Visit Page