POST
/webhooks
Create Webhook
Create a webhook endpoint for delivery and engagement events.
Create a webhook endpoint for delivery and engagement events.
curl -X POST "http://localhost:8080/v1/webhooks" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/mail",
"secret": "whsec_your_signing_secret",
"enabled": true,
"events": [
"email.sent",
"email.bounced"
]
}'
{
"data": {
"id": "wh_123",
"url": "https://example.com/webhooks/mail",
"enabled": true,
"events": [
"email.sent",
"email.delivered"
],
"created_at": "2026-06-09T21:20:46.820Z",
"updated_at": "2026-06-09T21:20:46.820Z",
"has_secret": true
}
}
{
"url": "https://example.com/webhooks/mail",
"secret": "whsec_your_signing_secret",
"enabled": true,
"events": [
"email.sent",
"email.bounced"
]
}