---
title: "Create webhook endpoint"
method: POST
path: "/v1/webhooks"
tags: ["Webhooks"]
---

# Create webhook endpoint

`POST /v1/webhooks`

## Request

- Base URL: `https://api.winnr.app`
- URL: `https://api.winnr.app/v1/webhooks`
- Auth: HTTP bearer

Register a webhook endpoint. Winnr will POST signed event notifications
to the URL for every subscribed event type.

The response includes the endpoint's signing `secret` (`whsec_...`).
Unlike API tokens, the secret can be retrieved again later via
`GET /v1/webhooks/{webhook_id}/secret`.

Maximum 10 endpoints per account.

## Request body

- CreateWebhookRequest
  - `url` string, uri, required: Destination URL. Must be HTTPS.
  - `events` string[], required: Event types to subscribe to, or `["*"]` for all events
  - `description` string: Optional human-readable label

## Response `201`

Webhook endpoint created

- object
  - `data` object: A webhook endpoint. Winnr POSTs signed event notifications to `url` for every subscribed event type. Maximum 10 endpoints per account.
    - `id` string: Webhook endpoint ID
    - `url` string, uri: Destination URL. Must be HTTPS.
    - `description` string, nullable: Optional human-readable label (max 200 chars)
    - `events` string[]: Subscribed event types, or `["*"]` for all events. `"*"` cannot be combined with specific events. Valid types: `message.relayed`, `email.received`, `email.bounced`, `email.complained`, `domain.created`, `domain.ready`, `domain.dns_failed`, `email_user.created`, `email_user.deleted`. (`test.ping` is always deliverable regardless of subscription.)
    - `status` 'enabled' | 'disabled' | 'auto_disabled': `auto_disabled` is set by Winnr after 25 consecutive failed events. Set `enabled` via PATCH to resume deliveries (this also resets `consecutive_failures`).
    - `disabled_reason` string, nullable: Why the endpoint was auto-disabled (null otherwise)
    - `secret_hint` string: Last few characters of the signing secret, for display
    - `api_version` string: Event payload version delivered to this endpoint
    - `consecutive_failures` integer: Consecutive failed events (resets to 0 on success or re-enable)
    - `last_delivery_at` string, date-time, nullable: When the most recent delivery attempt finished
    - `last_delivery_status` string, nullable: Outcome of the most recent delivery attempt
    - `last_success_at` string, date-time, nullable: When a delivery last succeeded
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `secret` string: Signing secret (`whsec_...`). Also retrievable later via the secret endpoint.
  - `meta` Meta
    - `request_id` string
    - `timestamp` string, date-time

## Other responses

- `400`: Validation error
- `401`: Authentication required or token invalid

---

[API](https://skmtc.dev/winnr/apis/winnr-api.md) · [All operations](https://skmtc.dev/winnr/apis/winnr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/winnr/apis/winnr-api/revisions/a4f960beb1eb?raw)
