You are here

function MCAPI::listWebhookAdd in Mailchimp 6.2

Same name and namespace in other branches
  1. 7 MCAPI.class.php \MCAPI::listWebhookAdd()

Add a new Webhook URL for the given list

Related

Parameters

string $id the list id to connect to. Get by calling lists():

string $url a valid URL for the Webhook - it will be validated. note that a url may only exist on a list once.:

array $actions optional a hash of actions to fire this Webhook for: boolean subscribe optional as subscribes occur, defaults to true boolean unsubscribe optional as subscribes occur, defaults to true boolean profile optional as profile updates occur, defaults to true boolean cleaned optional as emails are cleaned from the list, defaults to true boolean upemail optional when subscribers change their email address, defaults to true

array $sources optional a hash of sources to fire this Webhook for: boolean user optional user/subscriber initiated actions, defaults to true boolean admin optional admin actions in our web app, defaults to true boolean api optional actions that happen via API calls, defaults to false

Return value

bool true if the call succeeds, otherwise an exception will be thrown

File

./MCAPI.class.php, line 1295

Class

MCAPI

Code

function listWebhookAdd($id, $url, $actions = array(), $sources = array()) {
  $params = array();
  $params["id"] = $id;
  $params["url"] = $url;
  $params["actions"] = $actions;
  $params["sources"] = $sources;
  return $this
    ->callServer("listWebhookAdd", $params);
}