Accessing emails and running campaigns via REST API | Community
Skip to main content
Vlada_Prasolova
New Participant
July 19, 2016
Solved

Accessing emails and running campaigns via REST API

  • July 19, 2016
  • 1 reply
  • 3452 views

We are trying to launch an automated email that consists of our product blog content to be sent every time there is a new blogpost worth sending out.

It turns out that that in order to do this via API calls we need is to be able to clone a program, update its email body and schedule corresponding campaign when we think that we have new content to send.

The problem is that I don’t see an easy way to update content of an email (not headers but actual body). As i see from API documentation, everything that I can do in order to update email body is to call updateEmailTemplateContentById with email’s corresponding template and it doesn’t affect approved templates.

So the question is how can I update existing email body via REST API? Does our workflow look ok?

Or may be there is a much more simple way of doing this that i'm missing out?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kenny_Elkington

The typical flow is not to update the email asset itself, but to use a My Token instead of having embedded content.  You then pass your syndicated content in as a replacement my token via the Schedule Campaign call, similarly to what's shown here: http://developers.marketo.com/blog/sending-transactional-emails-with-the-marketo-rest-api-part-2-custom-content/

1 reply

Kenny_Elkington
Kenny_ElkingtonAccepted solution
New Participant
July 19, 2016

The typical flow is not to update the email asset itself, but to use a My Token instead of having embedded content.  You then pass your syndicated content in as a replacement my token via the Schedule Campaign call, similarly to what's shown here: http://developers.marketo.com/blog/sending-transactional-emails-with-the-marketo-rest-api-part-2-custom-content/

Vlada_Prasolova
New Participant
July 20, 2016

Our average email size will be a couple of kilobytes. So are we able to transfer whole content of an email through My Token? Right?

SanfordWhiteman
New Participant
July 20, 2016

Sure.