---
title: "Replace the signing secret; the new one is returned once"
method: POST
path: "/api/hook-endpoints/{id}/rotate-secret"
tags: ["HookEndpoints"]
---

# Replace the signing secret; the new one is returned once

`POST /api/hook-endpoints/{id}/rotate-secret`

## Request

- Base URL: `http://localhost:38200`
- URL: `http://localhost:38200/api/hook-endpoints/{id}/rotate-secret`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `token`

## Response `200`

New secret.

- object
  - `id` integer
  - `secret` string

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Admin or owner role (or an API key with admin scope) required, or the plan lacks the webhooks feature.
- `404`: Resource not found (or not visible to the caller).

---

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