---
title: "Rotate webhook secret"
method: POST
path: "/v1/inboxes/{id}/webhook/rotate-secret"
tags: ["inboxes"]
---

# Rotate webhook secret

`POST /v1/inboxes/{id}/webhook/rotate-secret`

## Request

- Base URL: `https://api.openmail.sh`
- URL: `https://api.openmail.sh/v1/inboxes/{id}/webhook/rotate-secret`
- Auth: HTTP bearer

Generate a new signing secret for this inbox's webhook. The inbox must already have a webhook URL set. The previous secret is invalidated immediately.

## Path parameters

- `id` string, required

## Response `200`

New signing secret

- object: New signing secret
  - `webhookSecret` string, required

## Other responses

- `400`: No webhook URL is set on this inbox (`no_webhook_url`)
- `403`: The authenticating key is inbox-scoped (read + send only) and cannot rotate webhook secrets
- `404`: Not found

---

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