Create event destination
Add a webhook destination to a configuration set. Events from sends
referencing the config set will be POSTed to your URL, with an HMAC
signature when you set a webhook_secret.
POST
/api/v1/partner/email/configuration-sets/:id/event-destinations
Request body
json
{
"name": "production-webhook",
"destination_type": "WEBHOOK",
"webhook_url": "https://yourapp.com/webhooks/email",
"webhook_secret": "your-shared-secret-min-16-chars",
"matching_event_types": ["send", "delivered", "bounce", "complaint", "open", "click"],
"enabled": true
}The URL has to be a public address: loopback, private and link-local addresses are refused when we call them, and we do not follow redirects.
Valid event types:
send,delivered,bounce,complaintopen,click,reject,delivery_delay
Response
json
{
"success": true,
"destination_id": "550e8400-...",
"name": "production-webhook",
"webhook_url": "https://yourapp.com/webhooks/email",
"matching_event_types": ["send", "delivered", "bounce", "complaint", "open", "click"],
"enabled": true
}cURL
bash
curl https://api.splashifypro.com/api/v1/partner/email/configuration-sets/550e8400-.../event-destinations \
-H "Authorization: Bearer $SPLASHIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "production-webhook",
"destination_type": "WEBHOOK",
"webhook_url": "https://yourapp.com/webhooks/email",
"webhook_secret": "...",
"matching_event_types": ["send", "delivered", "bounce", "complaint", "open", "click"]
}'