Skip to main content
Best answer

What is the correct return value for perform Unsubscribe?

  • June 23, 2022
  • 1 reply
  • 145 views

All of the examples for unsubscribing a REST HOOK, including the code generated from the form based app, show the function returning a value, for instance:
https://github.com/zapier/zapier-platform/blob/master/example-apps/rest-hooks/triggers/recipe.js
 

Unfortunately all of the examples merely show passing through the return from the web request without any particular detail and as far as I can find it is nowhere documented what the upstream code *expects* to be returned here or what the implications of various options are. 

Does the the return value of this function actually do anything?

Best answer by ZaneBest answer by Zane

I don’t think Zapier is doing anything with the body from the unsubscribe response. I think Zapier will, at most, just look for a 200 status to ensure the unsubscribe request didn’t fail. Unsubscribe is called when the Zap is paused… so there wouldn’t be anything in the workflow to pass that data to, and the subscription on Zapier’s side is gone at that point. 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Forum|alt.badge.img+9
  • Zapier Staff
  • 331 replies
  • Answer
  • June 30, 2022

I don’t think Zapier is doing anything with the body from the unsubscribe response. I think Zapier will, at most, just look for a 200 status to ensure the unsubscribe request didn’t fail. Unsubscribe is called when the Zap is paused… so there wouldn’t be anything in the workflow to pass that data to, and the subscription on Zapier’s side is gone at that point.