Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions docs/sandbox/lifecycle-events-webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,18 @@ The payload structure matches the event format from the API:

```json
{
"version": "v1",
"version": "v2",
"id": "<event-id>",
"type": "<sandbox-event-type>",
"eventData": {
"sandbox_metadata": {
"<custom-key>": "<custom-value>"
},
"execution": {
"started_at": "2025-08-06T20:58:24Z",
"vcpu_count": 2,
"memory_mb": 512,
"execution_time": 1000,
}
},
"sandboxBuildId": "<template-build-id>",
Expand All @@ -268,6 +274,13 @@ The payload structure matches the event format from the API:
}
```

`eventData.execution` contains sandbox execution details and is included on `sandbox.lifecycle.killed` and `sandbox.lifecycle.paused` events:

- `started_at` - UTC RFC3339 timestamp when the current sandbox execution started
- `vcpu_count` - Number of vCPUs assigned to the sandbox
- `memory_mb` - Memory assigned to the sandbox in MB
- `execution_time` - Sandbox runtime in milliseconds

# Webhook verification
To ensure the authenticity of webhook requests, each request includes a signature in the `e2b-signature` header.
You can verify the signature using the signature secret you provided when registering the webhook.
Expand Down Expand Up @@ -346,4 +359,3 @@ The following event types can be subscribed to via webhooks, they are used as th
- `sandbox.lifecycle.updated` - Sandbox configuration updates
- `sandbox.lifecycle.paused` - Sandbox pausing
- `sandbox.lifecycle.resumed` - Sandbox resuming