---
title: "Update webhook settings"
method: PATCH
path: "/client/webhook"
tags: ["Client Settings"]
---

# Update webhook settings

`PATCH /client/webhook`

## Request

- Base URL: `http://127.0.0.1:5000/api/v1`
- URL: `http://127.0.0.1:5000/api/v1/client/webhook`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/clinicalauditai/apis/clinicalauditai-api/docs/client/webhook/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates the saved webhook configuration for the authenticated client.

webhook_url may be changed to an HTTP or HTTPS URL. Setting
webhook_url to null disables the webhook and removes the stored
signing material.

Set rotate_secret to true to generate a new webhook signing secret.

When a new webhook secret is generated, the plaintext secret is
returned only in that immediate response. Save it securely because
it will not be returned again.

Changing only the webhook URL does not rotate an existing signing
secret.

This endpoint is available only to client API keys. The master API
key cannot use client self-service settings.

## Request body

- UpdateClientWebhookSettings
  - `webhook_url` string, uri, nullable: HTTP or HTTPS webhook URL. Set to null to disable the webhook.
  - `rotate_secret` boolean: Generate a new webhook signing secret.

## Response `200`

Webhook settings updated successfully

- ClientWebhookUpdateResponse
  - `success` boolean, required
  - `webhook_url` string, uri, nullable, required
  - `webhook_configured` boolean, required
  - `webhook_secret_configured` boolean, required
  - `webhook_secret` string, nullable, required: Plaintext webhook signing secret. Returned only when a secret is newly generated or rotated. Save it securely because it will not be returned again.
  - `secret_rotated` boolean, required: Whether a new signing secret was generated.
  - `warning` string, nullable

## Other responses

- `400`: Invalid webhook settings
- `401`: Missing or invalid API key
- `403`: Client API key required
- `500`: Failed to update webhook settings

---

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