public function registerMainWebhook($listId, $webhookurl)
    {
        // Configure webhook
        $subscribeWebhook = [
            'url' => $webhookurl,
            'events' => [
                'subscribe'   => true,
                'unsubscribe' => true,
                'profile'     => true,
                'cleaned'     => true,
                'upemail'     => true,
                'campaign'    => true
            ],
            'sources' => [
                'user'  => true,
                'admin' => true,
                'api'   => false // to avoid double (infinite loop) update (update an subscriber with the API and the webhook reupdate the user, ...)
            ]
        ];

        return $this->addWebhook($listId, $subscribeWebhook);
    }
public function registerMainWebhook($listId, $webhookurl)
    {
        // Configure webhook
        $subscribeWebhook = [
            'url' => $webhookurl,
            'events' => [
                'subscribe'   => true,
                'unsubscribe' => true,
                'profile'     => true,
                'cleaned'     => true,
                'upemail'     => true,
                'campaign'    => true
            ],
            'sources' => [
                'user'  => true,
                'admin' => true,
                'api'   => false // to avoid double (infinite loop) update (update an subscriber with the API and the webhook reupdate the user, ...)
            ]
        ];

        return $this->addWebhook($listId, $subscribeWebhook);
    }
public function registerMainWebhook ( $ listId , $ webhookurl ) { // Configure webhook $ subscribeWebhook = [ 'url' => $ webhookurl , 'events' => [ 'subscribe' => true , 'unsubscribe' => true , 'profile' => true , 'cleaned' => true , 'upemail' => true , 'campaign' => true ] , 'sources' => [ 'user' => true , 'admin' => true , 'api' => false // to avoid double (infinite loop) update (update an subscriber with the API and the webhook reupdate the user, ...) ] ] ; return $ this -> addWebhook ( $ listId , $ subscribeWebhook ) ; }
Automatically configure Webhook for a list
@param string $listId
@param string $webhookurl
@return array
Automatically configure Webhook for a list