Webhooks

Create webhook

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

post/api/v1/mailboxes/{mailboxResourceId}/webhooks

Request

  • Base URL: https://api.mail.hostinger.com
  • URL: https://api.mail.hostinger.com/api/v1/mailboxes/{mailboxResourceId}/webhooks
  • Auth: HTTP bearer

Path parameters

mailboxResourceIdstring required

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

Request body

namestring required

Human-readable webhook name.

descriptionstring nullable

Optional free-text note about the webhook purpose.

eventsstring[] required

Event types that trigger a delivery.

status'active' | 'paused' | 'disabled'

Initial delivery state. Only active webhooks receive events.

urlstring uri required

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 request

{
  "name": "New message notifier",
  "description": "Notifies CRM on new mail",
  "events": [
    "message.received"
  ],
  "status": "active",
  "url": "https://example.com/webhooks/incoming"
}

Response

Webhook created.

Example response

{
  "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"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.