Skip to content

Commit 29aa83d

Browse files
Webhooks - new execution field (#121)
* docs: include information about executionfield on eventData
1 parent d7098d7 commit 29aa83d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/sandbox/lifecycle-events-webhooks.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,18 @@ The payload structure matches the event format from the API:
251251

252252
```json
253253
{
254-
"version": "v1",
254+
"version": "v2",
255255
"id": "<event-id>",
256256
"type": "<sandbox-event-type>",
257257
"eventData": {
258258
"sandbox_metadata": {
259259
"<custom-key>": "<custom-value>"
260+
},
261+
"execution": {
262+
"started_at": "2025-08-06T20:58:24Z",
263+
"vcpu_count": 2,
264+
"memory_mb": 512,
265+
"execution_time": 1000,
260266
}
261267
},
262268
"sandboxBuildId": "<template-build-id>",
@@ -268,6 +274,13 @@ The payload structure matches the event format from the API:
268274
}
269275
```
270276

277+
`eventData.execution` contains sandbox execution details and is included on `sandbox.lifecycle.killed` and `sandbox.lifecycle.paused` events:
278+
279+
- `started_at` - UTC RFC3339 timestamp when the current sandbox execution started
280+
- `vcpu_count` - Number of vCPUs assigned to the sandbox
281+
- `memory_mb` - Memory assigned to the sandbox in MB
282+
- `execution_time` - Sandbox runtime in milliseconds
283+
271284
# Webhook verification
272285
To ensure the authenticity of webhook requests, each request includes a signature in the `e2b-signature` header.
273286
You can verify the signature using the signature secret you provided when registering the webhook.

0 commit comments

Comments
 (0)