---
title: "Creates a subscription to the provided list of events. Notifications will be sent to the provided WebhookURL"
method: POST
path: "/WebhookSubscription"
tags: ["WebhookSubscription"]
---

# Creates a subscription to the provided list of events. Notifications will be sent to the provided WebhookURL

`POST /WebhookSubscription`

## Request

- Base URL: `https://partners.staging-youlendapi.com/notification`
- URL: `https://partners.staging-youlendapi.com/notification/WebhookSubscription`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://youlend-stag.eu.auth0.com/oauth/token`

## Headers

- `api-version` string

## Request body

- WebhookSubscriptionModel: A model representing the webhook subscription for list of events
  - `eventCodes` string[], required: Gets or sets the Events Codes
  - `webhookUrl` string, required: Gets or sets the webhook URL

## Response `200`

Returns a WebhookNotificationSubscriptionResultModel

- WebhookNotificationSubscriptionResultModel: The result of creating a webhook subscription
  - `subscriptionId` string, uuid: Gets or sets the SubscriptionId
  - `webhookUrl` string, nullable: Gets or sets the WebhookUrl
  - `webhookSecretKey` string, nullable: Gets or sets the SecretKey

## Other responses

- `400`: Something went wrong!
- `401`: Unauthorized request

---

[API](https://skmtc.dev/youlend/apis/youlend-third-party-notification-api.md) - [All operations](https://skmtc.dev/youlend/apis/youlend-third-party-notification-api/llms.txt) - [OpenAPI document](https://skmtc.dev/youlend/apis/youlend-third-party-notification-api/revisions/1320b3908a39?raw)
