Skip to content

Create a webhook

POST /webhooks

Register a URL to receive event notifications. The response includes a signing_secret (shown once) — use it to verify webhook signatures.

FieldTypeRequiredDescription
urlstringyesTarget URL (max 2048 chars). Must be HTTPS in production.
eventsstring[]yesEvent names to subscribe to. See Event types.
Terminal window
curl -X POST https://mail.3ava.com/api/webhooks \
-H "Authorization: Bearer am_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/amdy",
"events": ["email.delivered", "email.bounced", "email.complained"]
}'
{
"id": "wh_a1b2...",
"url": "https://yourapp.com/webhooks/amdy",
"events": ["email.delivered", "email.bounced", "email.complained"],
"signing_secret": "whsec_XnK8pQrS...",
"is_active": true,
"created_at": "2026-04-22T22:30:00Z"
}