Create webhook
Create a webhook. The response includes the one-time secret — store it securely as it is never returned again.
Create a webhook. The response includes the one-time secret — store it securely as it is never returned again.
Bearer authentication using API tokens in the Authorization header.
Resource ID of the managed mailbox the bearer token is authorized for.
AC1a2b3c4d5e6f7gBody for creating a webhook.
Human-readable webhook name.
New message notifierOptional free-text note about the webhook purpose.
Notifies CRM on new mailInitial delivery state. Only active webhooks receive events.
activeExample: activePossible values: HTTPS endpoint that receives POST deliveries, authenticated with the webhook secret as Authorization: Bearer <secret>. Must be a public domain name (no IPs or internal hosts).
https://example.com/webhooks/incomingWebhook created.
Single webhook payload including the one-time secret.
Missing or invalid credentials.
Token is not authorized to manage the requested mailbox.
Request payload failed validation. params maps field name to an array of error messages.
Server-side failure.
Upstream service is unavailable or returned an unexpected response.
POST /api/v1/mailboxes/{mailboxResourceId}/webhooks HTTP/1.1
Host: api.mail.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 166
{
"name": "New message notifier",
"description": "Notifies CRM on new mail",
"events": [
"message.received"
],
"status": "active",
"url": "https://example.com/webhooks/incoming"
}{
"data": {
"id": "019683f8-1234-7abc-8def-0123456789ab",
"accountResourceId": "AC1a2b3c4d5e6f7g",
"mailbox": "user@example.com",
"name": "New message notifier",
"description": "Notifies our CRM when a new email arrives",
"events": [
"message.received"
],
"status": "active",
"url": "https://example.com/webhooks/incoming",
"createdAt": "2026-04-07T12:00:00+00:00",
"updatedAt": "2026-04-07T12:00:00+00:00",
"secret": "4a6f8b2d1e9c3f7a0b5d8e2c4f1a7b3d9e6c2f8a1b4d7e0c3f6a9b2d5e8c1f4"
}
}Last updated
Was this helpful?