---
title: "Rotate the signing secret"
method: POST
path: "/api-regulated/v1/webhook-subscriptions/{id}/rotate-secret"
tags: ["Webhooks"]
---

# Rotate the signing secret

`POST /api-regulated/v1/webhook-subscriptions/{id}/rotate-secret`

## Request

- Base URL: `https://api.currencyguard.com`
- URL: `https://api.currencyguard.com/api-regulated/v1/webhook-subscriptions/{id}/rotate-secret`
- Auth: OAuth 2 (implicit, authorization URL `https://auth.currencyguard.com/oauth2/authorize`, scopes: `regulated.api-clients.canManageWebhooks`)

Generates a new signing secret and returns it once. The previous secret stops being valid immediately.

**Required entitlement:** `regulated.api-clients.canManageWebhooks`  
_Entitles the regulated user to create, view, update, rotate, delete, and replay webhook subscriptions for B2B event delivery_

## Path parameters

- `id` string, uuid, required

## Response `200`

Secret rotated

- WebhookSubscriptionCreatedDTO: Webhook subscription details including the one-time signing secret
  - `id` string, uuid: ID of the created subscription
  - `subscriptionName` string: Subscription name
  - `endpointUrl` string: Endpoint URL
  - `status` string: Subscription status
  - `signingSecret` string: HMAC-SHA256 signing secret — shown only once. Store it securely; it cannot be retrieved later.
  - `createdAt` string: Timestamp of creation in UTC
  - `message` string: Human-readable note about the one-time secret

## Other responses

- `401`: Not authenticated — [`security/authentication-failed`](/problems/security/authentication-failed/)
- `403`: Not authorized — [`security/insufficient-permissions`](/problems/security/insufficient-permissions/)
- `404`: Subscription not found — [`http/resource-not-found`](/problems/http/resource-not-found/)
- `500`: Server error — [`server/internal-error`](/problems/server/internal-error/)

---

[API](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external.md) · [All operations](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external/llms.txt) · [OpenAPI document](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external/revisions/a1f3f854190d?raw)
