---
title: "A new signing secret, shown once. The old one keeps signing beside it for a while."
method: POST
path: "/v1/webhooks/{id}:rotate-secret"
tags: ["observability"]
---

# A new signing secret, shown once. The old one keeps signing beside it for a while.

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

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/webhooks/{id}:rotate-secret`
- Auth: HTTP bearer

While both are live every delivery carries two v1 signatures, so a receiver can switch without missing one. keepPreviousSeconds: how long the old secret keeps signing, 0 to 604800 (a week); a day when omitted, 0 to end it at once.

## Path parameters

- `id` string, required: Resource identifier (UUID).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `keepPreviousSeconds` integer

## Response `200`

Success

- object
  - `id` string, required
  - `url` string, required
  - `description` string, nullable
  - `events` string[], required
  - `enabled` boolean, required
  - `secretHint` string, required
  - `secret` string: The signing secret. Returned when the webhook is made (and to its own retry) and when its secret is rotated, and never again.
  - `previousSecretExpiresAt` string, nullable
  - `createdAt` string
  - `updatedAt` string
  - `lastSuccessAt` string, nullable
  - `lastFailureAt` string, nullable
  - `failingSince` string, nullable

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
