Webhook resource#
The webhooks enables receiving of real-time feedback of email events such as: sent, opened, clicked, bounced, marked as spam, unsubscribed, blocked. This is done by defining an url on your domain that will be called on each email event.
Required API Scopes: account_management
Get webhooks#
Get current webhook url (endpoint) and email events.
Request
GET /account/webhook
Response
{
"endpoint": "http:\\/\\/yourdomain.com\\/hook"
"actions": {
"sent": 0,
"bounce": 1,
"click": 0,
"open": 1,
"spam": 0,
"unsub": 1,
"block": 1
}
}
Modify webhooks#
Modify webhooks settings.
Request
POST /account/webhook
Request Body
{
"endpoint": "http:\\/\\/yourdomain.com\\/hook",
"actions": {
"sent": 1,
"bounce": 1,
"click": 0,
"open": 1,
"spam": 0,
"unsub": 1,
"block": 1
}
}
Response
{
"status":"saved"
}