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

# Rotate a webhook signing secret

`POST /v1/webhooks/{id}/rotate-secret`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/webhooks/{id}/rotate-secret`
- Auth: API key in header `x-api-key`

Generates and returns a new signing secret. The previous secret remains valid for a 24-hour rotation overlap.

## Path parameters

- `id` string, required

## Response `200`

Success

- object
  - `secret` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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