---
title: "Create Webhook"
method: POST
path: "/api/v1/webhooks"
tags: ["Webhooks"]
---

# Create Webhook

`POST /api/v1/webhooks`

Register a new webhook subscription.

Creates or updates a webhook subscription for the authenticated client.
A secret will be auto-generated for signature verification.
If a subscription already exists for the same event_type and webhook_url,
it will be updated with a new secret.

Requires x-api-key header.

Returns the subscription details including the secret (only shown once on creation).

## Headers

- `x-api-key` string, nullable

## Request body

- WebhookSubscriptionRequest — Request schema for creating a webhook subscription.
  - `event_type` 'video.completed' | 'video.failed', required — Supported webhook event types.
  - `webhook_url` string, uri, required — The URL to send webhook payloads to

## Response `200`

Successful Response

- WebhookSubscriptionResponse — Response schema for webhook subscription operations.
  - `id` integer, required — Webhook subscription ID
  - `event_type` 'video.completed' | 'video.failed', required — Supported webhook event types.
  - `webhook_url` string, required — The webhook URL
  - `secret` string, nullable — Auto-generated secret for signature verification (only shown on creation)
  - `is_active` boolean, required — Whether the subscription is active
  - `created_at` string, date-time, required — When the subscription was created

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/preciser/apis/preciser-data-management-api.md) · [All operations](https://skmtc.net/preciser/apis/preciser-data-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/preciser/preciser-data-management-api/versions/42cb7b14430f/schema)
