---
title: "Create or update the delivery-event webhook"
method: PUT
path: "/delivery-webhook"
tags: ["delivery"]
---

# Create or update the delivery-event webhook

`PUT /delivery-webhook`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/delivery-webhook`
- Auth: HTTP bearer

url must be public HTTPS (no credentials, custom ports, or private networks). Use either `signingSecret` (32-256 characters) or `rotateSecret`; the first setup or rotateSecret returns the newly generated secret.

## Request body

- object
  - `url` string: Webhook URL
  - `events` string[]: Event types to subscribe to; all by default
  - `active` boolean
  - `signingSecret` string
  - `rotateSecret` boolean

## Response `200`

Updated

- object
  - `success` boolean, required
  - `webhook` object, required
  - `signingSecret` string

## Other responses

- `201`: Created
- `400`: Invalid configuration
- `401`: Missing or invalid API key

---

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