subscribe a contact to a list using an icontact API is not working

93 Views Asked by At

I used this bellow code to unsubscribe a contact from a list. but after I have done it. I can't subscribe it again to that list. anyboday know why ? or anyway I can do this ?

public function subscriptionStatus($subscriptionId,$sStatus = 'normal') {
    // Valid statuses
    $aValidStatuses = array('normal', 'pending', 'unsubscribed');
    // Setup the subscription and make the call
    $aSubscriptions = $this->makeCall("/a/{$this->setAccountId()}/c/{$this->setClientFolderId()}/subscriptions/{$subscriptionId}", 'POST', 

        array('status'    => $sStatus), 'subscriptions');
    // Return the subscription
    return $aSubscriptions;
}
0

There are 0 best solutions below