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

# Create a webhook

`POST /webhooks`

Create a new webhook endpoint. Maximum 10 webhooks per user.
The webhook secret is only returned on creation - save it securely.

## Request body

- object
  - `name` string, required — Friendly name for the webhook
  - `url` string, uri, required — HTTPS URL to receive webhook events
  - `events` string[], required — Events to subscribe to. token.expiring is defined but not currently dispatched; post.demoted fires when an attach/detach returns a scheduled group to draft.

## Response `201`

Webhook created

- object
  - `success` boolean
  - `webhook` object
    - `_id` string
    - `name` string
    - `url` string
    - `events` string[]
    - `secret` string — Webhook secret for signature verification (only returned on create)
    - `isActive` boolean
    - `createdAt` string, date-time

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.dev/publora/apis/publora-api.md) · [All operations](https://skmtc.dev/publora/apis/publora-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/publora/publora-api/revisions/a1534a88d80a/schema)
