From 111cd4c4c9c53afc779866d9cd6dd6e7faa563c4 Mon Sep 17 00:00:00 2001 From: Tomas Beran Date: Mon, 20 Apr 2026 12:49:52 +0200 Subject: [PATCH 1/3] Fix webhook payload to use snake_case and add missing fields --- docs/sandbox/lifecycle-events-webhooks.mdx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/sandbox/lifecycle-events-webhooks.mdx b/docs/sandbox/lifecycle-events-webhooks.mdx index a3ff0e58..bcb43007 100644 --- a/docs/sandbox/lifecycle-events-webhooks.mdx +++ b/docs/sandbox/lifecycle-events-webhooks.mdx @@ -251,10 +251,13 @@ The payload structure matches the event format from the API: ```json { - "version": "v2", "id": "", + "version": "v2", "type": "", - "eventData": { + "timestamp": "2025-08-06T20:59:24Z", + "event_category": "lifecycle", + "event_label": "kill", + "event_data": { "sandbox_metadata": { "": "" }, @@ -262,19 +265,18 @@ 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": 1000, + "execution_time": 1000 } }, - "sandboxBuildId": "", - "sandboxExecutionId": "", - "sandboxId": "", - "sandboxTeamId": "", - "sandboxTemplateId": "", - "timestamp": "2025-08-06T20:59:24Z" + "sandbox_id": "", + "sandbox_execution_id": "", + "sandbox_template_id": "", + "sandbox_build_id": "", + "sandbox_team_id": "" } ``` -`eventData.execution` contains sandbox execution details and is included on `sandbox.lifecycle.killed` and `sandbox.lifecycle.paused` events: +`event_data.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 From 9b84d1e4256a5f49bfc234f3be879f11330946f5 Mon Sep 17 00:00:00 2001 From: Tomas Beran Date: Mon, 20 Apr 2026 14:06:25 +0200 Subject: [PATCH 2/3] Fix teamID to teamId in webhook configuration response examples --- 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 bcb43007..34f444fa 100644 --- a/docs/sandbox/lifecycle-events-webhooks.mdx +++ b/docs/sandbox/lifecycle-events-webhooks.mdx @@ -124,7 +124,7 @@ const webhookConfig = await resp.json() console.log(webhookConfig) // { // "id": "", -// "teamID": "", +// "teamId": "", // "name": "My Sandbox Webhook", // "createdAt": "2025-08-06T21:00:00Z", // "enabled": true, @@ -148,7 +148,7 @@ webhook_config = resp.json() print(webhook_config) # { # "id": "", -# "teamID": "", +# "teamId": "", # "name": "My Sandbox Webhook", # "createdAt": "2025-08-06T21:00:00Z", # "enabled": true, From 0b55e9f37d505b6f38c8efb6a03ae1e6ef64f4dd Mon Sep 17 00:00:00 2001 From: Tomas Beran Date: Mon, 20 Apr 2026 14:10:05 +0200 Subject: [PATCH 3/3] Fix Python syntax errors in webhook documentation examples --- 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 34f444fa..d8326fca 100644 --- a/docs/sandbox/lifecycle-events-webhooks.mdx +++ b/docs/sandbox/lifecycle-events-webhooks.mdx @@ -53,7 +53,7 @@ resp = requests.post( json={ "name": "My Sandbox Webhook", "url": "https://your-webhook-endpoint.com/webhook", - "enabled": true, + "enabled": True, "events": ["sandbox.lifecycle.created", "sandbox.lifecycle.updated", "sandbox.lifecycle.killed"], "signatureSecret": "secret-for-event-signature-verification" } @@ -99,7 +99,7 @@ resp = requests.get( if resp.status_code == 200: print("Webhooks listed successfully") - print(response.json()) + print(resp.json()) ```