---
title: "Rotate a routine's webhook secret."
method: POST
path: "/v0/routines/{routineId}/rotate-secret"
tags: ["Workspaces"]
---

# Rotate a routine's webhook secret.

`POST /v0/routines/{routineId}/rotate-secret`

## Request

- Base URL: `https://api.conductor.build` (the document declares no server; this is the origin it was published from)
- URL: `https://api.conductor.build/v0/routines/{routineId}/rotate-secret`
- Auth: HTTP bearer

Replaces the webhook secret of the routine's single webhook trigger and returns the routine with the new webhookUrl. The previous URL stops working immediately. Only the routine's owner may rotate it; other routines are reported as not found. Requires a user API key: workspace API keys and other sign-in credentials receive 403. The routine is owned by the key's user in the key's organization.

## Path parameters

- `routineId` string, required

## Response `200`

Default Response

- object
  - `id` string, required
  - `name` string, required
  - `prompt` string, required
  - `repoUrl` string, required
  - `agent` union, required
    - 'claude'
    - 'codex'
    - 'cursor'
    - 'acp'
  - `model` string
  - `effort` string
  - `enabled` boolean, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `runCount` number, required
  - `lastRunAt` string
  - `triggers` object[], required
    - `id` string, required
    - `type` 'webhook', required
    - `enabled` boolean, required
    - `webhookUrl` string, required

## Other responses

- `400`: Invalid request.
- `401`: Missing or invalid bearer token.
- `404`: Resource not found.
- `default`: Error response.

---

[API](https://skmtc.dev/conductor-build/apis/roundhouse-public-api.md) - [All operations](https://skmtc.dev/conductor-build/apis/roundhouse-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conductor-build/apis/roundhouse-public-api/revisions/1f39c7f7f219?raw)
