We are looking to sync emails directly via the API, but template is a required field.
In my head, I have the following kludge in mind:
The problem is that a template cannot be deleted while there are emails attached to it. By editing the code of an email outside of editable elements in the Marketo UI, it breaks it from the template. Is there a way to do this programatically? I don't want to fill up instances with 1:1 Templates to Emails.
Hey Jason, in the past we've done this via a blank template. It requires that you have the API provide all of the code for the subsequent email, but it was a simpler solution than what you've outlined here.
The only issue I see here is that I need to pass the entire email, not just the contents of an editable area; the <head> contains different information for each email.
The emails need to stand on their own, so tokens don't apply...but maybe variables could work. An ugly workaround for sure, but maybe I can pursue it.
Have given a look to the endpoint that enables to update editable sections specifically: http://developers.marketo.com/rest-api/assets/emails/#update_editable_section