---
title: "Endpoint to create a new subscription."
method: POST
path: "/webhook/management/v1"
tags: ["Endpoints"]
---

# Endpoint to create a new subscription.

`POST /webhook/management/v1`

Creates a new webhook subscription accessible only to the client.

## Headers

- `Authorization` string, required

## Request body

- CreateSubscriptionDto — Subscription element.
  - `url` Url, required — unresolved $ref
  - `event_type` EventType, required — unresolved $ref
  - `secret` Secret, required — unresolved $ref

## Response `201`

The subscription was created.

- SubscriptionDto — Subscription element.
  - `id` string — ID of the subscription.
  - `url` string, url — HTTP URL to execute the webhook call with the POST method.
  - `event_type` string — Type of the event to process by calling the API endpoint.
  - `secret` string — Parameter given by the client to sign their payloads. Recommended to be unique for each URL.

## Other responses

- `400` — Bad request due to a client error in path parameters, header or body.
- `405` — Bad request because the HTTP method is not allowed.
- `406` — Bad request because the server cannot produce a response matching the list of acceptable values.
- `415` — Bad request because the payload format is not supported.
- `500` — An internal server error occurred while processing the request.

---

[API](https://skmtc.dev/ratepay/apis/subscription-webhooks.md) · [All operations](https://skmtc.dev/ratepay/apis/subscription-webhooks/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ratepay/subscription-webhooks/revisions/5195c471cb79/schema)
