How to update an existing hook in Blnk.
curl --request POST \
--url http://localhost:5001/hooks \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Pre-transaction validation",
"url": "https://api.example.com/validate",
"type": "PRE_TRANSACTION",
"active": true,
"timeout": 30,
"retry_count": 3
}'
X-blnk-key: <api-key>.
Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.
See also: Secure your Blnk server
PRE_TRANSACTION or POST_TRANSACTION.curl --request POST \
--url http://localhost:5001/hooks \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Pre-transaction validation",
"url": "https://api.example.com/validate",
"type": "PRE_TRANSACTION",
"active": true,
"timeout": 30,
"retry_count": 3
}'
Was this page helpful?
curl --request POST \
--url http://localhost:5001/hooks \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Pre-transaction validation",
"url": "https://api.example.com/validate",
"type": "PRE_TRANSACTION",
"active": true,
"timeout": 30,
"retry_count": 3
}'