Forum Discussion

Gursimrat's avatar
Gursimrat
Leader
11 years ago

Bookmark, float a thread using REST API

I am trying to make POST request to bookmark/ float a thread using following code, but when I check the thread, nothing happens. Below is the code, the requirements is that I want to make a custom button on the category page corresponding to each thread to let user bookmark, subscribe to email. Let me know if there is a workaround for this.

 

<@liaAddScript>
(function( $ ) {
$(document).ready(function(){

$.post("http://community.demo.com/restapi/vc/threads/id/89/subscriptions/users/self/add",
    {
      subscription_type:"bookmark"
    },
    function(data){
		console.log("Success");
    });

});
})(LITHIUM.jQuery);
</@liaAddScript>