Skip to content

Update webhook subscription

Request

Security
oauth2(Required scopes: webhook.subscription:update) or bearerAuth or apiKeyHeader
Path
webhookSubscriptionIdstringrequired

The ID of the webhook subscription

Bodyapplication/jsonrequired
enabledboolean

If true events will be sent to this webhook, if false no events will be sent to it.

Default:true
hydrateDataboolean

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
Default:false
webhookDirectDetailsobject(WebhookDirectDetails)

The details required for Peach to pass the events via webhook. Required only if webhookType=direct.

webhookProxyDetailsobject(WebhookProxyDetails)

The details required for Peach to make an API call to the third party identified in the webhookType. Required only if webhookType=proxyXXX.

PUT
/webhooks/{webhookSubscriptionId}
curl -i -X PUT \
  'https://sandboxapi.peach.finance/api/webhooks/{webhookSubscriptionId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": true,
    "hydrateData": false,
    "webhookDirectDetails": {
      "webhookUrl": "string"
    },
    "webhookProxyDetails": {
      "galileoApiLogin": "string",
      "galileoApiTransKey": "string",
      "galileoBaseUrl": "string",
      "galileoProviderId": "string"
    }
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataobject(WebhookSubscription)
Response
{ "message": "string", "status": 0, "data": { "eventTypes": [], "webhookType": "direct", "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "companyId": "string", "enabled": true, "hmacSecretKey": "string", "hydrateData": false, "webhookDirectDetails": {}, "webhookProxyDetails": {} } }