curl --location 'https://api.zapmail.ai/api/v2/webhooks/endpoints' \
--header 'x-auth-zapmail;' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/hooks/zapmail",
"enabled_events": [
"domain.updated",
"mailbox.updated"
]
}'{
"status": 201,
"message": "Webhook endpoint created",
"data": {
"id": "uuid",
"url": "https://example.com/webhooks/zapmail",
"enabled_events": [
"domain.updated",
"mailbox.updated"
],
"status": "active",
"secret": "whsec_123456",
"created_at": "2026-07-21T00:00:00.000Z",
"updated_at": "2026-07-21T00:00:00.000Z"
}
}