Create a webhook

POST
/v1/{namespace}/webhooks

eventTypes takes event types or prefixes such as firewall.*. firewalls limits firewall and package events to those firewalls; empty means all.

Authorization

headerAuthorizationBearer <token>

A personal or service access token, sent as Authorization: Bearer <token>. See access tokens.

Path Parameters

namespace*string

The namespace id.

Request Body

application/json
  1. body

A webhook to create or update.

name*string

A display name.

description*string

A free-form description.

url*string

The endpoint events are delivered to.

enabled*boolean

Whether events are delivered.

eventTypes*array<string>

The event types to deliver: exact names, or a prefix followed by .*, e.g. firewall.*. At least one is required.

firewalls*array<string>

Restricts firewall and package events to these firewalls. Empty means every firewall.

Response Body

The new webhook and its signing secret.

application/json
  1. response

A new webhook and its signing secret.

webhook*

The webhook, with its secret redacted.

secret*string

The signing secret, for verifying deliveries.

curl -X POST 'https://eu-sov-1.bytesafecloud.eu/v1/my-namespace-id/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "description": "Blocked downloads go to the security channel.",  "enabled": true,  "eventTypes": [    "firewall.blocked"  ],  "firewalls": [],  "name": "security alerts",  "url": "https://hooks.example.com/firewall"}'
{  "webhook": {    "id": "whep-01K6Z3Q8R9T2V4X6Y8A0C2E4G6",    "name": "security alerts",    "url": "https://hooks.example.com/firewall",    "enabled": true,    "eventTypes": [      "firewall.blocked"    ],    "firewalls": [],    "secret": "1F56ED4E-D401-49E4-B40C-0B7B8411BAD6",    "createdAt": "2026-03-02T09:30:00Z",    "updatedAt": "2026-03-02T09:30:00Z"  },  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"}