---
title: "Rotate a webhook endpoint secret"
method: POST
path: "/webhook-endpoints/{id}/rotate-secret"
tags: ["Webhooks"]
---

# Rotate a webhook endpoint secret

`POST /webhook-endpoints/{id}/rotate-secret`

## Request

- Base URL: `https://api.cavuno.com/v1`
- URL: `https://api.cavuno.com/v1/webhook-endpoints/{id}/rotate-secret`
- Auth: HTTP bearer

Issues a new signing secret (returned once) and keeps the previous secret verifiable for a bounded overlap window. The secret is returned only on the original response and is not replayed by an idempotent retry — recover a lost secret by rotating.

## Path parameters

- `id` string, required: The webhook endpoint ID.

## Response `200`

Secret rotated; new secret returned once.

- WebhookEndpointCreated
  - `id` string, required
  - `object` 'webhook_endpoint', required
  - `url` string, required
  - `event_types` string[], required
  - `status` 'enabled' | 'paused' | 'failing', required
  - `failure_streak` integer, required
  - `last_failure_at` string, nullable, required
  - `last_success_at` string, nullable, required
  - `health_changed_at` string, nullable, required
  - `health_reason` 'consecutive_failures' | 'retry_exhausted' | 'http_410' | 'operator_pause' | 'operator_resume' | 'synthetic_recovery', nullable, required
  - `secret_overlap_expires_at` string, nullable, required
  - `created_at` string, required
  - `updated_at` string, required
  - `secret` string, required: Signing secret returned exactly once on create or rotate. Store it immediately.

## Other responses

- `402`: The board's plan does not include webhooks (`plan_upgrade_required`). Webhooks require a paid plan, Starter and above.
- `403`: Missing webhooks.manage or a family read scope.
- `404`: Endpoint not found.

## Changes

- **2026-10-19** `c34152c38176`: 3 info
  - added the optional property `error/upgrade` to the response with the `402` status
  - added the optional property `error/upgrade` to the response with the `403` status
  - added the optional property `error/upgrade` to the response with the `404` status

[Operation history](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/changes/webhook-endpoints/:id/rotate-secret/post.md)

---

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