Callbacks from the SDK
Use action-level callbacks when your system should continue work after a terminal decision.
Use:
- staging:
https://staging.server.beav3r.ai - production:
https://server.beav3r.ai
Request example
TypeScript
import { Beav3r } from '@beav3r/sdk'
const client = new Beav3r({
baseUrl: 'https://staging.server.beav3r.ai',
apiKey: process.env.BEAV3R_API_KEY!,
agentId: 'treasury_payout_agent',
defaultExpirySeconds: 180
})
const result = await client.guard({
actionType: 'payments.send_usdt',
payload: {
amount: 4200,
recipient: '0x1111111111111111111111111111111111111111'
},
attributes: {
amount: 4200,
merchant_name: 'Treasury Ops'
},
callbackUrl: 'https://example.com/beav3r/callbacks'
})Resolution order
Beav3r resolves callback target in this order:
- request-level
callbackUrl - project-level callback URL
Delivery timing and behavior
Callbacks are sent after terminal state (approved, denied, expired) as POST JSON with:
Content-Type: application/jsonidempotency-key: terminal:<actionHash>:<status>
Any 2xx is success. Failed deliveries retry with backoff.
Use Webhooks and Callbacks for transport details and Trigger Payload Guide for payload structure.
Last updated on