{"id":418,"date":"2026-04-01T11:02:42","date_gmt":"2026-04-01T11:02:42","guid":{"rendered":"https:\/\/www.martech-magic.com\/?p=418"},"modified":"2026-04-01T11:02:42","modified_gmt":"2026-04-01T11:02:42","slug":"marketo-api-for-non-api-people-ii","status":"publish","type":"post","link":"https:\/\/www.martech-magic.com\/index.php\/2026\/04\/01\/marketo-api-for-non-api-people-ii\/","title":{"rendered":"Marketo API for non-API people (II)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Recently, a client of mine asked to change all email address domains for a specific company due to a renaming: <em>@moon-global.com<\/em> should become <em>@sun-global.com<\/em> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How would you tackle that in the Marketo UI? That is a problem because in many ways the email address serves as the unique identifier for a person record. Specifically for list uploads or form submissions. So what can you do?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, you can change a person record manually. Just type in a new email address. No new record is created and the activity history, program memberships and so on stay intact. Also, if that person is synced to CRM, the email address will just be exchanged in CRM as well. CRM IDs remain the same.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Okay, that&#8217;s fine. What else?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can upload a list while having the old email address in the standard field <em>email <\/em>and the new address in a new custom field like <em>email temp<\/em>, and then run a Change Data Value Flow Step to copy <em>email temp<\/em> to <em>email<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"145\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-5.png\" alt=\"\" class=\"wp-image-426\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-5.png 857w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-5-300x51.png 300w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-5-768x130.png 768w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But I suppose if you read this, you already know that. And we&#8217;re here to learn something new, right?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s see how you can do that using the Marketo API and Postman. (And here I&#8217;d like to encourage you to read my first article on the topic: <a href=\"https:\/\/www.martech-magic.com\/index.php\/2025\/03\/02\/marketo-api-for-non-api-people\/\">Marketo API for non-API people<\/a>.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s take a look at the <em>createOrUpdate<\/em> operation in Postman:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{  \n    \"action\":\"createOrUpdate\",\n    \"lookupField\":\"email\",\n    \"input\": &#91;\n    {\n      \"email\": \"michael@martech-magic.com\",\n      \"firstname\": \"Michael\",\n      \"lastName\": \"Florin\"\n\n    }\n  ]\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This would create or update a person in Marketo while deduping on email address. We would achieve the exact same outcome by uploading a list or submitting a form.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But via API we can also dedupe on Marketo&#8217;s real unique identifier: The Person ID:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"105\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image.png\" alt=\"\" class=\"wp-image-421\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image.png 752w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-300x42.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You will also find that Person ID in the URL on the person detail page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-2-1024x333.png\" alt=\"\" class=\"wp-image-423\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-2-1024x333.png 1024w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-2-300x98.png 300w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-2-768x250.png 768w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-2.png 1288w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now let&#8217;s use this payload:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{  \n   \"action\":\"createOrUpdate\",\n   \"lookupField\":\"id\",\n   \"input\": &#91;\n    {\n      \"id\": 2072,\n      \"email\": \"cfaircliff@sun-global.com\"\n    }\n  ]\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now we switched the lookup field to id, also added the id to the payload. We removed First and Last Name, as we don&#8217;t want to touch these.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the response:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"requestId\": \"e0ac#19d482fc0fc\",\n    \"result\": &#91;\n        {\n            \"id\": 2072,\n            \"status\": \"updated\"\n        }\n    ],\n    \"success\": true\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">ID was updated and the operation was a success. Yeah!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s take a look at Marketo&#8217;s person detail page and activity history:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"292\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-3-1024x292.png\" alt=\"\" class=\"wp-image-424\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-3-1024x292.png 1024w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-3-300x85.png 300w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-3-768x219.png 768w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-3.png 1292w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"232\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-4.png\" alt=\"\" class=\"wp-image-425\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-4.png 961w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-4-300x72.png 300w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-4-768x185.png 768w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Okay, now it&#8217;s time to hit an ugly truth: I just learned that Postman doesn&#8217;t allow the uploading of files within its free plan. The idea would have been this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a Smart List in Marketo to find all records you want to update:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"110\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-6.png\" alt=\"\" class=\"wp-image-430\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-6.png 897w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-6-300x37.png 300w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-6-768x94.png 768w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Export from the People tab. I usually create a minimalistic view for this, as I only want to download the fields I need:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"185\" src=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-7.png\" alt=\"\" class=\"wp-image-431\" srcset=\"https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-7.png 419w, https:\/\/www.martech-magic.com\/wp-content\/uploads\/2026\/04\/image-7-300x132.png 300w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Export to CSV. Open the file, copy the content and paste it into a csv-to-json converter. And then just ran the call from Postman like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{  \n   \"action\":\"updateOnly\",\n   \"lookupField\":\"id\",\n   \"input\": &#91;\n  {\n    \"id\": 2067,\n    \"email\": \"bstanbrab7@sun-global.com\"\n  },\n  {\n    \"id\": 2072,\n    \"email\": \"cfaircliff@sun-global.com\"\n  },\n  {\n    \"id\": 2094,\n    \"email\": \"arodderbo@sun-global.com\"\n  }\n]\n}<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Well, I have to admit that this is no longer a quick and cool process. It&#8217;s tedious, so I need to apologize. Anyway: I&#8217;ll publish this post, as you might find something in here that&#8217;s new to you. And that would be a success, wouldn&#8217;t it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This time, we start using the Marketo API for an operation that can&#8217;t be done using the UI. And we start using it at scale.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-418","post","type-post","status-publish","format-standard","hentry","category-api","entry"],"_links":{"self":[{"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts\/418","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=418"}],"version-history":[{"count":7,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":433,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/posts\/418\/revisions\/433"}],"wp:attachment":[{"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.martech-magic.com\/index.php\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}