webhooks

Update an existing webhook endpoint. Only the creator or admin can update a webhook. (pay-authenticated access required)

Changed on

Update an existing webhook endpoint

patch/webhooks

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/webhooks
  • Auth: API key in header token

Request body

webhookIdstring required

The ID of the webhook to update

urlstring uri required

The webhook URL to receive notifications. Only public http and https destinations are allowed.

authTokenstring nullable

Authentication token for extended webhook requests. Omit to keep the stored token; required when changing a webhook to EXTENDED

format'EXTENDED' | 'SLACK' | 'GOOGLE_CHAT' | 'DISCORD' required

Webhook delivery format

Eventsstring[] required

Array of event types to subscribe to

namestring nullable

Human-readable name for the webhook

Example request

{
  "webhookId": "webhook_endpoint_id",
  "url": "https://hooks.slack.com/services/example/path",
  "format": "SLACK",
  "Events": [
    "PAYMENT_ON_CHAIN_STATUS_CHANGED",
    "PURCHASE_ON_ERROR"
  ],
  "name": "Ops Slack Alerts"
}

Response

Webhook endpoint updated successfully

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "id": "webhook_endpoint_id",
    "url": "https://hooks.slack.com/services/example/path",
    "format": "SLACK",
    "name": "Ops Slack Alerts",
    "Events": [
      "PAYMENT_ON_CHAIN_STATUS_CHANGED",
      "PURCHASE_ON_ERROR"
    ],
    "isActive": true,
    "createdAt": "1970-01-20T20:00:36.260Z",
    "updatedAt": "1970-01-20T20:00:36.360Z",
    "paymentSourceId": "payment_source_id"
  }
}

Changes

    • warning

      added the new HYDRA_HEAD_LOW_BALANCE enum value to the // response property for the response status

    • info

      added the new HYDRA_HEAD_LOW_BALANCE enum value to the request property /

    • breaking

      removed the enum value HYDRA_HEAD_LOW_BALANCE of the request property /

    • info

      removed the HYDRA_HEAD_LOW_BALANCE enum value from the // response property for the response status