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

# Create webhook

`POST /v1/webhooks`

Creates a new webhook for the authenticated user. The webhook will send notifications to the specified target URL when the specified event occurs. The webhook URL must be a valid HTTP or HTTPS URL. The response carries the signing secret used to verify deliveries; this is the only time it is returned, so store it when you receive it.

## Request body

- WebhookCreateDto
  - `target` string
  - `event` string

## Response `200`

Webhook created successfully

- WebhookCreateResponse
  - `id` string
  - `target` string
  - `event` string
  - `secret` string
  - `user` string
  - `deleted` boolean
  - `lastUpdate` integer
  - `created` integer

## Other responses

- `400` — Bad request - invalid webhook details provided
- `401` — Not authorized to create webhooks

---

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