# 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: merchant, signature

## Security:

  - `merchant` (unknown)
    apiKey in header merchant

  - `signature` (unknown)
    apiKey in header signature

## Path parameters:

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

## Header parameters:

  - `merchant` (string, required)

  - `signature` (string, required)

## Request fields (application/json):

  - `event_types` (array)
    List of event types the webhook endpoint is subscribed to.

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

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

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

## Request examples:

  - `Update all` (unknown)

  - `Update event_types` (unknown)

  - `Update status` (unknown)

  - `Update name` (unknown)

  - `Update url` (unknown)

## Response 200:

  - `200` (unknown)
    Request received

## Response 200 fields (application/json):

  - `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: "active", "inactive"

  - `created_at` (string)
    Date when the webhook endpoint was created.

  - `updated_at` (string)
    Date when the webhook endpoint was last updated.

  - `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.

## Response 400:

  - `400` (unknown)
    Invalid request

## 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:

  - `404` (unknown)
    Endpoint not found

## Response 404 fields (application/json):

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

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

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

## Response 422:

  - `422` (unknown)
    Endpoint with the same URL already exists for this channel

## Response 422 fields (application/json):

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

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

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

## Response 200 examples:

  - `Success` (unknown)

  - `Authentication failed` (unknown)

## Response 400 examples:

  - `Error 2.01 Invalid json` (unknown)

  - `Error 2.01 Invalid event_type` (unknown)

  - `Error 2.01 Invalid status` (unknown)

  - `Error 2.01 Name max length` (unknown)

  - `Error 2.01 Invalid url` (unknown)

## Response 404 examples:

  - `Error 2.01 Endpoint not found` (unknown)

## Response 422 examples:

  - `Error 2.01 Endpoint already exists` (unknown)

