POST
/
webhooks
curl --request POST \
  --url https://console.sendlayer.com/api/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "Event": "delivery",
  "WebhookURL": "www.example.com"
}'
{
  "NewWebhookID": 972
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Below is the JSON payload required for creating a new webhook. Be sure to replace the example URL with your webhook URL and choose a valid webhook event from the following options: `bounce`,`click`, `open`, `unsubscribe`, `complaint`, `delivery`.

The body is of type object.

Response

200 - application/json
OK A successfully created webhook returns the `NewWebhookID`

A successfully created webhook returns the NewWebhookID