Webhooks
Webhooks allow you to receive real-time notifications when events occur in HornetHive, such as when outcomes are completed, crews finish processing, or integrations are executed. This eliminates the need to continuously poll the API for updates.
Overview​
HornetHive webhooks are HTTP POST requests sent to your specified endpoint when events occur. Each webhook includes:
- Event type: What happened (e.g.,
outcome.completed) - Timestamp: When the event occurred
- Data payload: Relevant information about the event
- Signature: For verifying the webhook authenticity
Setting Up Webhooks​
Create a Webhook​
Register a webhook endpoint to receive notifications:
POST /v1/webhooks
Request Body​
{
"url": "https://your-app.com/webhooks/hornethive",
"events": [
"outcome.completed",
"outcome.failed",
"outcome.revision_requested",
"crew.deployed",
"integration.executed"
],
"secret": "your_webhook_secret_key",
"description": "Production webhook for outcome notifications",
"active": true
}
Response​
{
"id": "wh_1234567890abcdef",
"url": "https://your-app.com/webhooks/hornethive",
"events": [
"outcome.completed",
"outcome.failed",
"outcome.revision_requested",
"crew.deployed",
"integration.executed"
],
"secret": "your_webhook_secret_key",
"description": "Production webhook for outcome notifications",
"active": true,
"created_at": "2024-01-15T10:30:00Z",
"last_delivery": null,
"delivery_count": 0
}
Available Events​
Outcome Events​
outcome.created
- Triggered when a new outcome is created
- Sent immediately after crew deployment
outcome.processing
- Triggered when outcome processing begins
- Includes initial progress information
outcome.completed
- Triggered when an outcome is successfully completed
- Includes the final result and metadata
outcome.failed
- Triggered when outcome processing fails
- Includes error information and failure reason
outcome.revision_requested
- Triggered when a revision is requested
- Includes revision details and requirements