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

# Create a webhook subscription

`POST /api/v1/webhooks`

## Headers

- `Authorization` string, required

## Request body

- CreateWebhookRequest
  - `targetUrl` string, uri, required — HTTPS only; not a private/loopback host.
  - `eventTypes` CreateWebhookRequestEventTypesItems[], required

## Response `201`

The created subscription. The full signing secret is included once here.

- WebhooksCreateWebhookResponse201
  - `webhook` WebhookSubscription
    - `id` string
    - `targetUrl` string, uri
    - `eventTypes` string[] — ["*"] for all events, or explicit types.
    - `secretMasked` string — Masked secret. Full value via the create response or the /secret endpoint.
    - `lastPingSucceededAt` string, date-time, nullable
    - `createdAt` string, date-time

## Other responses

- `400` — The request body failed validation.
- `401` — Missing or invalid API key.

---

[API](https://skmtc.net/getdial/apis/rest-api.md) · [All operations](https://skmtc.net/getdial/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getdial/rest-api/revisions/5f4eb30ac29a/schema)
