---
title: "Rotate the signing secret"
method: POST
path: "/workspaces/{workspaceId}/webhooks/{id}/rotate-secret"
tags: ["Webhooks"]
---

# Rotate the signing secret

`POST /workspaces/{workspaceId}/webhooks/{id}/rotate-secret`

## Request

- Base URL: `https://tasg.app/api/v1`
- URL: `https://tasg.app/api/v1/workspaces/{workspaceId}/webhooks/{id}/rotate-secret`
- Auth: HTTP bearer

Workspace owner only. Deliveries sign with the new secret immediately. The signing `secret` (`whsec_…`) is returned ONCE in this response and never again; store it.

## Path parameters

- `workspaceId` string, uuid, required
- `id` string, uuid, required

## Response `200`

Rotated.

- object
  - `webhook` object, required
    - `id` string, uuid, required
    - `url` string, uri, required
    - `description` string, nullable
    - `event_types` EventType[], required: Empty array = subscribed to every type.
    - `active` boolean, required
    - `cursor` string, required: Stream position of the last delivered event.
    - `failure_count` integer, required: Consecutive failed deliveries; resets to 0 on success.
    - `next_attempt_at` string, date-time, nullable: When the next retry is due while backing off.
    - `disabled_reason` string, nullable: Set when the subscription was auto-disabled (e.g. 20 consecutive failures).
    - `last_delivery_at` string, date-time, nullable
    - `created_at` string, date-time, required
    - `secret` string, required

## Other responses

- `401`: Missing, invalid, expired or revoked credentials.
- `403`: Authenticated, but not allowed: not a member, insufficient project role or the API token lacks the required scope.
- `404`: Not found, or not visible to the caller (tenancy is enforced: foreign resources look identical to missing ones).
- `429`: Rate limited. Back off and retry after the window in the `RateLimit-*` headers.

---

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