# Update Webhook

This operation updates the webhook details

Endpoint: PUT /api/v1/webhookConfig/{webHookConfigID}
Version: 0.1
Security: bearerAuth

## Path parameters:

  - `webHookConfigID` (string, required)
    This is unique id of webhook which will get from create webhook config api.

## Request fields (application/json):

  - `name` (string, required)
    It indicates the desired name of the webhook  `Max length = 50`.
    Example: webhook1

  - `type` (string, required)
    It indicates the type of webhook. Currently it takes `tracking`  and `locker`as value. These event codes are supported for the defined type:
| type | supported events |
|  --- | --- |
| locker | reservation, cancelreservation, deposit, pickup, stalemailpickup, onhold |
| tracking | Manifest, Acceptance, InTransit, DeliveryAttempt, OutForDelivery, Delivered,  Exception, ReturnToSender, ReadyForPickup, PickupMissed, PickedUp |
    Enum: "locker", "tracking"

  - `events` (array, required)
    Example: ["Manifest","InTransit","Delivered"]

  - `url` (string, required)
    It indicates the customer url to which events should be sent.
    Example: https://webhook.com

  - `timeOut` (number)
    It indicates the timeout value before system waits response from the customer url, here timeout indicates in seconds.
    Example: 5

  - `status` (string)
    It indicates the status of the webhook. By default it takes `active`. To mark it inactive use `in-active`
    Example: active

  - `authParams` (any, required)

  - `authParams.authType` (string)
    It indicates the authoriation mechanism required to authenticate the customer url. here in this case authType is `custom`.
    Example: custom

  - `authParams.apiKey` (string)
    It indicates api key for authentication
    Example: JsuG7jk

  - `authParams.headerName` (string)
    It indicates header name for authentication
    Example: webhook1

  - `authParams.authType` (string)
    It indicates the authoriation mechanism required to authenticate the customer url. here in this case authType is `basic`.
    Example: basic

  - `authParams.clientID` (string)
    It indicates client id for authentication
    Example: JsuG7jk1fdjfh

  - `authParams.secret` (string)
    It indicates secret key for authentication
    Example: nejhdsugduwinduwbduhsidn

  - `authParams.tokenUrl` (string)
    The URL for retrieving a token.
    Example: https//webhook1

## Response 200 fields (application/json):

  - `webHookConfigID` (string)
    It is unique id system generates for the created webhook
    Example: 1Q86AvxyqmA

  - `name` (string)
    name of the webhook
    Example: webhook1

  - `type` (string)
    It indicates the type of webhook. Currently it takes `tracking`  and `locker`as value. These event codes are supported for the defined type:
| type | supported events |
|  --- | --- |
| locker | reservation, cancelreservation, deposit, pickup, stalemailpickup |
| tracking | Manifest, Acceptance, InTransit, DeliveryAttempt, OutForDelivery, Delivered,  Exception, ReturnToSender, ReadyForPickup, PickupMissed, PickedUp |
    Enum: "locker", "tracking"

  - `events` (array)
    Example: ["Manifest","InTransit","Delivered"]

  - `url` (string)
    URL to which events be pushed to
    Example: https://webhook.com

  - `timeOut` (number)
    It shows the timeout value untill which it waits to receive response from the customer url, here timeout indicates in seconds.
    Example: 5

  - `status` (string)
    status of the webhook
    Example: active

  - `authParams` (any)

  - `authParams.authType` (string)
    It indicates the authoriation mechanism required to authenticate the customer url. here in this case authType is `custom`.
    Example: custom

  - `authParams.apiKey` (string)
    It indicates api key for authentication
    Example: JsuG7jk

  - `authParams.headerName` (string)
    It indicates header name for authentication
    Example: webhook1

  - `authParams.authType` (string)
    It indicates the authoriation mechanism required to authenticate the customer url. here in this case authType is `basic`.
    Example: basic

  - `authParams.clientID` (string)
    It indicates client id for authentication
    Example: JsuG7jk1fdjfh

  - `authParams.secret` (string)
    It indicates secret key for authentication
    Example: nejhdsugduwinduwbduhsidn

  - `authParams.tokenUrl` (string)
    The URL for retrieving a token.
    Example: https//webhook1

## Response 401 fields (application/json):

  - `message` (string, required)

  - `code` (string, required)

