---
title: "Rotate the HMAC signing secret (new secret returned ONCE)"
method: POST
path: "/api/workspaces/{workspaceId}/webhooks/{webhookId}/rotate-secret"
tags: ["Webhooks"]
---

# Rotate the HMAC signing secret (new secret returned ONCE)

`POST /api/workspaces/{workspaceId}/webhooks/{webhookId}/rotate-secret`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/workspaces/{workspaceId}/webhooks/{webhookId}/rotate-secret`
- Auth: API key in cookie `hiveship_access`

## Path parameters

- `webhookId` string, required

## Response `200`

Rotated; secret in response body

- object
  - `success` boolean, required
  - `data` object, required
    - `id` string, cuid, required
    - `name` string, required
    - `url` string, uri, required
    - `events` string[], required
    - `active` boolean, required
    - `lastSuccessAt` string, date-time, nullable, required
    - `lastFailureAt` string, date-time, nullable, required
    - `consecutiveFailureCount` integer, required
    - `disabledAt` string, date-time, nullable, required
    - `disabledReason` string, nullable, required
    - `workspaceId` string, cuid, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `secret` string, required

## Other responses

- `201`
- `403`: Requires workspace OWNER or ADMIN
- `404`: Webhook not found

---

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