webhookUpdate
public static bool webhookUpdate(string token, array webhookDetails)
Update a existing Webhook for the contact list. Return the status of Webhook Update.
Section
Webhook Related Methods

Parameters
string tokenA valid token for your account. To generate a token, use the login method.
array webhookDetailsThe array containing the email details.
string idThe webhook ID to update. You can get the webhook from webhookGet
string contact_list_idThe contact list ID to whom this webhook is to be Update. You can get the contact lists from listGet
string subscribesUse TRUE/FALSE or YES/NO or 1/0 value for "Subscribe" type of updates
string unsubscribesUse TRUE/FALSE or YES/NO or 1/0 value for "Unsubscribe" type of updates
string profile_updatesUse TRUE/FALSE or YES/NO or 1/0 value for "Profile Updates" type of updates
string cleaned_addressUse TRUE/FALSE or YES/NO or 1/0 value for "Cleaned Address" type of updates
string email_changedUse TRUE/FALSE or YES/NO or 1/0 value for "Email Changed" type of updates

Returns
boolReturns true if the webhook was Update.


Examples
download example code
xmlrpc_webhookUpdate.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10.  
  11. /**
  12. Fetch the latest contact list ID, so we can retrieve the target contact list ID.
  13. **/
  14. $contactList = $client->listGet($token, "", 1, 1, "", "");
  15. $listID = $contactList[0]['id'];
  16.  
  17. /**
  18. Fetch the latest Webhook ID
  19. **/
  20.  
  21. $webhookList = $client->webhookGet($token,$listID);
  22. $webhookID = $emailList[0]['id'];
  23.  
  24. $emailDetail['id'] = $webhookID;
  25. $webhookDetails['contact_list_id'] = $listID;
  26. $webhookDetails['subscribes'] = 'TRUE or FALSE';
  27. $webhookDetails['unsubscribes'] = 'TRUE or FALSE';
  28. $webhookDetails['profile_updates'] = 'TRUE or FALSE';
  29. $webhookDetails['email_changed'] = 'TRUE or FALSE;
  30. $webhookDetails['cleaned_address'] = 'TRUE or FALSE';
  31. $webhookDetails['url'] = 'Webhook URL';
  32. $allOk = $client->webhookUpdate($token, $webhookDetail);
  33. ?>