Skip to main content
Level 9
January 26, 2018
Question

Updating emails via API without a template?

  • January 26, 2018
  • 1 reply
  • 4808 views

I just tried to update an email subject line via the API and got the following error:

{

    "requestId": "e064#161345f3192",

    "success": false,

    "errors": [

        {

            "code": "709",

            "message": "API only allows operations on emails with a template"

        }

    ]

}

I mean - it's pretty clear in the message itself - but I just wanted to double check that it wasn't possible to update anything in an email when it doesn't have a template. This would be quite annoying - we don't really use email templates in Marketo and instead create them in Dreamweaver, then copy the code in. So virtually none of our emails are attached to a template.

I'm hoping there's a solution here since there are 250ish emails I need to update...

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

1 reply

Grégoire_Miche2
Level 10
January 28, 2018

Hi Philip,

The API doc (http://developers.marketo.com/rest-api/assets/emails/ ) is quite clear about the fact that emails can be created and update only from a source template, unfortunately.

But there is another endpoint that enables you to replace the full HTML : http://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Emails/createEmailFullContentUsing…

have you tried it ?

-Greg

Level 9
January 30, 2018

Thanks Grégoire!

No I wasn't aware of that endpoint....seems quite handy! Forgive my naivety...but is it possible to update subject lines using that endpoint? Updating the HTML is useful, but in this particular circumstance I need to replace subject lines.

As a secondary question, that endpoint requires a "multipart file". What is that and how would I implement it?

Thanks!

Grégoire_Miche2
Level 10
January 30, 2018

Hi Phillip,

 

Use this other endpoint to change the email header : http://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Emails/updateEmailContentUsingPOST

 

The multipart email is the format that enables you to include both the HTML and text version. The standard is here :RFC1341(MIME) : 7 The Multipart content type and some much easier information from Litmus: Improve Your Spam Score With Multi-Part Emails —Litmus Software, Inc.

 

-Greg