Skip to content

Webhooks

View as Markdown

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.

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

Accessing webhooks

Daytona provides a webhook management interface to access and manage webhook endpoints.

  1. Navigate to Daytona Dashboard ↗
  2. Click Webhooks in the sidebar

Create webhook endpoints

Daytona provides a webhook management interface to create webhook endpoints.

  1. Navigate to Daytona Dashboard ↗
  2. Click Webhooks in the sidebar
  3. Click Add Endpoint
  4. Configure your endpoint:
  • Endpoint URL: HTTPS endpoint where you want to receive events
  • Description: description for this endpoint
  • Subscribe to events: select which events you want to receive
  1. Click Create

The new webhook endpoint is created and you are redirected to the endpoint details page. You can now test your endpoint by sending a test event.

Test webhook endpoints

Daytona provides a testing interface to test your webhook endpoints. You can configure a test event and send it to your endpoint to verify that it receives the test payload correctly.

  1. Navigate to Daytona Dashboard ↗
  2. Click Webhooks in the sidebar
  3. Select a webhook endpoint from the Endpoints list
  4. Navigate to the Testing tab
  5. Select an event type and click Send Example
  6. Verify that the endpoint receives the test payload correctly
  7. Check that your application handles the webhook format properly

Edit webhook endpoints

Daytona provides a webhook management interface to edit webhook endpoints.

  1. Navigate to Daytona Dashboard ↗
  2. Click Webhooks in the sidebar
  3. Select a webhook endpoint from the Endpoints list
  4. Click Edit next to the option you want to update
  5. Update the endpoint details
  6. Click Save

Delete webhook endpoints

Daytona provides a webhook management interface to delete webhook endpoints.

  1. Navigate to Daytona Dashboard ↗
  2. Click Webhooks in the sidebar
  3. Select a webhook endpoint from the Endpoints list
  4. Click the three dots menu ()
  5. Click Delete
  6. Confirm the deletion

Webhook 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.

For more information, see the API reference:

Send a webhook message (API)

Get delivery attempts for a webhook message (API)

Sandbox events

Event TypeDescription
sandbox.createdA new sandbox has been created
sandbox.state.updatedA sandbox’s state has changed

Snapshot events

Event TypeDescription
snapshot.createdA new snapshot has been created
snapshot.state.updatedA snapshot’s state has changed
snapshot.removedA snapshot has been removed

Volume events

Event TypeDescription
volume.createdA new volume has been created
volume.state.updatedA volume’s state has changed

Webhook payload format

All webhook payloads are JSON objects following a consistent format with common fields and event-specific data.

Common Fields:

FieldTypeDescription
eventstringEvent type identifier (e.g., sandbox.created)
timestampstringISO 8601 timestamp when the event occurred

sandbox.created

Sent when a new sandbox is created.

{
"event": "sandbox.created",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "sandbox123",
"organizationId": "org123",
"state": "started",
"class": "small",
"createdAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringSandbox ID
organizationIdstringOrganization ID
statestringSandbox state
classstringSandbox class (small, medium, or large)
createdAtstringISO 8601 timestamp when the sandbox was created

sandbox.state.updated

Sent when a sandbox’s state changes.

{
"event": "sandbox.state.updated",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "sandbox123",
"organizationId": "org123",
"oldState": "started",
"newState": "stopped",
"updatedAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringSandbox ID
organizationIdstringOrganization ID
oldStatestringPrevious sandbox state
newStatestringNew sandbox state
updatedAtstringISO 8601 timestamp when the sandbox was last updated

snapshot.created

Sent when a new snapshot is created.

{
"event": "snapshot.created",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "snapshot123",
"name": "my-snapshot",
"organizationId": "org123",
"state": "active",
"createdAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringSnapshot ID
namestringSnapshot name
organizationIdstringOrganization ID
statestringSnapshot state
createdAtstringISO 8601 timestamp when the snapshot was created

snapshot.state.updated

Sent when a snapshot’s state changes.

{
"event": "snapshot.state.updated",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "snapshot123",
"name": "my-snapshot",
"organizationId": "org123",
"oldState": "building",
"newState": "active",
"updatedAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringSnapshot ID
namestringSnapshot name
organizationIdstringOrganization ID
oldStatestringPrevious snapshot state
newStatestringNew snapshot state
updatedAtstringISO 8601 timestamp when the snapshot was last updated

snapshot.removed

Sent when a snapshot is removed.

{
"event": "snapshot.removed",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "snapshot123",
"name": "my-snapshot",
"organizationId": "org123",
"removedAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringSnapshot ID
namestringSnapshot name
organizationIdstringOrganization ID
removedAtstringISO 8601 timestamp when the snapshot was removed

volume.created

Sent when a new volume is created.

{
"event": "volume.created",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "vol-12345678",
"name": "my-volume",
"organizationId": "org123",
"state": "ready",
"createdAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringVolume ID
namestringVolume name
organizationIdstringOrganization ID
statestringVolume state
createdAtstringISO 8601 timestamp when the volume was created

volume.state.updated

Sent when a volume’s state changes.

{
"event": "volume.state.updated",
"timestamp": "2025-12-19T10:30:00.000Z",
"id": "vol-12345678",
"name": "my-volume",
"organizationId": "org123",
"oldState": "creating",
"newState": "ready",
"updatedAt": "2025-12-19T10:30:00.000Z"
}
FieldTypeDescription
idstringVolume ID
namestringVolume name
organizationIdstringOrganization ID
oldStatestringPrevious volume state
newStatestringNew volume state
updatedAtstringISO 8601 timestamp when the volume was last updated

Webhook logs

Daytona provides a webhook management interface to view webhook logs.

  1. Navigate to Daytona Dashboard ↗
  2. Click Webhooks in the sidebar
  3. Click Logs in the sidebar

The logs page shows detailed information about webhook deliveries, including message logs, event types, message IDs, and timestamps.