---
title: "Subscribe a URL to event types"
method: POST
path: "/v1/webhooks"
tags: ["events"]
---

# Subscribe a URL to event types

`POST /v1/webhooks`

## Request

- Base URL: `https://postbag.dev`
- URL: `https://postbag.dev/v1/webhooks`
- Auth: HTTP bearer

Every delivery is signed with the returned (or supplied) secret so the receiver can verify authenticity.

## Request body

- object
  - `url` string, uri, required
  - `events` string[], required
  - `secret` string
  - `enabled` boolean

## Response `201`

created

- SystemWebhook
  - `id` string, required
  - `url` string, required
  - `events` string[], required
  - `enabled` boolean
  - `health` 'unknown' | 'ok' | 'failing'

## Other responses

- `400`: Error
- `401`: Error
- `403`: Error
- `404`: Not found
- `409`: Error
- `422`: Error

---

[API](https://skmtc.dev/postbag/apis/postbag-api.md) · [All operations](https://skmtc.dev/postbag/apis/postbag-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postbag/apis/postbag-api/revisions/3da976524695?raw)
