---
title: "Update Webhook"
method: PATCH
path: "/v1/webhooks/{webhookId}"
tags: ["Webhooks"]
---

# Update Webhook

`PATCH /v1/webhooks/{webhookId}`

This endpoint updates a Webhook identified by the `webhookId` parameter with a collection of [JSON Patch](https://jsonpatch.com) operations.

The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change.

For example: We have the following resource.
```json
{
  "webhookId": 6,
  "url": "https://example.com/hook",
  "httpMethod": "post",
  "content": "null",
  "webHookHeaders": []
}
```
If we send an update request body as below (it changes the `content` field and adds a new HTTP header):
```json
[
  {
    "op": "replace", 
    "path": "/content", 
    "value": "Some webhook content."
  }, 
  {
    "op": "add", 
    "path": "/webHookHeaders/-", 
    "value": {
      "key": "X-Custom-Header", 
      "value": "Custom header value"
    }
  }
]
```
Only the `content` and `webHookHeaders` are updated and all the other attributes remain unchanged.
So we get a response like this:
```json
{
  "webhookId": 6,
  "url": "https://example.com/hook",
  "httpMethod": "post", 
  "content": "Some webhook content.", 
  "webHookHeaders": [
    {
      "key": "X-Custom-Header", 
      "value": "Custom header value", 
      "isSecure": false
    }
  ]
}
```

## Path parameters

- `webhookId` integer, required

## Request body

- JsonPatchOperation[]
  - `op` 'unknown' | 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test', required
  - `path` string, required — The source path.
  - `from` string, nullable — The target path.
  - `value` unknown

## Response `200`

When the update was successful.

- WebhookResponseModel
  - `webhookId` integer, required — The identifier of the Webhook.
  - `url` string, required — The URL of the Webhook.
  - `httpMethod` 'get' | 'post', required
  - `content` string, nullable, required — The HTTP body content.
  - `webHookHeaders` WebhookHeaderResponseModel[], required — List of HTTP headers that the Webhook must send.
    - `key` string, required — The HTTP header key.
    - `value` string, required — The HTTP header value.
    - `isSecure` boolean, required — Indicates whether the header value is sensitive.
  - `config` WebhookConfig, required — The Config where the applied changes will invoke the Webhook.
    - `name` string, required — The Config's name.
    - `configId` string, uuid, required — The Config's identifier.
  - `environment` WebhookEnvironment, required — The Environment where the applied changes will invoke the Webhook.
    - `name` string, required — The Environment's name.
    - `environmentId` string, uuid, required — The Environment's identifier.

## Other responses

- `400` — Bad request.
- `404` — Not found.
- `429` — Too many requests. In case of the request rate exceeds the rate limits.

---

[API](https://skmtc.net/configcat/apis/configcat-public-management-api.md) · [All operations](https://skmtc.net/configcat/apis/configcat-public-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/configcat/configcat-public-management-api/versions/6b4d53bc1455/schema)
