---
title: "Replace a webhook signing secret"
method: POST
path: "/api/webhooks/{id}/rotate-secret"
tags: ["Webhooks"]
---

# Replace a webhook signing secret

`POST /api/webhooks/{id}/rotate-secret`

## Request

- Base URL: `https://keep.md`
- URL: `https://keep.md/api/webhooks/{id}/rotate-secret`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `keep.session_token`

Replace a webhook signing secret.

## Path parameters

- `id` string, required

## Headers

- `Keep-API-Version` string

## Response `200`

Webhook and new signing secret

- object
  - `webhook` Webhook, required
    - `id` string, required
    - `name` string
    - `url` string, uri, required
    - `eventTypes` string[], required
    - `resourceScope` ResourceScope
      - `tagSlugs` string[]
      - `collectionIds` string[]
    - `includeContent` false
    - `status` 'active' | 'disabled', required
    - `failureCount` integer, required
    - `lastSuccessAt` integer
    - `lastFailureAt` integer
    - `lastError` string
    - `createdAt` integer, required
    - `updatedAt` integer, required
  - `secret` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: The credential lacks access or the plan does not include the feature
- `404`: Resource not found

---

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