{"id":385,"date":"2025-11-27T12:44:02","date_gmt":"2025-11-27T12:44:02","guid":{"rendered":"https:\/\/www.martech-magic.com\/?p=385"},"modified":"2025-11-28T08:23:23","modified_gmt":"2025-11-28T08:23:23","slug":"delete-overridden-tokens","status":"publish","type":"post","link":"https:\/\/www.martech-magic.com\/index.php\/2025\/11\/27\/delete-overridden-tokens\/","title":{"rendered":"Delete Overridden Tokens"},"content":{"rendered":"\n<p>A program token &#8211; or my.token &#8211; can have three states: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Local &#8211; it&#8217;s local to the folder or program it&#8217;s in<\/li>\n\n\n\n<li>Inherited &#8211; it comes from above* the folder or program you&#8217;re looking at<\/li>\n\n\n\n<li>Overridden &#8211; it&#8217;s both local and inherited, but local has higher priority, so the inherited value is overridden.<\/li>\n<\/ul>\n\n\n\n<p><em>*Here, &#8220;above&#8221; means either from a higher folder, from the workspace or from global. Marketo doesn&#8217;t tell you from where exactly a token is inherited.<\/em><\/p>\n\n\n\n<p>It&#8217;s also worth noting that Marketo doesn&#8217;t allow you to delete a token when it&#8217;s in use. That makes sense &#8211; at least at first glance &#8211; because if you delete a token in use, the asset where it is in use won&#8217;t render it anymore. Still, I say &#8220;at first glance&#8221; because Marketo allows you to rename a local token &#8211; regardless if it&#8217;s in use or not &#8211; and that renaming would make it as useless as if it were deleted. A little inconsistency, I would argue.<\/p>\n\n\n\n<p>Anyway, that&#8217;s not the problem here. The problem is that you might have good reasons to get rid of the status &#8220;overridden&#8221; and make it &#8220;inherited&#8221; again. The overridden status is absolutely useful, but it&#8217;s also problematic for tokens that are supposed to be inherited. And that is more than ever the case after the invention of <a href=\"https:\/\/www.martech-magic.com\/index.php\/2025\/05\/24\/global-tokens\/\" data-type=\"post\" data-id=\"314\">Global Tokens<\/a>.<\/p>\n\n\n\n<p>Here&#8217;s an example: You have a Marketo instance and you use tokens for years. Now that Global Tokens are available to you do the right thing and create your token {{my.copyright-year}} in the admin section as a global token. And you assign the value &#8220;2026&#8221; to it, because the year you live in is 2026. But once you do that, your already existing folder or program token {{my.copyright-year}} becomes overridden, because now it exists both as global and local token. But you don&#8217;t want the copyright year to be local anywhere, so what you need to do is delete it to become inherited again. But you can&#8217;t because it&#8217;s in use. Marketo Support has actually told me, that I have to delete all its occurrences to be able to delete it, but that&#8217;s outrageously bad advice. Not only would I need to delete it in x places, but also I would need to reinstate it to all assets after deleting the overridden status.<\/p>\n\n\n\n<p>This bug &#8211; I think it can only be called a bug, as this can&#8217;t be the desired behavior &#8211; is well known for over a decade, and I <a href=\"https:\/\/nation.marketo.com\/t5\/product-discussions\/how-to-delete-an-overridden-token\/td-p\/97876\">complained about it repeatedly<\/a>. But now very recently, Sanford Whiteman posted that you <a href=\"https:\/\/blog.teknkl.com\/deleting-the-non-deletable-clear-an-overridden-my-token-using-the-api\/\">can actually delete an overridden token via API<\/a>. That post might already give you all the information you need, but for the not so API-native users I wanted to explain the process a little more in detail and also add one caveat.<\/p>\n\n\n\n<p>Please see my <a href=\"https:\/\/www.martech-magic.com\/index.php\/2025\/03\/02\/marketo-api-for-non-api-people\/\" data-type=\"post\" data-id=\"278\">blog post on Postman<\/a> for fundamentals.<\/p>\n\n\n\n<p>First, get your authentication token from your instance. Second, create a new request &#8211; or clone any other you already have &#8211; and name it &#8220;Delete Token&#8221;. And as Sanford said, create send your payload to this URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/rest\/asset\/v1\/folder\/{:programId}\/tokens\/delete.json<\/code><\/pre>\n\n\n\n<p>In my setup this looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{base_url}}\/rest\/asset\/v1\/folder\/3629\/tokens\/delete.json<\/code><\/pre>\n\n\n\n<p>where 3629 is the ID of the program or folder I want to delete the token from. Note that this URL works for both the deletion of program and folder tokens.<\/p>\n\n\n\n<p>Remember that get the ID of a program or folder from the URL in the Marketo UI, which in this case is &#8220;1189&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"54\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2025\/11\/image.png\" alt=\"\" class=\"wp-image-388\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2025\/11\/image.png 652w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2025\/11\/image-300x25.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/figure>\n\n\n\n<p>And here&#8217;s the body for your request:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"280\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2025\/11\/image-1.png\" alt=\"\" class=\"wp-image-389\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2025\/11\/image-1.png 708w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2025\/11\/image-1-300x119.png 300w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n\n\n\n<p>Hit &#8220;Send&#8221; and your token is gone. And the caveat: You can not only delete overriden tokens which are in use this way, you can also delete <strong>any local token that is in use<\/strong>. So a little carefulness is in order. But that&#8217;s true for any Marketo action, right?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to delete a token that is in &#8220;overridden&#8221; state, Marketo doesn&#8217;t let you do it, as the token is in use. That&#8217;s a problem.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,8,15],"tags":[],"class_list":["post-385","post","type-post","status-publish","format-standard","hentry","category-api","category-tipps-tricks","category-tokens","entry"],"_links":{"self":[{"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts\/385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":4,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":392,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts\/385\/revisions\/392"}],"wp:attachment":[{"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}