Update Webhook (webhook - UpdateWebhook)

Update Webhook.


/**
 * Webhook::UpdateWebhook
 *
 *  Update a webhook
 *      unspecified parameters are not changed
 *
 *  id      [int, required - int]: id of webhook to be modified
 *  event   [open|click|bounce|unsubsribe|complaint, optional]: event type
 *  url     [string, optional]: url to catch event posts
 *  name    [string, optional]: webhook identifier, unique for user
 *  enabled [bool, optional]: enable the webhook
 */
{
  "username": "matbt@pinpointe.com",
  "usertoken": "***",
  "requesttype": "Webhook",
  "requestmethod": "UpdateWebhook",
  "details": {
    "id": "{*int*}", /* required */
    "event": "{*event_type*}",
    "url": "{*url*}",
    "name": "{*name*}",
    "enabled": "{*bool*}"
  }
}


JSON Request Example:



json_request element


Field NameDescription
usernameUsername used to login to Pinpointe
usertokenUnique token assigned to Pinpointe account
requesttypeWebhook
requestmethodUpdateWebhook


details element


Field NameDescription
id
(required)
Webhook id that needs tested 
eventType of event (open, click, bounce, unsubscribe, complaint)
urlURL to catch event posts 
nameUnique name for webhook 
enabledEnable the webhook (TRUE, FALSE) 


Successful Response


response element


Field NameDescription
statusReturns SUCCESS when successful


Unsuccessful Response


response element


Field NameDescription
statusReturns FAILED when unsuccessful
errormessageText explaining why webhook deletion failed