Step 1: Choose the kind
- In the Portal Admin Dashboard, select the environment you want to configure.
- Under Webhooks in the sidebar, click Flow control. If the environment has no flow control configuration, Portal opens Add a webhook.
- Under What kind of webhook do you need?, select Flow control hooks if it isn’t already selected.
- Click Continue.
Step 2: Enter the base URL
Under Where should Portal send flow control hooks?, enter your Base URL, for examplehttps://api.example.com/portal. Portal appends a fixed path to it for each hook:
/sign-approval/backup/backup/fetch
https://. Portal removes any trailing /. Click Continue.
You can’t change the base URL from the dashboard after the wizard creates the configuration. Double-check it before you continue.
Step 3: Choose the hooks
Under Which hooks should Portal call?, select the hooks you want to turn on. Both are selected by default.- Signature approvals (
POST /sign-approval): Portal calls it before every signature. Return2xxto approve or400to reject. A timeout of 10 seconds counts as an error, and the signature fails. - Self-managed backups (
POST /backupandPOST /backup/fetch): Portal calls them when a wallet is backed up or recovered./backupmust return a2xxto store the share, or the backup fails./backup/fetchmust return200with the shares, or the recovery fails.
- With Signature approvals selected, every signature in the environment waits on
/sign-approval. - With Self-managed backups selected, every backup and recovery in the environment depends on
/backupand/backup/fetch.
Step 4: Test your hooks
The Test your hooks step shows the secret Portal sends in theX-Webhook-Secret header. Copy it and configure your server to check it.
Click Test all hooks. Portal sends a test call to each hook you turned on and shows the status code, the response time, and a Show response link for each one.
If a hook doesn’t respond, the wizard tells you which operations will fail while it’s down. Fix your server and click Test again, or click Skip and finish to test later from the Flow control page. The hooks are already live at this point.
Click Finish.
Done
The last screen confirms that the hooks are live and shows your base URL, the hooks you turned on, and the secret. If a hook failed the test, it reminds you that calls to it will fail until your server responds.- Click View requests to open the flow control event log.
- Click Test hooks again to run the tests again.
- Click Done to go to the Flow control page.
Next steps
- Manage your flow control hooks: turn hooks on or off, reveal your secrets, and turn on email alerts.
- Set up informational webhooks to get notified about transactions and wallet lifecycle events.