---
title: "Update webhook"
method: PATCH
path: "/api/v2/webhooks/{id}"
tags: ["Webhooks"]
---

# Update webhook

`PATCH /api/v2/webhooks/{id}`

Update a webhook's settings. Updating webhook settings uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).

## Path parameters

- `id` string, string, required — The ID of the webhook to update

## Request body

- PatchOperation[]
  - `op` string, required — The type of operation to perform
  - `path` string, required — A JSON Pointer string specifying the part of the document to operate on
  - `value` string — A JSON value used in "add", "replace", and "test" operations

## Response `200`

Webhook response

- Webhook
  - `_links` object, required — The location and content type of related resources
  - `_id` string, required — The ID of this webhook
  - `name` string — A human-readable name for this webhook
  - `url` string, required — The URL to which LaunchDarkly sends an HTTP POST payload for this webhook
  - `secret` string — The secret for this webhook
  - `statements` Statement[] — Represents a Custom role policy, defining a resource kinds filter the webhook responds to.
    - `resources` string[] — Resource specifier strings
    - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
    - `actions` ActionSpecifier[] — Actions to perform on a resource
    - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
    - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
  - `on` boolean, required — Whether or not this webhook is enabled
  - `tags` string[], required — List of tags for this webhook
  - `_access` Access
    - `denied` AccessDenied[], required
      - `action` string, required
      - `reason` AccessDeniedReason, required
        - `resources` string[] — Resource specifier strings
        - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
        - `actions` ActionSpecifier[] — Actions to perform on a resource
        - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
        - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
        - `role_name` string
    - `allowed` AccessAllowedRep[], required
      - `action` string, required
      - `reason` AccessAllowedReason, required
        - `resources` string[] — Resource specifier strings
        - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
        - `actions` ActionSpecifier[] — Actions to perform on a resource
        - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
        - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
        - `role_name` string

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
