Skip to main content
PUT
/
hooks
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
  }'
Available in version 0.8.4 or later.
Send the master key (server.secret_key) in the X-Blnk-Key header. Regular API keys return 403 Forbidden.

Body

name
string
required
Name of the hook. Ensure it is as descriptive as possible for easy reference.
url
string
required
Endpoint URL where the hook will send requests.
type
string
required
Type of the hook — PRE_TRANSACTION or POST_TRANSACTION.
active
boolean
required
Indicates whether the hook is enabled or disabled.
timeout
number
required
Maximum time (in seconds) allowed for the hook to execute.
retry_count
number
required
Maximum number of retry attempts if the hook fails.
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
  }'

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.