API Reference
Webhooks
Receive real-time notifications for governance events via HTTP webhooks.
Overview
Webhooks allow you to receive real-time notifications when events occur in your Tork environment.
Event-Driven
Push notifications for events
Signed Payloads
HMAC signature verification
Auto Retry
Failed deliveries retried
Configuring Webhooks
Register a webhook endpoint via the API:
Event Types
Available webhook event types:
policy.violationAn agent action was blocked by a policypolicy.warningAn action triggered a policy warningapproval.requestedA new approval request was createdapproval.decidedAn approval was approved or rejectedapproval.expiredAn approval request timed outbudget.threshold_reachedA budget threshold was reachedbudget.exceededA budget limit was exceededcircuit_breaker.triggeredA circuit breaker was trippedcircuit_breaker.resetA circuit breaker was resetjailbreak.detectedA jailbreak attempt was detectedagent.registeredA new agent was registeredagent.updatedAn agent configuration was updatedWebhook Payload
All webhooks follow this payload structure:
Signature Verification
Verify webhook signatures to ensure authenticity:
Retry Policy
Failed webhook deliveries are automatically retried:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 24 hours |
Important: Your webhook endpoint must respond with a 2xx status code within 30 seconds, or it will be marked as failed.