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

# Create a webhook

`POST /v1/webhooks`

Create a new webhook endpoint to receive real-time event notifications. **Requires a secret key (sk_).**

**Important:** The `secret` is only returned once on creation. Save it
immediately for HMAC signature verification. Public keys (pk_) cannot access this endpoint.

**Signature verification:**
```javascript
const signature = crypto
  .createHmac('sha256', secret)
  .update(JSON.stringify(payload))
  .digest('hex');
// Compare with X-Drip-Signature header
```

## Request body

- object — Request body for creating a webhook endpoint.
  - `url` string, uri, required — HTTPS endpoint URL. Must be publicly accessible and return 200 OK within 30 seconds.
  - `events` string[], required — Event types to subscribe to. Use ["*"] for all events.
  - `description` string — Optional description to help identify this webhook

## Response `201`

Webhook created

- object — Webhook created
  - `id` string — Unique webhook identifier
  - `url` string, uri — Your webhook endpoint
  - `events` string[] — Subscribed event types
  - `description` string, nullable — Optional description
  - `isActive` boolean — Whether the webhook is active
  - `secret` string — HMAC secret for signature verification. SAVE THIS - it will not be shown again!
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `message` string — Reminder to save the secret

## Other responses

- `400` — Invalid URL or events
- `401` — Unauthorized
- `403` — Forbidden

---

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