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

# Create Webhook

`POST /api/v1/webhooks`

## Request

- Base URL: `https://app.kaminari.ad`
- URL: `https://app.kaminari.ad/api/v1/webhooks`
- Auth: HTTP bearer

## Request body

- CreateWebhookRequest: Create-webhook request body.
  - `url` string, required
  - `description` string
  - `event_types` string[]
  - `campaign_ids` string[], nullable

## Response `201`

Successful Response

- WebhookCreatedResponse: Create / rotate response carrying the cleartext signing secret. The caller MUST persist ``secret`` on their side — we never return it again. Subsequent ``GET`` requests return only :class:`WebhookResponse`.
  - `webhook` WebhookResponse, required: Wire shape of a :class:`WebhookEndpoint`. Secret material is NEVER included — cleartext is only visible in :class:`WebhookCreatedResponse` immediately after creation or rotation.
    - `id` string, uuid, required
    - `url` string, required
    - `description` string, required
    - `event_types` string[], required
    - `campaign_ids` string[], nullable, required
    - `is_active` boolean, required
    - `disabled_reason` string, nullable, required
    - `disabled_reason_detail` string, nullable, required
    - `disabled_at` string, date-time, nullable, required
    - `health` EndpointHealthResponse, required: Wire representation of :class:`EndpointHealth`. ``failing_since`` is what the UI should render — it says how long the partner has actually been down. ``consecutive_failures`` counts concurrent attempts and is kept for diagnostics only.
      - `consecutive_failures` integer, required
      - `last_delivery_at` string, date-time, nullable, required
      - `last_delivery_status` integer, nullable, required
      - `success_rate_7d` number, required
      - `failing_since` string, date-time, nullable, required
      - `paused_until` string, date-time, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `secret` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kaminari/apis/kaminari-ad-api.md) · [All operations](https://skmtc.dev/kaminari/apis/kaminari-ad-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kaminari/apis/kaminari-ad-api/revisions/013f86e2fd32?raw)
