Create a Webhook.
/**
* Webhook::CreateWebhook
*
* Create a webhook
*
* event [open|click|bounce|unsubsribe|complaint, required]: event type
* url [string, required]: url to catch event posts
* name [string, required]: webhook identifier, unique for user
* enabled [bool, optional, default false]: enable the webhook immediately
*/
{
"username": "{*user*}",
"usertoken": "{*token*}",
"requesttype": "Webhook",
"requestmethod": "CreateWebhook",
"details": {
"event": "{*event_type*}", /* required */
"url": "{*string*}", /* required */
"name": "{*string*}", /* required */
"enabled": "{*bool*}"
}
}JSON Request Example:

json_request element
| Field Name | Description |
| username | Username used to login to Pinpointe |
| usertoken | Unique token assigned to Pinpointe account |
| requesttype | Webhook |
| requestmethod | CreateWebhook |
details element
| Field Name | Description |
| event (required) | Event Type (Required)(open, click, bounce, unsubscribe, complaint) |
| url (required) | URL that catches event posts (Required) |
| name (required) | Webhook identifier that's unique for the user (Required) |
| enabled (required) | Enable the webhook (TRUE, FALSE) |
Successful Response
response element
| Field Name | Description |
| status | Returns SUCCESS when successful |
Unsuccessful Response
response element
| Field Name | Description |
| status | Returns FAILED when unsuccessful |
| errormessage | Text explaining why webhook creation failed |