---
title: "Create a Webhook"
method: POST
path: "/v1/webhook/paylink/api-key"
tags: ["Webhooks"]
---

# Create a Webhook

`POST /v1/webhook/paylink/api-key`

Create a global or pay link webhook using this endpoint. To create a global webhook, do not specify a paylinkId.

## Query parameters

- `apiKey` string, required

## Request body

- CreateWebHookDto
  - `name` string, required — The name of the webhook.
  - `paylinkId` string — The ID of the pay link the webhook is associated with. This field is optional — leave it blank to create a global webhook.
  - `targetUrl` string, required — The URL that will receive the webhook payload when the event occurs.

## Response `201`

Webhook created successfully.

- PaylinkTransactionHookEntity
  - `events` 'CREATED', required
  - `id` string, required
  - `paylink` string, required
  - `company` string, required
  - `targetUrl` string, required
  - `sharedToken` string, required
  - `creator` string

## Other responses

- `401` — Provided API key has no access to the resource.

---

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