# Update webhook endpoint

This method allows you to update an existing webhook endpoint.
For that, you need to provide the endpoint identifier and the new configuration.

Endpoint: PATCH /webhooks/endpoints/{id}
Version: 1.0.0
Security: MerchantID

## Header parameters:

  - `merchant` (string, required)
    Unique public key provided upon registration and must be shared for identification purposes.
    Example: "api_pk_7b197...ba108f842"

  - `signature` (string, required)
    Request signature that allows verification of merchant authenticity on the payment gateway server.
    Example: "M2E3OTkyNzcz...xMmExODI4"

## Path parameters:

  - `id` (string, required)
    Webhook endpoint identifier.

## Request fields (application/json):

  - `event_types` (array)
    List of event types the webhook endpoint is subscribed to.
    Enum: "card_gate.order.updated", "card_gate.chargeback.received", "card_gate.fraud_alert.received", "card_gate.prevention_alert.received", "subscription.updated", "subscription.updated.v2", "alt_gate.order.updated", "alt_gate.paypal_dispute.received", "card.network_token.created", "card.network_token.updated", "taxer.tax.calculated", "alt_gate.recurring_token.cancelled"

  - `name` (string)
    Field for storing the webhook configuration name.

  - `url` (string)
    URL for webhook event delivery.

  - `status` (string)
    Webhook endpoint status.
    Enum: "active", "inactive"

## Response 200 fields (application/json):

  - `body` (object) — one of:
    - Success:
      - `id` (string)
        Webhook endpoint identifier.
      - `url` (string)
        URL for webhook event delivery.
      - `event_types` (array)
        List of event types the webhook endpoint is subscribed to.
      - `name` (string)
        Field for storing the webhook configuration name.
      - `status` (string)
        Webhook endpoint status.
        Enum: same as `status` (2 values)
      - `created_at` (string)
        Date when the webhook endpoint was created.
      - `updated_at` (string)
        Date when the webhook endpoint was last updated.
    - Authentication failed:
      - `error` (object, required)
        Error object.
      - `error.code` (string, required)
        Unauthorized access due to invalid credentials.
        Example: "1.01"
      - `error.messages` (array, required)
        Array of error messages applied to the decline payment.
        Example: ["Authentication failed"]

## Response 400 fields (application/json):

  - `error` (object)
    Error object.

  - `error.code` (string, required)
    Error 2.01 code.
    Enum: "2.01"

  - `error.message` (string, required)
    Invalid request.


  Missing or incorrect parameters.

  - `error.constraints` (object)
    An object containing validation errors for specific fields. 
Keys are field names, and values are lists of violations with error codes and messages.

## Response 404 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.

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

## Response 422 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.

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


