---
title: "Create webhook"
method: POST
path: "/api/mail/v1/mailboxes/{mailboxId}/webhooks"
tags: ["Mail: Webhooks"]
---

# Create webhook

`POST /api/mail/v1/mailboxes/{mailboxId}/webhooks`

Create a webhook for the given mailbox. The generated secret is
returned only in this response and is sent as a bearer token with
every delivery.

## Path parameters

- `mailboxId` string, required

## Request body

- MailV1SchemaCreateWebhookRequestSchema
  - `name` string, required — Human-readable name for this webhook
  - `description` string, nullable — Optional description of the webhook's purpose
  - `events` string[], required — Events that trigger this webhook
  - `status` 'active' | 'disabled' | 'paused' — Initial status of the webhook
  - `url` string, required — Publicly reachable URL that receives the webhook POST requests

## Response `201`

Created response

- MailV1WebhooksWebhookCreatedResource
  - `id` string — Unique webhook identifier
  - `mailbox` MailV1WebhooksWebhookMailboxResource
    - `id` string
    - `address` string
  - `name` string — Human-readable name for this webhook
  - `description` string, nullable — Optional description of the webhook's purpose
  - `events` string[] — Events that trigger this webhook
  - `status` 'active' | 'disabled' | 'paused' — Current status of the webhook
  - `url` string — URL that receives webhook POST requests
  - `secret` string — One-time webhook secret, returned only on creation. Sent as `Authorization: Bearer <secret>` with every delivery.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Error response
- `401` — Unauthenticated response
- `404` — Error response
- `409` — Error response
- `422` — Error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/74abfea76e36/schema)
