---
title: "Update webhook"
method: PATCH
path: "/v1/notifications/webhooks/{webhook_id}"
tags: ["webhooks"]
---

# Update webhook

`PATCH /v1/notifications/webhooks/{webhook_id}`

Updates a webhook to replace webhook fields with new values. Supports only the `replace` operation. Pass a `json_patch` object with `replace` operation and `path`, which is `/url` for a URL or `/event_types` for events. The `value` is either the URL or a list of events.

## Path parameters

- `webhook_id` string, required

## Request body

- Patch[] — An array of JSON patch objects to apply partial updates to resources.
  - `op` 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test', required — The operation.
  - `path` string — The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a> to the target document location at which to complete the operation.
  - `value` unknown
  - `from` string — The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a> to the target document location from which to move the value. Required for the <code>move</code> operation.

## Response `200`

A successful request returns the HTTP `200 OK` status code and a JSON response body that shows webhook details.

- Webhook — One or more webhook objects.
  - `id` string — The ID of the webhook.
  - `url` string, uri, required — The URL that is configured to listen on `localhost` for incoming `POST` notification messages that contain event information.
  - `event_types` EventType[], required — An array of events to which to subscribe your webhook. To subscribe to all events, including events as they are added, specify the asterisk wild card. To replace the `event_types` array, specify the asterisk wild card. To list all supported events, <a href="#event-type_list">list available events</a>.
    - `name` string, required — The unique event name.<blockquote><strong>Note:</strong> To subscribe to all events, including events as they are added, specify an `*` as the value to represent a wildcard.</blockquote>
    - `description` string — A human-readable description of the event.
    - `status` string — The status of a webhook event.
    - `resource_versions` ResourceVersions[] — Identifier for the event type example: 1.0/2.0 etc.
  - `links` LinkDescription[] — An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links/).
    - `href` string, required — The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.
    - `rel` string, required — The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).
    - `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'CONNECT' | 'OPTIONS' | 'PATCH' — The HTTP method required to make the related call.

## Other responses

- `default` — The error response.

---

[API](https://skmtc.net/paypal/apis/payments.md) · [All operations](https://skmtc.net/paypal/apis/payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paypal/payments/revisions/672aceee1190/schema)
