---
title: "Create a webhook subscription"
method: POST
path: "/api/v1/webhooks"
tags: ["webhooks"]
---

# Create a webhook subscription

`POST /api/v1/webhooks`

## Request

- Base URL: `https://monit.rs`
- URL: `https://monit.rs/api/v1/webhooks`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Creates a subscription and returns the signing secret ONCE. Store it — subsequent responses only show a prefix.

## Request body

- object
  - `name` string, required
  - `url` string, uri, required
  - `events` string[], required

## Response `201`

Created. Response includes plaintext `secret` shown once.

## Other responses

- `422`: Unknown event type or invalid URL.

---

[API](https://skmtc.dev/monit/apis/monit-rs-public-api.md) · [All operations](https://skmtc.dev/monit/apis/monit-rs-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/monit/apis/monit-rs-public-api/revisions/7e1923981112?raw)
