Webhooks
Webhooks are HTTP callbacks that Daytona sends to your specified endpoints when specific events occur. Think of them as “reverse API calls” - instead of your application asking Daytona for updates, Daytona proactively notifies your application when something important happens.
Use Cases
Webhooks enable powerful automation and integration scenarios:
- Real-time Notifications: Get instant alerts when sandboxes are created, started, or stopped
- Automated Workflows: Trigger deployment pipelines when snapshots are created
- Monitoring & Analytics: Track usage patterns and resource utilization across your organization
- Integration: Connect Daytona with your existing tools like Slack, Discord, or custom applications
- Audit & Compliance: Maintain detailed logs of all important changes
Getting Started
Accessing Webhooks
If you don’t see Webhooks in your dashboard sidebar, contact support@daytona.io to enable webhooks for your organization. Provide your organization ID (found in your organization settings) when requesting access.
Once webhooks are enabled for your organization:
- Navigate to your Daytona Dashboard
- Click Webhooks in the left sidebar
- You’ll be able to access the webhook management interface
Managing Webhook Endpoints
Creating Endpoints
To start receiving webhook events:
- Go to the Endpoints tab in your webhook dashboard
- Click Add Endpoint
- Configure your endpoint:
- Endpoint URL: The HTTPS endpoint where you want to receive events
- Description: A helpful description for this endpoint
- Subscribe to events: Select which events you want to receive
Testing Endpoints
Before going live, test your webhook endpoints:
- Select webhook from Endpoints list
- Go to the Testing tab
- Configure test event and send it
- Verify your endpoint receives the test payload correctly
- Check that your application handles the webhook format properly
Available Events
Daytona sends webhooks for lifecycle events across your infrastructure resources. You can subscribe to specific event types or receive all events and filter them in your application.
Event Categories
- Sandbox Lifecycle Events
- Snapshot Lifecycle Events
- Volume Lifecycle Events
Webhook Payload Format
All webhook events follow a consistent structure:
{ "event": "event.type", "timestamp": "2024-01-15T10:30:00Z", "data": { // Event-specific data }}
Common Fields:
event
: The type of event (e.g., “sandbox.created”)timestamp
: ISO 8601 timestamp when the event occurreddata
: Event-specific payload containing relevant information
Monitoring and Activity
Activity
The Activity tab provides a visual overview of your webhook activity, including delivery statistics, event volume trends, and performance metrics to help you monitor the health of your webhook integrations.
Event Logs
The Logs tab shows detailed information about webhook deliveries, including event history, delivery status, and retry information for troubleshooting and monitoring purposes.