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

# Create a webhook

`POST /webhook/create`

## Request

- Base URL: `https://apisign.io/api`
- URL: `https://apisign.io/api/webhook/create`
- Auth: API key in header `x-api-key`

Create a webhook endpoint. The signing secret is returned only in this response.

## Request body

- CreateWebhookRequest
  - `name` string, required
  - `url` string, uri, required
  - `events` WebhookEventType[], required
  - `headers` object: Extra headers sent with each delivery

## Response `200`

Webhook created

- object
  - `webhook` object
    - `id` string
    - `name` string
    - `url` string, uri
    - `events` WebhookEventType[]
    - `status` 'active' | 'inactive' | 'failed'
    - `secret` string: Signing secret. Shown only once.
    - `createdAt` string, date-time
  - `message` string

## Other responses

- `400`: Invalid request, or the action is not allowed in the resource's current state
- `401`: Missing, invalid, expired or deleted API key. Body: `{ "error": "Unauthorized" }`
- `500`: Internal server error (also returned for a request body that is not valid JSON)

---

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