What are Mandate webhooks?
Webhooks deliver real-time event notifications to your server via HTTP POST requests. When an agent event occurs (approval needed, transaction confirmed, circuit breaker tripped), Mandate sends a JSON payload to your configured endpoint. Use webhooks to build custom dashboards, trigger automated workflows, or feed data into monitoring systems.Webhook API
Manage webhooks per agent through the API:| Endpoint | Method | Description |
|---|---|---|
/api/agents/{agentId}/webhooks | GET | List configured webhooks for the agent. |
/api/agents/{agentId}/webhooks | PUT | Create or update webhook configuration. |
/api/agents/{agentId}/webhooks/test | POST | Send a test payload to verify the endpoint. |
Webhook types
Three webhook types are available:| Type | Configuration |
|---|---|
| slack | url: Slack incoming webhook URL. |
| telegram | bot_token: Telegram bot token. chat_id: target chat ID. |
| custom | url: your endpoint URL. secret: shared secret for HMAC verification. |
Payload format
Every webhook delivery sends a JSON body:event_type field matches one of: approval_pending, intent_confirmed, intent_failed, circuit_breaker_tripped. The metadata object varies by event type but always includes the relevant transaction or agent details.
Secret verification
For custom webhooks, Mandate signs every payload using HMAC-SHA256 with your configured secret. The signature is included in theX-Mandate-Signature header.
Verify incoming webhooks on your server:
TypeScript
Retry policy
If your endpoint returns a non-2xx status code or times out, Mandate retries the delivery:| Attempt | Delay |
|---|---|
| 1st retry | ~1 minute |
| 2nd retry | ~5 minutes |
| 3rd retry | ~30 minutes |
Testing
Use the test endpoint to verify your configuration:curl
event_type: "test" to your configured endpoint. Verify that your server receives the request, validates the signature, and returns a 200 response.
Next Steps
Notifications
Configure which events trigger webhook deliveries.
API Reference
Full API documentation for all Mandate endpoints.