From dd3d75d0cb57caca044216030b0a874d4c0e9897 Mon Sep 17 00:00:00 2001 From: Matt Brockman Date: Wed, 18 Feb 2026 18:58:32 -0800 Subject: [PATCH 1/2] docs: include information about executionfield on eventData --- docs/sandbox/lifecycle-events-webhooks.mdx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/sandbox/lifecycle-events-webhooks.mdx b/docs/sandbox/lifecycle-events-webhooks.mdx index 6fa6a371..8f399192 100644 --- a/docs/sandbox/lifecycle-events-webhooks.mdx +++ b/docs/sandbox/lifecycle-events-webhooks.mdx @@ -251,12 +251,18 @@ The payload structure matches the event format from the API: ```json { - "version": "v1", + "version": "v2", "id": "", "type": "", "eventData": { "sandbox_metadata": { "": "" + }, + "execution": { + "started_at": "2025-08-06T20:58:24Z", + "vcpu_count": 2, + "memory_mb": 512, + "execution_time": 1.0, } }, "sandboxBuildId": "", @@ -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 seconds + # 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. @@ -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 - From 5bcfd08ac9c10f42f69ad2157af2f88c474f07ee Mon Sep 17 00:00:00 2001 From: Matt Brockman Date: Thu, 19 Feb 2026 17:31:26 -0800 Subject: [PATCH 2/2] update the webhook execution to return milliseconds --- docs/sandbox/lifecycle-events-webhooks.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sandbox/lifecycle-events-webhooks.mdx b/docs/sandbox/lifecycle-events-webhooks.mdx index 8f399192..6731c144 100644 --- a/docs/sandbox/lifecycle-events-webhooks.mdx +++ b/docs/sandbox/lifecycle-events-webhooks.mdx @@ -262,7 +262,7 @@ The payload structure matches the event format from the API: "started_at": "2025-08-06T20:58:24Z", "vcpu_count": 2, "memory_mb": 512, - "execution_time": 1.0, + "execution_time": 1000, } }, "sandboxBuildId": "", @@ -279,7 +279,7 @@ The payload structure matches the event format from the API: - `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 seconds +- `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.