POST
/
hooks
curl --request POST \
  --url http://localhost:5001/hooks \
  --header 'Authorization: Basic <encoded-value>' \
  --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
  }'

Authorization

Basic authentication header of the form — Basic <encoded-value>, where <encoded-value> is the base64-encoded string of your username:password.

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 'Authorization: Basic <encoded-value>' \
  --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.

Sign up on Blnk Cloud

Connect your Blnk Ledger and explore advanced features (access control & collaboration, anomaly detection, secure storage & file management, etc.) in one intuitive dashboard.