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

# Create a webhook

`POST /webhooks`

## Request

- Base URL: `https://corebee.ai/api/v1`
- URL: `https://corebee.ai/api/v1/webhooks`
- Auth: HTTP bearer

Requires url and a non-empty events array. A signing secret is auto-generated (and stored encrypted) when not supplied.

## Request body

- WebhookCreate
  - `url` string, uri, required
  - `events` string[], required
  - `secret` string: Optional HMAC signing secret. Auto-generated and stored encrypted when omitted.
  - `enabled` boolean

## Response `201`

Created

- object
  - `data` Webhook, required
    - `id` string, uuid
    - `org_id` string, uuid
    - `url` string, uri
    - `events` string[]
    - `is_active` boolean
    - `created_at` string, date-time

## Other responses

- `400`: Validation error
- `401`: Invalid or missing credential

---

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