---
title: "Create a new webhook"
method: POST
path: "/v1/webhook"
tags: ["Webhook"]
---

# Create a new webhook

`POST /v1/webhook`

## Request

- Base URL: `https://api.finalpos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.finalpos.com/v1/webhook`
- Auth: API key in header `x-api-key`

Creates a new webhook record.

## Request body

- WebhookCreateDto
  - `name` string, required: Name of the webhook.
  - `description` string: Description of the webhook.
  - `enabled` boolean, required: Whether the webhook is enabled.
  - `url` string, required: URL of the webhook.
  - `events` string[]: Events of the webhook.

## Response `201`

The webhook has been successfully created.

- WebhookResponseDto
  - `id` string: Unique identifier for the Webhook.
  - `createdAt` string, date-time: Timestamp when the Webhook was created.
  - `updatedAt` string, date-time: Timestamp when the Webhook was last updated.
  - `name` string: Name of the webhook.
  - `description` string: Description of the webhook.
  - `companyId` string: Company ID associated with the Webhook.
  - `organizationId` string: Organization ID associated with the Webhook.
  - `enabled` boolean: Whether the webhook is enabled.
  - `url` string: URL of the webhook.
  - `secret` string: Secret for signing the webhook payload. Generated by the system & shared with the client once on creation.
  - `events` string[]: Events of the webhook.

## Other responses

- `400`: Bad request. Returns validation errors or other request-related errors.

---

[API](https://skmtc.dev/finalpos/apis/final-pos-public-api.md) · [All operations](https://skmtc.dev/finalpos/apis/final-pos-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/finalpos/apis/final-pos-public-api/revisions/6a6842dcb479?raw)
