# Update webhook subscription

Endpoint: PUT /webhooks/{webhookSubscriptionId}
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `webhookSubscriptionId` (string, required)
    The ID of the webhook subscription

## Request fields (application/json):

  - `enabled` (boolean)
    If `true` events will be sent to this webhook, if `false` no events will be sent to it.

  - `hydrateData` (boolean)
    Indicates the amount of information the receiver of webhooks will get. Only applicable if `webhookType=direct`.
- `false` - Peach will provide a minimum amount of data. For example: event identifier, event name, timestamp and
identifier(s) of associated object(s) (e.g. loan ID, borrower ID, transaction ID, etc.)
- `true` - in addition to the data provided in the `false` option, Peach will provide full details of the object(s)
associated with the event.

Currently we support hydrating the following objects:
- `borrower`
- `loan`
- `transaction`
- `case`

  - `webhookDirectDetails` (object)
    The details required for Peach to pass the events via webhook. Required only if `webhookType=direct`.

  - `webhookDirectDetails.webhookUrl` (string)
    The URL that Peach will hit when an applicable event fires.

  - `webhookProxyDetails` (object)
    The details required for Peach to make an API call to the third party identified in the `webhookType`.
Required only if `webhookType=proxyXXX`.

  - `webhookProxyDetails.galileoApiLogin` (string)
    The Galileo API login needed to make API calls via Peach's proxy.

  - `webhookProxyDetails.galileoApiTransKey` (string)
    The Galileo API key needed to make API calls via Peach's proxy.

  - `webhookProxyDetails.galileoBaseUrl` (string)
    The Galileo base URL.

  - `webhookProxyDetails.galileoProviderId` (string)
    The Galileo provider ID.

## Response 200 fields (application/json):

  - `message` (string)
    Description of the server action or error.

  - `status` (integer)
    HTTP status code.

  - `data` (object)

  - `data.eventTypes` (array)
    The list of events for which the caller will receive webhooks.
For any proxy `webhookType`, this field should be left empty, and we will automatically send the events
associated with that specific proxy.

  - `data.webhookType` (string)
    Peach supports two ways of receiving webhooks:
- `direct` - events will be provided directly to the url nominated by the lender, and the event data will match Peach's data format.
- `proxyGalileo` - events will trigger Peach to make specific API calls to Galileo, so Galileo's sub-ledger remains in sync with Peach's ledger.

Note: when setting webhookType as `proxyGalileo`, please work with the Peach team to ensure the API calls you require are configured.
    Enum: "direct", "proxyGalileo"

