For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create webhook

Create a webhook. The response includes the one-time secret — store it securely as it is never returned again.

Create webhook

post

Create a webhook. The response includes the one-time secret — store it securely as it is never returned again.

Authorizations
AuthorizationstringRequired

Bearer authentication using API tokens in the Authorization header.

Path parameters
mailboxResourceIdstringRequired

Resource ID of the managed mailbox the bearer token is authorized for.

Example: AC1a2b3c4d5e6f7g
Body

Body for creating a webhook.

namestring · max: 255Required

Human-readable webhook name.

Example: New message notifier
descriptionstring · nullableOptional

Optional free-text note about the webhook purpose.

Example: Notifies CRM on new mail
statusstring · enumOptional

Initial delivery state. Only active webhooks receive events.

Default: activeExample: activePossible values:
urlstring · uri · max: 2048Required

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).

Example: https://example.com/webhooks/incoming
Responses
201

Webhook created.

application/json

Single webhook payload including the one-time secret.

post/api/v1/mailboxes/{mailboxResourceId}/webhooks
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?