Re: Can't make mktoDefaultSnippetId work through api

Alejandro_Alvar
Level 1

Can't make mktoDefaultSnippetId work through api

Hello!

Please I need help with this. I have a process to create an Email Template using the API, and then use it to create a Program.

The HTML of the Email Template has a mktoSnippet like this:

 

<div class="mktoSnippet" id="snippet-test" mktoname="Snippet Test" mktodefaultsnippetid="42"></div>

 

And I have an approved Snippet with that ID inside the same workspace (actually if I try to select that snippet from the Marketo UI, I can).

Here's the result I get. The module is there, but the snippet is not selected (it's Empty😞

snippet1.png

And when I try to Edit Code, I see that the mktoDefaultSnippetId has been removed:

 

<div class="mktoSnippet" id="snippet-test" mktoname="Snippet Test"></div>

 

But when I verified the code of the related Email Template, the mktoDefaultSnippetId is there.

I tried the Snippet ID I get from the API by doing a call to: /rest/asset/v1/snippets.json

And also I can get more info about the snippet from the API by doing a call to: /rest/asset/v1/snippet/{id}/dynamicContent.json

So, I tried to use the Snippet ID and also the principalAssetId related to the same Snippet, but non of those worked.

Somebody can help to understand what I'm missing?

Thanks!

1 REPLY 1
Dennis_Thomsen
Level 2

Re: Can't make mktoDefaultSnippetId work through api

According to below thread the mktoDefaultSnippetId parameter is not yet supported by the API. It's from 2017 but it seems that it may still be the case.

 

See this: https://nation.marketo.com/t5/product-discussions/setting-default-snippet-id-through-rest-api/m-p/35...