I am able to create a simple campaign (email) through the API, it is rather straight forward and I am very happy with how it works.
However, I am trying to create a more complex email and am coming up short.
Am I able to create a campaign, or update one, using our CC template?
Thanks for any help. Please ask for whatever details are needed as I don't want to provide superfluous detials.
Here is a link to our webpage version of one of our campaigns for reference sake.
Solved! Go to Solution.
We don't have any way to create or edit the HTML for an email through the API using one of our templates right now, so you'd be limited to creating the email inside the UI and scheduling it through the API to use our templates, unfortunately. You can modify non-email-content portions of a template through the API as in this link.
The limitation for that is the underlying issue that we don't have a way to give out the HTML code for our templates--sorry about that. For email creation through the API, only custom code HTML or XHTML emails can be created.
API Support Specialist
Thanks for your reply and information. I couldn't find this while looking through any of the documentation, so I really do appreciate it.
I tried dumping the html from one of our emails to a new campaign, but get an error saying it wasn't acceptable content. I can do simple Hello World in a p tag, that isn't a problem. However, I was trying to see how complex I can get it, perhaps I could just generate the end version of the html that comes out.
I properly, at least I think I did, encoded the html, but it still failed. Is there a list of html commands that are accepted and not accepted through the api?
I just figured out my problem. I wasn't taking care of my apostrophe, it was causing problems. After adding the ' in lieu of that, my life got a lot better.
Could anybody see any issue with placing the complex html into the email without using the template? Are there potential compatibility issues that the CC template takes care of that I should be aware of?
Thanks to anybody for their help.
The biggest pieces of advice I could give about creating your own complex html emails would be:
1. Tables are your friends, and don't try to get too cutting-edge with newer html or css, as email clients are probably close to a decade behind web browsers in what they can display and the commands they recognize. Floating css won't work well.
2. We use all inline styles as far as css in our templates, because many email clients strip out external style sheets, style sheets in the header, and randomly ignore styles that should apply to entire sections. Try to specify all of the css you need within the p/td/span tag that surrounds an element.
I hope that helps!
API Support Specialist
Thanks again for all of your help.
If anybody else comes upon this post I would be happy to talk about the solution that was applied for this problem described.
Simply PM the minesource account and ask that Dave be the one who gets the message, there are people other than me who have access to this account.