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

# Create a webhook endpoint

`POST /api/webhooks`

## Request

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

Create a webhook endpoint. The signing secret is returned once, in this response, and never again; rotate it to get a new one. Up to 10 endpoints per workspace.

## Headers

- `Api-Version` '1'

## Request body

- WebhookEndpointCreate
  - `description` string
  - `eventTypes` string[]: Omit or send empty to receive every event type.
  - `url` string, uri, required: Public HTTPS URL. Private and loopback addresses are refused.
  - `workspaceId` string, uuid, required

## Response `201`

The endpoint and its secret.

- object
  - `endpoint` WebhookEndpoint, required
    - `consecutiveFailures` integer, required
    - `createdAt` string, date-time, required
    - `description` string, required
    - `disabledAt` string, date-time, nullable
    - `disabledReason` string, nullable
    - `enabled` boolean, required
    - `eventTypes` string[], required: Empty means every event type.
    - `id` string, uuid, required
    - `updatedAt` string, date-time, required
    - `url` string, uri, required
    - `workspaceId` string, uuid, required
  - `ok` boolean, required
  - `secret` string, required: `whsec_`-prefixed signing secret. Shown once.

## Other responses

- `402`: Endpoint limit reached.
- `503`: Webhooks are not configured on this deployment.

---

[API](https://skmtc.dev/donebear/apis/done-bear-api.md) · [All operations](https://skmtc.dev/donebear/apis/done-bear-api/llms.txt) · [OpenAPI document](https://skmtc.dev/donebear/apis/done-bear-api/revisions/91de7e02be0d?raw)
