This API will remove current subscriber from given segment. it will return true or false
var segment = 'YourSegmentName'; var toBeReturn = _pa_removeSubscriberFromSegment(segment); console.log(toBeReturn); //return true/false var thenProm = toBeReturn.then(function(value){ console.log(value); });