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

# Create a new webhook

`POST /api/webhook`

Creates a new webhook endpoint for receiving notifications. Marketplaces can set the `X-On-Behalf-Of` header to provision the endpoint in an owned sub-merchant's Svix app; such endpoints default to direct (non-Connect) event types. Without the header the endpoint is created on the caller's own account (marketplaces keep Connect event defaults).

## Request body

- CreateWebhookDto
  - `url` string, uri, required — HTTPS URL where webhook notifications will be sent
  - `eventTypes` string[] — Event types to subscribe to. Leave empty to receive all events.

## Response `201`

Create a new webhook successful

- CreateWebhookResponse
  - `webhookId` string, required — Unique identifier of the webhook
  - `webhookUrl` string, required — HTTPS URL where webhook notifications will be sent
  - `secret` string, required — Secret key for webhook signature verification

## Other responses

- `400` — Invalid input data
- `401` — Unauthorized - Invalid API key

---

[API](https://skmtc.net/inflowpay/apis/inflow-api.md) · [All operations](https://skmtc.net/inflowpay/apis/inflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/inflowpay/inflow-api/versions/3012dd3dd14a/schema)
