# Updates a webhook

Updates a Webhook object. Returns the updated Webhook

Endpoint: PATCH /webhooks/{id}
Version: v1
Security: apiKey

## Path parameters:

  - `id` (string, required)
    ID of the webhook

## Request fields (application/json):

  - `description` (string,null)
    Description of the webhook. It describes what this webhook is used for.
    Example: "Webhook description"

  - `name` (string,null)
    Name of the webhook.
    Example: "Webhook name"

  - `url` (string,null)
    The URL of the webhook endpoint
    Example: "https://www.example.org/webhook"

  - `active` (boolean,null)
    When active is true this webhook endpoint will receive events.
    Example: true

  - `enabled_event_types` (array,null)
    Event types that will be sent to the webhook endpoint. ['all'] parameter can be supplied to enable all event types
    Example: ["payment.created","payment.paid"]

## Response 200 fields (application/json):

  - `id` (string, required)
    Example: "WHXFPVRLXYL3U7"

  - `type` (string, required)
    Enum: "webhook"

  - `name` (string, required)
    Example: "Webhook Name"

  - `description` (string, required)
    Example: "Webhook Description"

  - `active` (boolean, required)
    Example: true

  - `url` (string, required)
    Example: "https://example.com/webhook"

  - `secret` (string, required)
    Example: "V9xVoX4sVJE8x41hATbFYZJ5qd6HALhN"

  - `enabled_event_types` (array)
    Enum: "currency_conversion.created", "customer.created", "customer.updated", "chargeback.created", "payout.created", "payout.approved", "payout.rejected", "payout.failed", "payout.paid", "payment.created", "payment.started", "payment.canceled", "payment.failed", "payment.paid", "payment.expired", "refund.created", "refund.canceled", "refund.failed", "refund.refunded", "refund.expired", "subscription.created", "subscription.started", "subscription.canceled", "subscription.paused", "subscription.resumed", "subscription.updated", "subscription.completed", "installment_plan.created", "installment_plan.started", "installment_plan.canceled", "installment_plan.paused", "installment_plan.resumed", "installment_plan.updated", "installment_plan.completed", "topup.created", "topup.started", "topup.canceled", "topup.failed", "topup.paid", "topup.expired"

  - `created_at` (string, required)
    Example: "2023-06-30T12:40:10Z"

  - `_links` (object, required)
    Example: {"self":"https://api.paypro.nl/webhooks/WHXFPVRLXYL3U7"}

  - `_links.self` (string, required)
    Example: "https://api.paypro.nl/webhooks/WHXFPVRLXYL3U7"

## Response 404 fields (application/json):

  - `error` (object, required)

  - `error.message` (string, required)
    The error message

  - `error.type` (string, required)
    Type of error
    Enum: "invalid_request"


