Skip to main content
PUT
/
hooks
/
{id}
Update an existing hook
curl --request PUT \
  --url http://localhost:5001/hooks/{id} \
  --header 'X-blnk-key: <api-key>'
Use blnk.Hooks.update to change the configuration of an existing webhook.
blnk.Hooks.update
const response = await blnk.Hooks.update('hk_test_123', {
  name: 'Pre-transaction validation',
  url: 'https://api.example.com/validate',
  type: 'PRE_TRANSACTION',
  active: false,
  timeout: 30,
  retry_count: 3,
});
FieldDescription
idID of the hook to update.
nameDescriptive name for the hook.
urlEndpoint URL Blnk calls when the hook runs.
typePRE_TRANSACTION or POST_TRANSACTION.
activeWhether the hook is enabled.
timeoutMaximum time in seconds allowed for the hook to execute.
retry_countMaximum number of retry attempts if the hook fails.

Response shape

200 OK
{
  "id": "hk_test_123",
  "name": "Pre-transaction validation",
  "url": "https://api.example.com/validate",
  "type": "PRE_TRANSACTION",
  "active": false,
  "timeout": 30,
  "retry_count": 3,
  "created_at": "2024-11-26T08:36:36.238244338Z",
  "last_run": "0001-01-01T00:00:00Z",
  "last_success": false
}
FieldDescription
idUnique ID for the hook.
created_atDate and time the hook was created.
last_runDate and time the hook last executed.
last_successWhether the most recent execution succeeded.

How webhooks work

Hook types, payloads, and execution.

Update an existing hook

HTTP request and response schema.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.