Skip to content
Merged
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
30 changes: 16 additions & 14 deletions docs/sandbox/lifecycle-events-webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
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"
}
Expand Down Expand Up @@ -99,7 +99,7 @@

if resp.status_code == 200:
print("Webhooks listed successfully")
print(response.json())
print(resp.json())
```
</CodeGroup>

Expand All @@ -120,11 +120,11 @@
},
}
)
const webhookConfig = await resp.json()

Check warning on line 123 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L123

Did you really mean 'webhookConfig'?
console.log(webhookConfig)
// {
// "id": "<webhook-id>",
// "teamID": "<your-team-id>",
// "teamId": "<your-team-id>",
// "name": "My Sandbox Webhook",
// "createdAt": "2025-08-06T21:00:00Z",
// "enabled": true,
Expand All @@ -148,7 +148,7 @@
print(webhook_config)
# {
# "id": "<webhook-id>",
# "teamID": "<your-team-id>",
# "teamId": "<your-team-id>",
# "name": "My Sandbox Webhook",
# "createdAt": "2025-08-06T21:00:00Z",
# "enabled": true,
Expand Down Expand Up @@ -209,7 +209,7 @@

### Delete webhook

Unregister the webhook.

Check warning on line 212 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L212

Did you really mean 'Unregister'?

<CodeGroup>
```js JavaScript & TypeScript
Expand Down Expand Up @@ -251,30 +251,32 @@

```json
{
"version": "v2",
"id": "<event-id>",
"version": "v2",
"type": "<sandbox-event-type>",
"eventData": {
"timestamp": "2025-08-06T20:59:24Z",
"event_category": "lifecycle",
"event_label": "kill",
"event_data": {
"sandbox_metadata": {
"<custom-key>": "<custom-value>"
},
"execution": {
"started_at": "2025-08-06T20:58:24Z",
"vcpu_count": 2,
"memory_mb": 512,
"execution_time": 1000,
"execution_time": 1000
}
},
"sandboxBuildId": "<template-build-id>",
"sandboxExecutionId": "<sandbox-unique-execution-id>",
"sandboxId": "<your-sandbox-id>",
"sandboxTeamId": "<your-team-id>",
"sandboxTemplateId": "<your-template-id>",
"timestamp": "2025-08-06T20:59:24Z"
"sandbox_id": "<your-sandbox-id>",

Check warning on line 271 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L271

Did you really mean 'sandbox_id'?
"sandbox_execution_id": "<sandbox-unique-execution-id>",

Check warning on line 272 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L272

Did you really mean 'sandbox_execution_id'?
"sandbox_template_id": "<your-template-id>",

Check warning on line 273 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L273

Did you really mean 'sandbox_template_id'?
"sandbox_build_id": "<template-build-id>",

Check warning on line 274 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L274

Did you really mean 'sandbox_build_id'?
"sandbox_team_id": "<your-team-id>"

Check warning on line 275 in docs/sandbox/lifecycle-events-webhooks.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/sandbox/lifecycle-events-webhooks.mdx#L275

Did you really mean '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
Expand Down