Skip to main content
PATCH
/
v1
/
webhooks
/
{id}
Update a webhook
curl --request PATCH \
  --url https://api.ledger.so/v1/webhooks/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    "customer.created",
    "transaction.completed",
    "card.issued",
    "transfer.completed"
  ]
}
'
{
  "ok": true,
  "data": {
    "id": "whk_bcd890",
    "url": "https://example.com/webhooks/ledger",
    "events": [
      "customer.created",
      "transaction.completed",
      "card.issued"
    ],
    "status": "active",
    "createdAt": "2025-01-15T15:00:00Z",
    "secret": "whsec_a1b2c3d4e5f6g7h8i9j0"
  }
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token. Format: ld_<env>_<prefix>_<secret> where <env> is test or live.

Path Parameters

id
string
required

The webhook ID (prefixed with whk_).

Example:

"whk_bcd890"

Body

application/json
url
string<uri>

Updated URL to receive webhook events.

Example:

"https://example.com/webhooks/ledger-v2"

events
string[]

Updated list of event types to subscribe to.

Example:
[
"customer.created",
"transaction.completed",
"transfer.completed"
]
status
enum<string>

Set to disabled to pause delivery or active to resume.

Available options:
active,
disabled

Response

Webhook updated successfully

ok
boolean
required

Indicates the request was successful.

data
object