The URL to receive webhook events.
Events to subscribe to: email.sent, email.delivered, email.opened, email.clicked, email.bounced, email.complained.
Request
curl -X POST https://www.unosend.co/api/v1/webhooks \
-H "Authorization: Bearer un_xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/unosend",
"events": ["email.delivered", "email.bounced"]
}'
Response
{
"id": "wh_123",
"url": "https://yourapp.com/webhooks/unosend",
"events": ["email.delivered", "email.bounced"],
"signing_secret": "whsec_abc123...",
"created_at": "2024-01-15T10:30:00.000Z"
}
Store the signing_secret securely. It’s only shown once and is used to verify webhook signatures.