Skip to main content
November 12, 2015
Question

Unsubscribe for net new email address using Marketo's REST API

  • November 12, 2015
  • 2 replies
  • 2854 views

I want to build a custom Unsubscribe form that uses the Marketo REST API to make it happen. Easy enough to update an existing lead but what if the email address is net new? We believe we have a legal obligation to get them loaded up in the Durable Unsubscribe​ list even though they aren't a lead. Any way to do that directly? We tried a very simple upsert with email address and unsubscribe set to true but the API returned "skipped" and left us wondering if that meant the API was being totally awesome and wrote to the Durable Unsubscribe list or if it didn't like our attempt at all. Anyone know? Anyone know how to get visibility into our Durable Unsubscribe list? If I could do that I'd be able to double check that whatever method I'm using is working properly.

Since we don't want these to count against our DB Size, my back up plan is to create a new lead explicitly, set Unsubscribe to True, wait a couple hours and then delete it. I feel confident that will meet all my requirements but leaves me wishing for a simpler operation. Maybe unsubscribe should be a first class API call.

I opened a support ticket too so if I learn something there I'll update here.

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

2 replies

Grégoire_Miche2
Level 10
November 12, 2015

Hi David

@Sanford Whiteman​ would tell you : NEVER use the rest API from a client side code, including a form. It enable Do Attacks very easily.

Now, when you mark a lead as "unsubscribed" (field : unsubscribed, value = True), the email address will be automatically loaded to the durable unsubscribed list, including from the API. SeeDurable Unsubscribe

-Greg

SanfordWhiteman
Level 10
November 12, 2015

Thanks, Greg. You knew I was about to say it. Moreover, there is no reason to even be tempted to use the API here. A Marketo native form post (or custom form post to the endpoint) by definition performs an upsert.

Grégoire_Miche2
Level 10
December 1, 2015