« Back to Documentation OverviewlistWebhookAdd – v1.3
listWebhookAdd(string apikey, string id, string url, array actions, array sources)
Add a new Webhook URL for the given list
| Parameters | | apikey | a valid API Key for your user account. Get by visiting your API dashboard |
| id | the list id to connect to. Get by calling lists() |
| url | a valid URL for the Webhook - it will be validated. note that a url may only exist on a list once. |
| actions | optional - a hash of actions to fire this Webhook for| bool | subscribe | optional - as subscribes occur, defaults to true | | bool | unsubscribe | optional - as subscribes occur, defaults to true | | bool | profile | optional - as profile updates occur, defaults to true | | bool | cleaned | optional - as emails are cleaned from the list, defaults to true | | bool | upemail | optional - when subscribers change their email address, defaults to true | | bool | campaign | option when a campaign is sent or canceled, defaults to true |
|
| sources | optional - a hash of sources to fire this Webhook for| bool | user | optional - user/subscriber initiated actions, defaults to true | | bool | admin | optional - admin actions in our web app, defaults to true | | bool | api | optional - actions that happen via API calls, defaults to false |
|
| Returns | | bool |
true if the call succeeds, otherwise an exception will be thrown |