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

# Create a webhook

`POST /webhooks`

## Request

- Base URL: `https://warmysender.com/api/v1`
- URL: `https://warmysender.com/api/v1/webhooks`
- Auth: HTTP bearer

Registers a webhook endpoint for one or more event types. The signing secret (whsec_…) is returned ONCE in this response — store it; you'll use it to verify payload signatures.

Required scope: `webhooks:write`.

Requires a unique `Idempotency-Key` request header so retries never duplicate.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `url` string, uri, required: HTTPS URL that receives POST deliveries.
  - `events` string[], required: Event types to subscribe to (see Webhook Events).

## Response `201`

Success

## Other responses

- `400`: `validation_error` — Invalid URL or unknown event type.
- `401`: `unauthorized` — Missing or invalid API key.
- `403`: `insufficient_scope` — The API key lacks the scope this endpoint requires.
- `429`: `rate_limited` — Too many requests — slow down and retry after the Retry-After delay.

---

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